View source: R/design_matrix.R
design_matrix | R Documentation |
A design matrix with desired order of interactions.
design_matrix(data, order = 2)
data |
numeric data |
order |
complexity of interactions. Second order interactions would comprise of all pairs of variables, third order interactions include all triplets of variables, and so on. Defaults to 2. |
A design matrix with desired order of interactions for all variables
Derek Chiu
set.seed(2021)
df <- data.frame(matrix(rnorm(40), ncol = 4))
design_matrix(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.