dae (version 3.1-23)

decomp.relate: Examines the relationship between the eigenvectors for two decompositions

Description

Two decompositions produced by proj2.eigen are compared by computing all pairs of crossproduct sums of eigenvectors from the two decompositions. It is most useful when the calls to proj2.eigen have the same Q1.

Usage

decomp.relate(decomp1, decomp2)

Arguments

decomp1

A list containing components efficiencies and eigenvectors such as is produced by proj2.eigen.

decomp2

Another list containing components efficiencies and eigenvectors such as is produced by proj2.eigen.

Value

A matrix that is r1 x r2 where r1 and r2 are the numbers of efficiencies of decomp1 and decomp2, respectively. The rownames and columnnames of the matrix are the values of the efficiency factors from decomp1 and decomp2, respectively.

Details

Each element of the r1 x r2 matrix is the sum of crossproducts of a pair of eigenvectors, one from each of the two decompositions. A sum is regarded as zero if it is less than daeTolerance, which is initially set to .Machine$double.eps ^ 0.5 (about 1.5E-08). The function set.daeTolerance can be used to change daeTolerance.

See Also

proj2.eigen, proj2.combine in package dae, eigen.

Examples

Run this code
# NOT RUN {
## PBIBD(2) from p. 379 of Cochran and Cox (1957) Experimental Designs. 
## 2nd edn Wiley, New York
PBIBD2.unit <- list(Block = 6, Unit = 4)
PBIBD2.nest <- list(Unit = "Block")
trt <- factor(c(1,4,2,5, 2,5,3,6, 3,6,1,4, 4,1,5,2, 5,2,6,3, 6,3,4,1))
PBIBD2.lay <- designRandomize(allocated = trt, 
                              recipient = PBIBD2.unit, 
                              nested.recipients = PBIBD2.nest)

##obtain sets of projectors
unit.struct <- pstructure(~ Block/Unit, data = PBIBD2.lay)
trt.struct <- pstructure(~ trt, data = PBIBD2.lay)

## obtain intra- and inter-block decompositions
decomp.inter <- proj2.eigen(unit.struct$Q[["Block"]], trt.struct$Q[["trt"]])
decomp.intra <- proj2.eigen(unit.struct$Q[["Unit[Block]"]], trt.struct$Q[["trt"]])

## check that intra- and inter-block decompositions are orthogonal
decomp.relate(decomp.intra, decomp.inter) 
# }

Run the code above in your browser using DataCamp Workspace