getVMat.onePhase: Get the Variance Matrices for Single-Phase experiment

Description Usage Arguments Value Author(s) Examples

View source: R/getVMat.onePhase.R

Description

Construct the matrix for each variance components for the single-phase or two-phase experiment.

Usage

1
getVMat.onePhase(Z.Phase1, design.df, var.comp = NA)

Arguments

Z.Phase1

a list of block design matrix from makeBlkDesMat function from Phase 1 block structure.

design.df

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

var.comp

a vector of characters containing the variance components of interest this allows the user to specify the variance components to be shown on the ANOVA table. This also allows the user to specify artificial stratum to facilitate decomposition. Default is NA, which uses every random factor as the variance components with the first phase's variance components in appear before the second phase's variance components.

Value

A list of matrices.

Author(s)

Kevin Chang

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
 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)
  })

    blk.str = "Ani"
    
		rT = terms(as.formula(paste("~", blk.str, sep = "")), keep.order = TRUE) 

    blkTerm = attr(rT,"term.labels")
		Z = makeBlkDesMat(design1, rev(attr(rT,"term.labels")))

    V = getVMat.onePhase(Z, design1)
    

infoDecompuTE documentation built on May 29, 2018, 9:05 a.m.