empinf_mer | R Documentation |
This function calculates the empirical influence values for a statistic in a
given fitted model object using the delete-m_j
jackknife.
empinf_mer(x, FUN, index = 1)
empinf_merm(x, FUN)
x |
A fitted merMod object from |
FUN |
A function taking a fitted merMod object as input and returning the statistic of interest. |
index |
An integer stating the position of the statistic in the output of
|
empinf_mer
computes non-parametric influence function of models
fitted using lmer
by deleting one cluster at a time. See
van der Leeden, Meijer, and Busing (2008, pp. 420–422) for more information.
Whereas empinf_mer
computes influence values for a specified position
(as specified with the index
argument) of the output of FUN
,
empinf_merm
computes influence values for every element in
FUN(x)
.
A numeric vector with length equals to number of clusters of
x
containing the weighted influence value of each cluster.
Van der Leeden, R., Meijer, E., & Busing, F. M. T. A. (2008). Resampling multilevel models. In J. de Leeuw & E. Meijer (Eds.), Handbook of multilevel Analysis (pp. 401–433). New York, NY: Springer.
library(lme4)
fm01ML <- lmer(Yield ~ (1 | Batch), Dyestuff, REML = FALSE)
# Define function for intraclass correlation
icc <- function(x) 1 / (1 + 1 / getME(x, "theta")^2)
empinf_mer(fm01ML, icc)
empinf_mer(fm01ML, fixef)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.