planor.model {planor} | R Documentation

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

### 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

    ### 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)))

[Package planor version 1.5-1 Index]