Learn R Programming

planor (version 1.5-3)

planor.model: Model and Estimate Specifications for a Design Search

Description

Declare the factorial terms that must be considered as non-negligible and the factorial terms that must be estimable when the experiment will be analysed.

Usage

planor.model(model, estimate, listofmodels, resolution, factors)

Arguments

model

main model formula. It contains all the non-negligible factorial terms.

estimate

optional formula specifying the factorial terms to estimate. If missing, it is considered that all factorial terms in model have to be estimated.

listofmodels

list of c(model, estimate) pairs, where model and estimate are formulae; using several pairs allows more flexibility in the design constraints (see Kobilinsky, 2005, or the split-plot example in the vignette); estimate is optional.

resolution

an integer larger than or equal to 3, to specify the design resolution. When set, the model and estimate arguments are ignored. See Note.

factors

a '>designfactors object, typically an output from planor.factors. It must be set only when the resolution argument is used.

Value

A list of c(model, estimate) pairs, where model and estimate are formulae.

Examples

Run this code
# NOT RUN {
### Basic example
planor.model(model=~block + (A+B+C)^2, estimate=~(A+B+C)^2)
### Resolution: both calls to planor.model below are equivalent
planor.model(model=~(A+B+C+D)^2, estimate=~A+B+C+D)
myfactors <- planor.factors(factors=c(LETTERS[1:4]), nlevels=rep(2,4))
planor.model(resolution=4, factors=myfactors)
### Complicated examples
planor.model(~A+B+C+D+A:B, ~A+B+C+D, listofmodels=list(c(~E+F,~E)))
planor.model(~A+B+C+D+A:B,~A+B+C+D, listofmodels=
                              list(c(~E+F,~E), ~G, ~H, c(~M+N,~N)))
# }

Run the code above in your browser using DataLab