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

Description Usage Arguments Value Note Author(s) Examples

View source: R/planor.R

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

1
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.

Note

The user can specify:
1/ either, model or listofmodels or both,
2/ or, resolution and factors, and possibly listofmodels.

When model and resolution are both set, model is ignored.

The second case, — when resolution and factors are set —, causes the automatic generation of the main c(model, estimate) pair. Assuming S denotes the additive formula including all factors,
- if resolution is odd, the model formula is ~(S)^(resolution-1)/2,
- if resolution is even, the model formula is ~(S)^(resolution/2) and the estimate formula is ~(S)^(resolution/2)-1.

Author(s)

Monod, H. and Bouvier, A.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
### 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)))

Example output

Loaded planor 1.4.1

[[1]]
[[1]]$Model
~block + (A + B + C)^2

[[1]]$Estimate
~(A + B + C)^2


[[1]]
[[1]]$Model
~(A + B + C + D)^2

[[1]]$Estimate
~A + B + C + D


[[1]]
[[1]]$Model
~(A + B + C + D)^2
<environment: 0x452d3d0>

[[1]]$Estimate
~(A + B + C + D)
<environment: 0x452d3d0>


[[1]]
[[1]]$Model
~A + B + C + D + A:B

[[1]]$Estimate
~A + B + C + D


[[2]]
[[2]]$Model
~E + F

[[2]]$Estimate
~E


[[1]]
[[1]]$Model
~A + B + C + D + A:B

[[1]]$Estimate
~A + B + C + D


[[2]]
[[2]]$Model
~E + F

[[2]]$Estimate
~E


[[3]]
[[3]]$model
~G

[[3]]$estimate
~G


[[4]]
[[4]]$model
~H

[[4]]$estimate
~H


[[5]]
[[5]]$Model
~M + N

[[5]]$Estimate
~N

planor documentation built on March 19, 2020, 1:06 a.m.