Learn R Programming

planor (version 1.5-3)

summary-methods: Summarize the Design Properties

Description

Methods to summarize the design properties of an object, by printing the summary of each key matrix.

Usage

# S4 method for designkey
summary(object, show="dtbw", save="k", …)

# S4 method for keymatrix summary(object, fact, block, show="dtbw", save="k", …)

# S4 method for keyring summary(object, show="tbw",save ="kw", …)

# S4 method for listofdesignkeys summary(object, show="tbw", save="kw", …)

# S4 method for listofkeyrings summary(object, show="tbw", save="kw", …)

# S4 method for planordesign summary(object, fact, block, show="dtbw", save="k", …)

Arguments

object

an object of the class.

fact

a character or numeric vector of parent factor names for the columns of the object.

block

a logical vector to identify the columns of the object associated with a block factor

show

an optional string to identify the type of information to display. The recognized letters are: ‘d’ for the design keys matrices, ‘t’ for the treatment effects confounded with the mean, ‘b’ for the block-and-treatment effects confounded with the mean, ‘w’ for the weight profiles.

save

an optional string to identify the type of information to return. The recognized letters are: ‘k’ for the kernel matrices, ‘w’ for the weight profiles of the treatment effects confounded with the mean.

ignored.

Value

A list. See Details Information returned for each key matrix depends on the argument save.

  • When save includes the character ‘k’, the returned list has a component named ‘k’.It is a matrix, the columns of which are kernel generators of the key matrices.

  • When save includes the character ‘w’, the returned list has a component named ‘w’, which contains the weight profiles of the effects confounded with the mean.

Details

The amount of display depends on the value of the argument show, and the type of returned information depends on the value of the argument save.

  • When object is of class '>keymatrix, “summary” prints the key matrix, the factorial effects confounded with the mean, and the weight profiles of the effects confounded with the mean, according to the value of the argument show. The '>keymatrix argument being denoted by key, - The rows of key are associated with units factors (or pseudofactors) while its columns are associated with treatment or block factors (or pseudofactors). - The vectors in the arguments fact and block give information on the treatment and block factors, so that their length is expected to be equal to the number of columns of key. - If missing, fact attributes a distinct parent factor to each column of key and block is set to TRUE for all columns.

    “summary” returns a list with the components required by the argument save.

  • When object is of class '>designkey, “summary” prints the summary of each of the key matrices. It returns a list with as many components as key matrices, each one with the components required by the argument save.

  • When object is of class '>listofdesignkeys, “summary” prints the summary of each key matrix in each design key. It returns a list with as many components as design keys, each one is a list of the key matrices summaries.

  • When object is of class '>listofkeyrings, “summary” prints the summary of each key matrix in each keyring. It returns a list with as many components as keyrings, each one is a list of the key matrices summaries.

  • When object is of class '>keyring, “summary” prints the summary of each of its key matrices. It returns a list with as many components as key matrices.

  • When object is a '>planordesign, this function is the summary method applied on each of the keymatrix objects contained in its designkey slot.

See Also

Classes where this method applies: '>designkey, '>keymatrix, '>keyring, '>listofdesignkeys, '>listofkeyrings, '>planordesign

Examples

Run this code
# NOT RUN {
### 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 summary applied on a keymatrix object
r <- summary(K0[[1]][[1]])
### Method summary applied on a designkey  object
summary(K0[1], save=NULL)
### Method summary applied on the listofdesignkeys object
r <-summary(K0, show="dt")

### 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)
### Method summary applied on the keymatrix object
r <-summary(K0[[1]][[1]])
### Method summary applied on the keyring object
r <-summary(K0[[1]])
### Method summary applied on the listofkeyrings object
r <- summary(K0, show="dtb", save ="k")
print(r)
# }

Run the code above in your browser using DataLab