regular.design: Construct and Randomize a Regular Factorial Design

Description Usage Arguments Value Author(s) See Also Examples

View source: R/planor.R

Description

Construct and randomize a regular factorial design.

Usage

1
2
3
4
5
regular.design(factors = NULL, nlevels = NULL, block = NULL,
   ordered = NULL, hierarchy = NULL, model = NULL, estimate = NULL,
   listofmodels = NULL, resolution = NULL, nunits = NULL,
   base = NULL, randomize = NULL, randomsearch = FALSE,
   output = "planordesign", verbose = FALSE, ...)

Arguments

factors

an object of class designfactors, typically an output from planor.factors). Otherwise the arguments factors, nlevels, ordered, hierarchy follow the syntax of planor.factors.

nlevels

see planor.factors. Ignored if factors is of class designfactors.

block

see planor.factors. Ignored if factors is of class designfactors.

ordered

see planor.factors. Ignored if factors is of class designfactors.

hierarchy

see planor.factors. Ignored if factors is of class designfactors.

model

a list of model-estimate pairs of formulae, typically an output from planor.model. Otherwise the arguments model, estimate, listofmodels and resolution follow the syntax of planor.model.

estimate

see planor.model. Ignored if model is a list.

listofmodels

see planor.model. Ignored if model is a list.

resolution

see planor.model. Ignored if model is a list. When set and there is no hierarchy, a faster algorithm is used which exploits the symmetries.

nunits

see planor.designkey.

base

see planor.designkey.

randomize

an optional formula to randomize the design.

randomsearch

see planor.designkey.

output

a string to specify the class of the output value: either a data.frame or a planordesign object.

verbose

a logical to set to TRUE for verbose display.

...

additional arguments, in particular those related to randomization

Value

An object of class data.frame or planordesign, depending on the output argument.

Author(s)

Monod, H. and Bouvier, A.

See Also

planor.factors, planor.model, and the classes designfactors, listofkeyrings, listofdesignkeys

Examples

1
2
3
4
mydesign <- regular.design(factors=c("block", LETTERS[1:4]),
  nlevels=rep(3,5), model=~block + (A+B+C+D)^2, estimate=~A+B+C+D,
  nunits=3^3, randomize=~block/UNITS)
print(mydesign)

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