Learn R Programming

planor (version 1.5-3)

regular.design: Construct and Randomize a Regular Factorial Design

Description

Construct and randomize a regular factorial design.

Usage

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
randomize

an optional formula to randomize the design.

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

See Also

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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab