| designBalanced {lestat} | R Documentation |
Create a Design Matrix for a Balanced Design
Description
The function creates a design matrix suitable for analyzing results from
an experiment where a set of factors are analysed in a balanced design:
The argument factors lists the number of levels of each factor, and
each possible combination of levels of factors is tried out a number of times
given by replications.
Usage
designBalanced(factors, replications = 1, interactions = FALSE)
Arguments
factors |
A vector of integers, listing the number of levels of each of the factors. |
replications |
An integer: The number of times each combination of factor levels is tried out. |
interactions |
If true, the design matrix will include columns for all possible interactions of the factors. |
Value
A matrix where the number of rows equals the product of factors and replications.
The matrix will have only 0's and 1's as values.
Author(s)
Petter Mostad <mostad@chalmers.se>
See Also
designFactorial, designOneGroup, designTwoGroups, designManyGroups
Examples
designBalanced(c(3, 3), 2)