designAnatomy {dae}R Documentation

Given the layout for a design, obtain its anatomy via the canonical analysis of its projectors to show the confounding and aliasing inherent in the design.

Description

Computes the canonical efficiency factors for the joint decomposition of two or more structures or sets of mutually orthogonally projectors (Brien and Bailey, 2009; Brien, 2017; Brien, 2019), orthogonalizing projectors in a set to those earlier in the set of projectors with which they are partially aliased. The results can be summarized in the form of a decomposition table that shows the confounding between sources from different sets. For examples of its use also see the vignette daeDesignNotes.pdf.

Usage

designAnatomy(formulae, data, keep.order = TRUE, grandMean = FALSE, 
              orthogonalize = "hybrid", labels = "sources", 
              marginality = NULL, check.marginality = TRUE, 
              which.criteria = c("aefficiency","eefficiency","order"), 
              aliasing.print = FALSE, 
              omit.projectors = c("pcanon", "combined"), ...)

Arguments

formulae

An object of class list whose components are of class formula. Usually, the terms in a single formula have the same status in the allocation of factors in the design. For example, all involve only factors that were allocated, or all involve factors that were recipients of allocated factors. The names of the components are used to identify the sources in the summary.pcanon object. They will also be used to name the terms, sources and marginality lists in the pcanon.object.

data

A data.frame contains the values of the factors and variables that occur in formulae.

keep.order

A logical indicating whether the terms should keep their position in the expanded formula projector, or reordered so that main effects precede two-factor interactions, which precede three-factor interactions and so on.

grandMean

A logical indicating whether the projector for the grand mean is to be included for each structure.

orthogonalize

A character vector indicating the method for orthogonalizing a projector to those for terms that occurred previously in a single formula. Three options are available: hybrid; differencing; eigenmethods. The hybrid option is the most general and uses the relationships between the projection operators for the terms in the formula to decide which projectors to substract and which to orthogonalize using eigenmethods. The differencing option subtracts, from the current projector, those previously orthogonalized projectors for terms whose factors are a subset of the current projector's factors. The eigemethods option recursively orthogonalizes the projects using an eigenanalysis of each projector with previously orthogonalized projectors. If a single value is given, it is used for all formulae.

labels

A character nominating the type of labels to be used in labelling the projectors, and which will be used also in the output tables, such the tables of the aliasing in the structure. The two alternatives are terms and sources. Terms have all factors/variables in it separated by colons (:). Sources have factors/variables in them that represent interactions separated by hashes (#); if some factors are nested within others, the nesting factors are surrounded by square brackets ([ and ]) and separated by colons (:). If some generalized, or combined, factors have no marginal terms, the constituent factors are separated by colons (:) and if they interact with other factors in the source they will be parenthesized.

marginality

A list that can be used to supply some or all of the marginality matrices when it is desired to overwrite calculated marginality matrices or when they are not calculated. If the list is the same length as the formulae list, they will be associated in parallel with the components of formulae, irrespective of the naming of the two lists. If the number of components in marginlaity is less than the number of components in formulae then both lists must be named so that those in the marginality list can be matched with those in the formulae list.

Each component of the marginality list must be either NULL or a square matrix consisting of zeroes and ones that gives the marginalites of the terms in the formula. It must have the row and column names set to the terms from the expanded formula, including being in the same order as these terms. The entry in the ith row and jth column will be one if the ith term is marginal to the jth term i.e. the column space of the ith term is a subspace of that for the jth term and so the source for the jth term is to be made orthogonal to that for the ith term. Otherwise, the entries are zero. A row and column should not be included for the grand mean even if grandMean is TRUE.

check.marginality

A logical indicating whether the marginality matrix, when it is supplied, is to be checked against that computed by pstructure.formula. It is ignored when orthogonalize is set to eigenmethods.

which.criteria

A character vector nominating the efficiency criteria to be included in the summary of aliasing between terms within a structure. It can be none, all or some combination of aefficiency, mefficiency, sefficiency, eefficiency, xefficiency, order and dforthog – for details see efficiency.criteria. If none, no summary is printed.

aliasing.print

A logical indicating whether the aliasing between sources is to be printed.

omit.projectors

A character vector of the types of projectors to omit from the returned pcanon object. If pcanon is included in the vector then the projectors in these objects will be replaced with a numeric containing their degrees of freedom. If combined is included in the vector then the projectors for the combined decomposition will be replaced with a numeric containing their degrees of freedom. If none is included in the vector then no projectors will be omitted.

...

further arguments passed to terms.

Details

For each formula supplied in formulae, the set of projectors is obtained using pstructure; there is one projector for each term in a formula. Then projs.2canon is used to perform an analysis of the canonical relationships between two sets of projectors for the first two formulae. If there are further formulae, the relationships between its projectors and the already established decomposition is obtained using projs.2canon. The core of the analysis is the determination of eigenvalues of the product of pairs of projectors using the results of James and Wilkinson (1971). However, if the order of balance between two projection matrices is 10 or more or the James and Wilkinson (1971) methods fails to produce an idempotent matrix, equation 5.3 of Payne and Tobias (1992) is used to obtain the projection matrices for their joint decompostion.

Value

A pcanon.object.

Author(s)

Chris Brien

References

Brien, C. J. (2017) Multiphase experiments in practice: A look back. Australian & New Zealand Journal of Statistics, 59, 327-352.

Brien, C. J. (2019) Multiphase experiments with at least one later laboratory phase . II. Northogonal designs. Australian & New Zealand Journal of Statistics, accepted for publication.

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.

Payne, R. W. and R. D. Tobias (1992). General balance, combination of information and the analysis of covariance. Scandinavian Journal of Statistics, 19, 3-23.

See Also

designRandomize, designLatinSqrSys, designPlot,
pcanon.object, p2canon.object, summary.pcanon, efficiencies.pcanon, pstructure ,
projs.2canon, proj2.efficiency, proj2.combine, proj2.eigen, efficiency.criteria, in package dae,
eigen.

projector for further information about this class.

Examples

## 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 combined decomposition and summarize
unit.trt.canon <- designAnatomy(formulae = list(unit=~ Block/Unit, trt=~ trt),
                                data = PBIBD2.lay)
summary(unit.trt.canon, which.criteria = c("aeff","eeff","order"))
summary(unit.trt.canon, which.criteria = c("aeff","eeff","order"), labels.swap = TRUE)

## Three-phase sensory example from Brien and Payne (1999)
## Not run: 
data(Sensory3Phase.dat)
Eval.Field.Treat.canon <- designAnatomy(formulae = list(
                              eval= ~ ((Occasions/Intervals/Sittings)*Judges)/Positions, 
                              field= ~ (Rows*(Squares/Columns))/Halfplots,
                              treats= ~ Trellis*Method),
                                        data = Sensory3Phase.dat)
summary(Eval.Field.Treat.canon, which.criteria =c("aefficiency", "order"))

## End(Not run)

[Package dae version 3.2-13 Index]