View source: R/MakeHierFormula.R
MakeHierFormula | R Documentation |
Make model formula from data taking into account hierarchical variables
MakeHierFormula(
data = NULL,
hGroups = HierarchicalGroups2(data),
n = length(hGroups),
sim = TRUE
)
data |
data frame |
hGroups |
Output from HierarchicalGroups2() |
n |
Interaction level or 0 (all levels) |
sim |
Include "~" when TRUE |
Formula as character string
Øyvind Langsrud
x <- SSBtoolsData("sprt_emp_withEU")[, -4]
MakeHierFormula(x)
MakeHierFormula(x, n = 2)
MakeHierFormula(x, n = 0)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.