Learn R Programming

infoDecompuTE (version 0.6.2)

makeOrthProjectors: Construct Orthogonal Projector Matrices

Description

Construct a list of orthogonal projector matrices corresponding to all strata of the experiment.

Usage

makeOrthProjectors(BlkDesList)

Arguments

BlkDesList

a list of block design matrices generated by makeBlkDesMat.

Value

A list containing matrices.

Details

The strata decomposition is performed within this function. The first step is to convert the list of block design matrices generated by makeBlkDesMat to projection matrices using projMat. The second step is to use these projection matrices to project the raw data vector from one stratum to next stratum of the experiment; the resulting matrix corresponds to each stratum is the orthogonal projector matrix of the given stratum.

Examples

Run this code
# NOT RUN {
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 )
})

blk.str = "Ani"
    
rT = terms(as.formula(paste("~", blk.str, sep = "")), keep.order = TRUE) 
blkTerm = attr(rT,"term.labels")
     
Z = makeBlkDesMat(design1, blkTerm)
Pb = makeOrthProjectors(Z)

# }

Run the code above in your browser using DataLab