adjust_lmList.formula: Fitting Common Models via 'lm'

Description Usage Arguments References See Also Examples

View source: R/adjust_formula_lmList.R

Description

Separate linear models are fit via lm similar to lmList, however, adjust_lmList can handle models where a factor takes only one level within a group. In this case, the formula is updated eliminating the offending factors from the formula for that group as the effect is absorbed into the intercept.

Usage

1
2
## S3 method for class 'formula'
adjust_lmList(object, data, pool)

Arguments

object

a linear formula such as that used by lmList, e.g. y ~ x1 + ... + xn | g, where g is a grouping factor.

data

a data frame containing the variables in the model.

pool

a logical value that indicates whether the pooled standard deviation/error should be used.

References

Douglas Bates, Martin Maechler and Ben Bolker (2012). lme4: Linear mixed-effects models using S4 classes. R package version 0.999999-0.

See Also

lmList, lm

Examples

1
2
3
data(Exam, package = 'mlmRev')
sepLM <- adjust_lmList(normexam ~ standLRT + sex + schgend | school, data = Exam)
confint(sepLM)

HLMdiag documentation built on May 2, 2021, 9:06 a.m.