% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TCpRepEfficiency.R
\name{TCpRepEfficiency}
\alias{TCpRepEfficiency}
\title{Efficiency Measures for p-Rep Test-Control Designs}
\usage{
TCpRepEfficiency(design)
}
\arguments{
\item{design}{A design matrix containing numeric test treatments
and control labels such as \code{C1}, \code{C2}, etc.}
}
\value{
A data frame containing:
\describe{
  \item{Number of Test Treatments}{Number of numeric test labels.}
  \item{Number of Controls}{Number of controls labelled C1, C2, etc.}
  \item{Average Variance (Test vs Test)}{
    Average variance of all test-treatment contrasts.
  }
  \item{Average Variance (Test vs Control)}{
    Average variance of all test-versus-control contrasts.
  }
  \item{Canonical Efficiency Factor}{
    Harmonic mean of the non-zero canonical efficiency factors.
  }
}
}
\description{
Computes efficiency measures for partially replicated
test-control designs. Test treatments are identified from
numeric labels such as \code{1}, \code{2}, and \code{3}.
Control treatments must use labels beginning with \code{C},
such as \code{C1}, \code{C2}, and so on.
}
\details{
The function calculates average variance for test-versus-test
comparisons, average variance for test-versus-control comparisons,
and the canonical efficiency factor.


Blank or missing cells in the design matrix are ignored. The design must
contain at least two numeric test treatments and at least one control
treatment whose label starts with \code{C}.
}
\examples{
design <- matrix(c(
  1,  6, 11, "C1",
  2,  5, 12, "C1",
  3,  8,  9, "C1",
  4,  7, 10, "C1",
  1,  7, 12, "C1",
  2,  8, 11, "C1",
  1,  8, 10, "C1",
  2,  7,  9, "C1",
  3,  6, 12, "C1",
  4,  5, 11, "C1",
  3,  5, 10, "C1",
  4,  6,  9, "C1"
), ncol = 4, byrow = TRUE)

TCpRepEfficiency(design)

}
