View source: R/evalCriterion.R
nparam | R Documentation |
In the case of lm()
, the result is the number of coefficients For a linear mixed model fit with lmer()
there are 3 options. "edf": effective degrees of freedom as computed by sum of diagonal values of the hat matrix return by lmer()
. "countLevels", returns the number of fixed effects + number of levels in random effects + 1 for residual variance term. This treats each level of a random effect as a parameter. "lme4", returns number of fixed effects + number of variance components. Here a random effect with 10 levels is only counted as 1 parameter. This tends to underpenalize.
nparam(object, nparamsMethod = c("edf", "countLevels", "lme4"))
object |
model fit by |
nparamsMethod |
"edf": effective degrees of freedom. "countLevels" count number of levels in each random effect. "lme4" number of variance compinents, as used by lme4. See description in |
Number of parameters in model from lm()
or lmer()
number of parameters
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.