dae (version 3.0-32)

designTwophaseAnatomies: Given the layout for a design and three structure formulae, obtain the anatomies for the two-phase, first-phase, cross-phase and second-phase designs.

Description

Uses designAnatomy to obtain the four species of designs associated with a two-phase design that are described by Brien (2019): the anatomies for the two-phase, first-phase, cross-phase and second-phase designs.

Usage

designTwophaseAnatomies(formulae, data, 
                       which.designs = "all", printAnatomies = TRUE, 
                       orthogonalize = "hybrid", 
                       marginality = NULL, 
                       which.criteria = c("aefficiency", "eefficiency", 
                                          "order"), ...)

Arguments

formulae

An object of class list with three components 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.

which.designs

A character vector indicating the species of designs that are to be obtained. It should include one or more of two-phase, first-phase, cross-phase and second-phase; all, the default, results in all four being obtained.

printAnatomies

A logical indicating whether or not the anatomies are to be printed.

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.

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, irespective 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.

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.

...

further arguments passed to designAnatomy.

Value

A list containing the components twophase, first, cross and second.Each contains the pcanon.object for one of the four designs produced by designTwophaseAnatomies, unless it is NULL because the design was omitted from the which.designs argument.

Details

To produce the anatomies, designAnatomy is called. The two-phase anatomy is based on the three formulae supplied in formulae, the first-phase anatomy uses the second and third formulae, the cross-phase anatomy derives from the first and third formulae and the second-phase anatomy is obtained with the first and second formulae.

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.

See Also

designAnatomy, 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

Run this code
# NOT RUN {
  #'## Microarray example from Jarrett & Ruggiero (2008) - see Brien (2019)
  jr.lay <- fac.gen(list(Set = 7, Dye = 2, Array = 3))
  jr.lay <- within(jr.lay, 
                   { 
                     Block <- factor(rep(1:7, each=6))
                     Plant <- factor(rep(c(1,2,3,2,3,1), times=7))
                     Sample <- factor(c(rep(c(2,1,2,2,1,1, 1,2,1,1,2,2), times=3), 
                                        2,1,2,2,1,1))
                     Treat <- factor(c(1,2,4,2,4,1, 2,3,5,3,5,2, 3,4,6,4,6,3, 
                                       4,5,7,5,7,4, 5,6,1,6,1,5, 6,7,2,7,2,6, 
                                       7,1,3,1,3,7),
                                     labels=c("A","B","C","D","E","F","G"))
                   })
  
  jr.anat <- designTwophaseAnatomies(formulae = list(array = ~ (Set:Array)*Dye,
                                                     plot = ~ Block/Plant/Sample,
                                                     trt = ~ Treat),
                                     which.designs = c("first","cross"), 
                                     data = jr.lay)  

## Three-phase sensory example from Brien and Payne (1999)
# }
# NOT RUN {
data(Sensory3Phase.dat)
Sensory.canon <- designTwophaseAnatomies(formulae = list(
                              eval= ~ ((Occasions/Intervals/Sittings)*Judges)/Positions, 
                              field= ~ (Rows*(Squares/Columns))/Halfplots,
                              treats= ~ Trellis*Method),
                                        data = Sensory3Phase.dat)
# }

Run the code above in your browser using DataCamp Workspace