Simulate random effects from merMod
REsim
simulates random effects from merMod object posterior distributions
1 |
merMod |
a merMod object from the lme4 package |
n.sims |
number of simulations to use |
oddsRatio |
logical, should parameters be converted to odds ratios? |
seed |
numeric, optional argument to set seed for simulations |
Use the Gelman sim technique to build empirical Bayes estimates. Uses the sim function in the arm package
a data frame with the following columns
groupFctr
Name of the grouping factor
groupID
Level of the grouping factor
term
Name of random term (intercept/coefficient)
mean
Mean of the simulations
median
Median of the simulations
sd
Standard deviation of the simulations, NA
if oddsRatio=TRUE
1 2 3 4 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.