planor.design-methods: Build a Design from a Design Key Solution

Description Usage Arguments Details Value See Also Examples

Description

Methods to build a factorial design from an object containing key matrices.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'designkey'
planor.design(key, randomize=NULL, ...)

## S4 method for signature 'listofdesignkeys'
planor.design(key, randomize=NULL, selection=1, ...)

## S4 method for signature 'listofkeyrings'
planor.design(key, randomize=NULL, selection,...)

## S4 method for signature 'numeric'
planor.design(key, start=1)

Arguments

key

an object of the first class in the signature, or a vector of integers.

randomize

an optional formula to specify the block structure for design randomization.

selection

when key is a listofdesignkeys object, an integer scalar.
when key is a listofkeyrings object, should be an index vector to select the key matrix for each prime.

...

additional arguments, in particular those related to randomization (see planor.randomize).

start

an integer from where to start the series of symbols.

Details

Value

An object of class planordesign, which contains the design built from the input. This function is restricted to give a single design. When key is numeric, see Details.

See Also

Classes where this method applies: designkey, listofdesignkeys, listofkeyrings.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
### Creation of a listofdesignkeys object
K0 <- planor.designkey(factors=c("R","C","U","A","B1","B2"),
 nlevels=c(3,2,2,3,2,2), model=~R*C + (A+B1+B2)^2, estimate=~A:B1+A:B2,
 nunits=12, base=~R+C+U, max.sol=2)
### Method planor.design applied on the listofdesignkeys object
P0 <- planor.design(key=K0, select=1)
### Method planor.design applied on a designkey object
P0 <- planor.design(K0[1])


### Creation of a listofkeyrings object
K0 <- planor.designkey(factors=c(LETTERS[1:4], "block"), nlevels=rep(3,5),
model=~block+(A+B+C+D)^2, estimate=~A+B+C+D,
nunits=3^3, base=~A+B+C, max.sol=2, verbose=TRUE)
### Method planor.design applied on a designkey object
P0 <- planor.design(K0[1])
P0.R <- planor.design(K0[1], randomize=~A+B+C+D) # randomize the final design

planor documentation built on June 2, 2017, 5:02 p.m.