Learn R Programming

infoDecompuTE (version 0.5.1)

makeBlockProjectors: Make Block Projectors

Description

Construct a list of projection matrices of every stratum.

Usage

makeBlockProjectors(BlkDesignMatrixList, initial = diag(nrow(BlkDesignMatrixList[[1]])) - mK(nrow(BlkDesignMatrixList[[1]])))

Arguments

BlkDesignMatrixList
a list of block design matrix from the makeBlkDesMatrix.
initial
a matrix contains the first projection matrices for preforming the decomposition on. This arguement is essential for the two-phase experiment.

Value

This function returns a list of projection matrices of every stratum.

Examples

Run this code
  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 = makeBlkDesMatrix(design1, rev(attr(rT,"term.labels")))
		Pb = makeBlockProjectors(Z)

Run the code above in your browser using DataLab