DoE.base (version 1.1-3)

utilities: Utility functions for DoE packages, not intended for direct use

Description

Utility functions for DoE packages, not intended for direct use

Usage

make.generators(name, liste)
make.formulas(orignames, factor.names)
des.recode(var, recodes, as.factor.result, char) 
printBy(data, byvars, ...)
Letters
gen.fun(obj, num = FALSE)
generators(design, ...)
# S3 method for design
generators(design, ...)
# S3 method for catlg
generators(design, ...)
# S3 method for character
generators(design, select.catlg = catlg, ...)
PFTs.from.variants(array, variants, R=3, rela=TRUE)
matrix.fromPFTs(PFTs)
rankPFT(pfts)
bestPFT(pfts)
rect_simplex(r)
HouseholderRotToOne(from)

Arguments

name

...

liste

...

orignames

...

factor.names

...

var

variable

recodes

character string specifying recodes, so far only used in the principal form “-1=level[1];1=level[2]”

as.factor.result

logical that specifies whether or not results are to be coerced to factor. The default is that factors are coerced to factor, while numeric variables with numeric recodes are kept numeric.

char

logical: should replacement be treated as character string (TRUE) or evaluated? default is FALSE

data

data frame to be printed in groups that are defined by the byvars

byvars

character vector of variable names; variables named here determine the groups; only adjacent observations are considered part of a group, i.e. if data are not ordered by the byvars, several separate occurrences of the same group may occur

obj

an entry of a class catlg object

num

logical; if TRUE, Yates matrix column numbers are output, otherwise human-friendly generators

design

FrF2 design given as catalogue entry, design itself or character string; function generators provides the generating contrasts for additional factors for these designs.

select.catlg

the catalogue in which to look for the design (should be of class catlg)

further arguments to function print or generators

array

orthogonal array (available in the workspace); must be matrix or data frame

variants

matrix the rows of which contain column numbers for array

R

resolution of array and also array[variants,,drop=FALSE]

rela

logical; relative PFTs (TRUE) or absolute PFTs (FALSE)

PFTs

list of (absolute or relative) projection frequency tables. The list could have been produced with function PFTs.from.variants.

pfts

a matrix the columns of which contain the PFT entries for several designs, with row names indicating the (relative) number of words of a triple/quadruple. The matrix could have been obtained from function matrix.fromPFTs.

r

integer; dimension of the simplex

from

numeric vector to be rotated towards (1,0,...,0)

Value

Most functions are not intended for direct use.

The generators methods output a list of human-readable character string vectors with the generators of catalogue entries or a design.

The following functions have not yet been adapted to also handle the more attractive new metrics calculated with functions P3.3, P4.4 and GRind. Function PFTs.from.variants outputs a list of (relative) projection frequency tables (each entry is produced with function P3.3 or P4.4). Function matrix.fromPFTs outputs a matrix (reshaped from such a list, filling missing entries with 0 counts for some designs, if required), with columns for the different selections and rows for different (relative) numbers of generalized words. Function rankPFTs outputs a ranking vector, with 1 for the best design (ties are kept in the original order). Function bestPFTs outputs a logical vector, with entry TRUE for all best designs (identical best (R)PFTs).

Details

Most functions are not intended for direct use.

The constant Letters is the vector of all capital and lower case letters of the Roman alphabet except I and i. It is used for default factor names and has been obtained as Letters <- c(LETTERS[-9],letters[-9]).

The generic function generators and its methods determine generating contrasts for regular fractional factorial 2-level designs, which can be specified as the design itself (created with function FrF2), a list of catalogue entries in package FrF2 object catlg, or a character string that names such a catalogue entry. The method for the design itself cannot be used on designs of type FrF2.param... or FrF2.folded. Also, it cannot be used on designs produced with versions of FrF2 before 1.1 in case of blocked or splitplot designs. It is generally recommended to update all packages of the suite (DoE.base, FrF2, DoE.wrapper, RcmdrPlugin.DoE), whenever one of them is updated.

This paragraph describes internal functions: Function PFTs.from.variants can be used to determine a list of (relative) projection frequency tables (cf. Groemping 2011) for comparing several column selections from the same array. Function matrix.fromPFTs brings this list into matrix form, functions rankPFT and bestPFT allow ranking or picking best selections.

References

Groemping, U. (2011). Relative projection frequency tables for orthogonal arrays. Report 1/2011, Reports in Mathematics, Physics and Chemistry http://www1.beuth-hochschule.de/FB_II/reports/welcome.htm, Department II, Beuth University of Applied Sciences, Berlin.

Hedayat, A.S., Sloane, N.J.A. and Stufken, J. (1999) Orthogonal Arrays: Theory and Applications, Springer, New York.

See Also

See Also FrF2-package, DoE.wrapper-package

Examples

Run this code
# NOT RUN {
## default factor names for most design generating functions 
## (some quantitative designs have other default factor names)
## for up to 50 factors
Letters
# }
# NOT RUN {
generators("7-2.2")
generators(catlg[2:8])
generators(FrF2(16,7))
generators(FrF2(16,5,blocks=4,alias.block.2fi=TRUE))
generators(FrF2(16,5,WPs=4,nfac.WP=2))
# }
# NOT RUN {
## column selections from L18 with one 2-level and six 3-level factors
v <- rbind(1:7, c(1:6,8), c(1:5,7:8), c(1:4,6:8), c(1:3,5:8), c(1:2,4:8), c(1,3:8))
## RPFTs
RPFTs <- DoE.base:::PFTs.from.variants(L18, v, rela=TRUE)
rpfts <- DoE.base:::matrix.fromPFTs(RPFTs)
rpfts
DoE.base:::rankPFT(rpfts)
DoE.base:::bestPFT(rpfts)
# }

Run the code above in your browser using DataCamp Workspace