Description Usage Arguments Details Value Examples
Interpret a hierarchical formula and fit it with the given data and weight ratios.
1 2 |
formula |
an hierlm-style formula |
datas |
a data frame or a list of data frames, for each lm-style formula contained in the hierlm |
ratios |
a vector of ratios for the effect of fictional observations, with length as large as the number of hyper expressions. |
weights |
a vector of weights for fictional observations (overrides ratios) |
return |
what value to return. Possible values are 'fit' (the fitted model), 'data' (the final data frame), and 'formula' (the final formula) |
verbose |
what to report. Possible values are 'none', 'weight', 'extras', and 'final' |
sep |
a paste separator for creating factor and hyper terms |
hierlm() takes a formula which could consist of multiple parts, and one or more data.frames to provide fitting data for any of those parts with dependent variables.
Each part of the hierlm formula takes one of the following forms: y ~ ... : an lm-style formula; the left-hand-side variables much match f - b : A requirement that two variables be close together (typically one is a factor) f - . : A requirement that a variable (or set of factors) be close to a new hyper-variable a : f - [b or .] : A requirement that the results of an interaction be near a hyper-variable a : f > b : f : A requirement that one interaction is close to another set of interactions, with the lhs as the strict supersets fa == fb : A requirement that individual coefficients for factor levels are similar.
A fitted lm model
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.