par2lambda {factDesign}R Documentation

A function to construct the appropriate lambda matrix for a test of contrast of linear model parameters.

Description

'par2lambda' takes list of lm coefficient names and a corresponding list of numeric vectors corresponding to hypothesis tests of linear contrasts and returns a lambda matrix suitable for an F-test of the linear contrasts. 'par2lambda' is intended to be used in conjunction with 'contrastTest', 'findFC', or 'findFClog'.

Usage

par2lambda(betaNames, betas, coefs)

Arguments

betaNames A character vector of the names of the coefficients in a linear model.
betas A list of vectors of the parameters to be used in the contrasts.
coefs A list of vectors of numeric coefficients corresponding to betas.

Value

A lambda matrix constructed for testing linear contrasts using lm output.

Author(s)

Denise Scholtens

See Also

contrastTest,findFC,findFClog

Examples

data(estrogen)
ES <- pData(estrogen)[["ES"]]
TIME <- pData(estrogen)[["TIME"]]
fit <- lm(exprs(estrogen)[1,] ~ ES + TIME + ES*TIME)
betaNames <- names(fit[["coef"]])
betas <- list(c("ESP","ESP:TIME48h"),c("TIME48h","ESP:TIME48h"))
coefs <- list(c(1,1),c(1,1))
par2lambda(betaNames,betas,coefs)


[Package Contents]