Description Usage Arguments Value Author(s) References Examples
Calculate the replication number of every treatment term including the interaction. This is used to compute the treatment efficiency factors.
1 | getTrtRep(design.df, trtTerm)
|
design.df |
a data frame containing the experimental design. Requires
every column be a |
trtTerm |
a vector of character containing the labels of the treatment
terms in the model generated by the |
A list containing two objects. The first object is a matrix called
Rep
which contains the replication numbers, where the rows
correspond to each treatment combination and the columns correspond to the
treatment factors, i.e. the replication number with respect to each
treatment factor based on the treatment combination. The second object
called Sca
which is a numeric vector for computing a coefficients of
the fixed effect parameter in EMS.
Kevin Chang
John J, Williams E (1987). Cyclic and computer generated Designs. Second edition. Chapman & Hall.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | design1 <- local({
Ani = as.factor(LETTERS[c(1,2,3,4,
5,6,7,8)])
Trt = as.factor(letters[c(1,1,1,1,
2,2,2,2)])
data.frame(Ani, Trt, stringsAsFactors = TRUE )
})
trt.str = "Trt"
fT = terms(as.formula(paste("~", trt.str, sep = "")), keep.order = TRUE) #fixed terms
trtTerm = attr(fT,"term.labels")
effectsMatrix = attr(fT,"factor")
getTrtRep(design1, trtTerm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.