getTrtCoef: Get the Treatment Coefficients

Description Usage Arguments Value Author(s) Examples

View source: R/getTrtCoef.R

Description

Compute the overll coefficients every treatment term including the interaction.

Usage

1
getTrtCoef(design.df, trtTerm)

Arguments

design.df

a data frame containing the experimental design. Requires every column be a factor.

trtTerm

a vector of character containing the labels of the treatment terms in the model generated by terms.

Value

The numeric vector.

Author(s)

Kevin Chang

Examples

 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)
})

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") 
		
trt.Coef = getTrtCoef(design1, trtTerm)

infoDecompuTE documentation built on May 29, 2017, 3:12 p.m.

Search within the infoDecompuTE package
Search all R packages, documentation and source code