Computes the canonical efficiency factors for the joint
decomposition of two structures or sets of mutually orthogonally
projectors (Brien and Bailey, 2009), orthogonalizing projectors in the
Q2 `list`

to those earlier in the `list`

of projectors with
which they are partially aliased. The results can be summarized in the
form of a skeleton ANOVA table.

1 | ```
projs.2canon(Q1, Q2)
``` |

`Q1` |
A |

`Q2` |
A |

Two loops, one nested within the other. are performed. The first cycles
over the components of `Q1`

and the nested loop cycles over the
components of `Q2`

. The joint decomposition of the two projectors
in each cycle, one from `Q1`

(say `Q1[[i]]`

) and the other
from `Q2`

(say `Q2[[j]]`

) is obtained using
`proj2.combine`

.
In particular, the nonzero canonical efficiency factors for the joint
decomposition of the two projectors is obtained. The nonzero canonical
efficiency factors are the nonzero eigenvalues of
`Q1[[i]] %*% Q2[[j]] %*% Q1[[i]]`

(James and Wilkinson, 1971).
An eigenvalue 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`

.

However, a warning occurs if any pair of Q2 projectors (say
`Q2[[j]]`

and `Q2[[k]]`

) do not have adjusted orthgonality
with respect to any Q1 projector (say `Q1[[i]]`

), because they are
partially aliased. That is, if ```
Q2[[j]] %*% Q1[[i]] %*%
Q2[[k]]
```

is nonzero for any pair of different Q2 projectors and any
Q1 projector. When it is nonzero, the projector for the later term in
the list of projectors is orthogonalized to the projector that is
earlier in the list.

A `list`

of class `p2canon`

. It has a component for each
component of `Q1`

. Each of the components for
`Q1`

is a `list`

; its components are one for each component of
`Q2`

and a component `Pres`

. Each of the `Q2`

components
is a `list`

of three components: `pairwise`

, `adjusted`

and `Qproj`

. These components are based on an eigenalysis of the
relationship between the projectors for the parent `Q1`

and
`Q2`

components. Each `pairwise`

component is based on the
nonzero canonical efficiency factors for the joint decomposition of the
two parent projectors (see `proj2.eigen`

). An `adjusted`

component is based on the nonzero canonical efficiency factors for the
joint decomposition of the `Q1`

component and the `Q2`

component, the latter adjusted for all `Q2`

projectors that have
occured previously in the `list`

.
The `Qproj`

component is the adjusted projector for the parent
`Q2`

component. The `pairwise`

and `adjusted`

components
have the following components: `efficiencies`

, `aefficiency`

,
`mefficiency`

, `sefficiency`

, `eefficiency`

,
`xefficiency`

, `order`

and `dforthog`

– for details see `efficiency.criteria`

.

Chris Brien

Brien, C. J. and R. A. Bailey (2009). Decomposition tables for
multitiered experiments. I. A chain of randomizations.
*The Annals of Statistics*, **36**, 4184 - 4213.

James, A. T. and Wilkinson, G. N. (1971) Factorization of the residual
operator and canonical decomposition of nonorthogonal factors in the
analysis of variance. *Biometrika*, **58**, 279-294.

`summary.p2canon`

, `efficiencies.p2canon`

,
`projs.combine.p2canon`

, `projs.structure`

,

`proj2.efficiency`

, `proj2.combine`

,
`proj2.eigen`

, `efficiency.criteria`

in package dae, `eigen`

.

`projector`

for further information about this class.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
## 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 <- fac.layout(unrandomized = PBIBD2.unit,
nested.factors=PBIBD2.nest,
randomized = trt)
##obtain projectors using projs.structure
Q.unit <- projs.structure(~ Block/Unit, data = PBIBD2.lay)
Q.trt <- projs.structure(~ trt, data = PBIBD2.lay)
##obtain combined decomposition and summarize
unit.trt.p2canon <- projs.2canon(Q.unit, Q.trt)
summary(unit.trt.p2canon)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.