optBlockC {choiceDes}R Documentation

Optimal design blocking

Description

INTERNAL: Simplified wrapper for blocking of experimental designs using optBlock in the AlgDesign package.

Usage

optBlockC(withinData, blocksizes, nRepeats=5)

Arguments

withinData

A matrix or data frame describing the variables. Data types allowed include: factors, effects-coded designs, or dummy-coded designs. Other data types will lead to errors or unbalanced designs. If the columns are not named, they will be assumed to have the names X1, X2, etc. The number of rows in withinData must be at least as large as the sum of the number of terms plus the number of blocks.

blocksizes

A vector giving the block sizes for each block. The length of blocksizes specifies the number of blocks.

nRepeats

The number of times the entire process is repeated.

Details

Simplified wrapper for optBlock that optimizes blocks on a pre-existing design or a set of factors using the D criterion. Does not permit whole plot factors to interact with within plot factors. See optBlock for additional details.

Value

D

det(M)^(1/k), where det(M) is the determinant of the normalized dispersion matrix M, or m=X'X/N, where each row of X has the appropriate block mean subtracted.

diagonality

|M|/P^(1/k), where P is the product of the diagonal elements of M.

Blocks

A list of blocks, labeled B1, B2, etc.

design

A data frame. The design with blocks in stacked order.

rows

Numeric row numers of the design rows corresponding to withinData rows.

References

Wheeler, R.E. (2004). optBlock. AlgDesign. The R project for statistical computing. (http://www.r-project.org).

Examples

##INTERNAL USE ONLY

[Package choiceDes version 0.9-3 Index]