View source: R/factorial_plan.R
| fp_design_matrix | R Documentation |
Builds a design matrix from a one side formula or a number of factors.
fp_design_matrix(arg, rep = 1, levels = c(-1, 1))
arg |
Either a formula or a number of factors. If it is a formula, the
factors are extracted from it. If it is a number, the factors are the first
|
rep |
Number of replications. |
levels |
Levels of the factors. |
Defining relationships are represented as one side formulas, e.g. $I=ABC$
becomes ~A*B*C.
A design matrix: a subclass of a tibble of class factorial.plan.
The class has the following attributes:
def.relThe defining relationship (a formula).
generatorsThe list of generators (formulas) if the factorial plan is fractional.
fractionThe list of fractions (character vectors) if the factorial plan is fractional.
levelsThe levels of the factors (all equal), in coded units.
scalesA list: for each factor, a vector of two values corresponding to the extreme values in coded units.
fp_design_matrix(3, rep=2, levels=c("-", "+"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.