Package: merTools 0.6.2

merTools: Tools for Analyzing Mixed Effect Regression Models

Provides methods for extracting results from mixed-effect model objects fit with the 'lme4' package. Allows construction of prediction intervals efficiently from large scale linear and generalized linear mixed-effects models. This method draws from the simulation framework used in the Gelman and Hill (2007) textbook: Data Analysis Using Regression and Multilevel/Hierarchical Models.

Authors:Jared E. Knowles [aut, cre], Carl Frederick [aut], Alex Whitworth [ctb]

merTools_0.6.2.tar.gz
merTools_0.6.2.zip(r-4.5)merTools_0.6.2.zip(r-4.4)merTools_0.6.2.zip(r-4.3)
merTools_0.6.2.tgz(r-4.4-any)merTools_0.6.2.tgz(r-4.3-any)
merTools_0.6.2.tar.gz(r-4.5-noble)merTools_0.6.2.tar.gz(r-4.4-noble)
merTools_0.6.2.tgz(r-4.4-emscripten)merTools_0.6.2.tgz(r-4.3-emscripten)
merTools.pdf |merTools.html
merTools/json (API)
NEWS

# Install 'merTools' in R:
install.packages('merTools', repos = c('https://jknowles.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/jknowles/mertools/issues

Datasets:
  • hsb - A subset of data from the 1982 High School and Beyond survey used as examples for HLM software

On CRAN:

31 exports 104 stars 5.02 score 81 dependencies 18 mentions 660 scripts 3.2k downloads

Last updated 7 months agofrom:a9614c557a. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 04 2024
R-4.5-winNOTESep 04 2024
R-4.5-linuxNOTESep 04 2024
R-4.4-winOKSep 04 2024
R-4.4-macOKSep 04 2024
R-4.3-winOKSep 04 2024
R-4.3-macOKSep 04 2024

Exports:averageObsbglmerModListblmerModListdrawexpectedRankfastdispFEsimfindFormFunsglmerModListICClmerModListmodelFixedEffmodelInfomodelRandEffStatsplotFEsimplotREsimpredictIntervalrandomObsREcorrExtractREextractREimpactREmarginsREquantileREsdExtractREsimRMSE.merModshinyMersubBootsuperFactorthetaExtractwiggle

Dependencies:abindarmbackportsbase64encblmebootbroombroom.mixedbslibcachemclicodacodetoolscolorspacecommonmarkcpp11crayondigestdplyrfansifarverfastmapfontawesomeforcatsforeachfsfurrrfuturegenericsggplot2globalsgluegtablehtmltoolshttpuvisobanditeratorsjquerylibjsonlitelabelinglaterlatticelifecyclelistenvlme4magrittrMASSMatrixmemoisemgcvmimeminqamunsellmvtnormnlmenloptrparallellypillarpkgconfigpromisespurrrR6rappdirsRColorBrewerRcppRcppEigenrlangsassscalesshinysourcetoolsstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithrxtable

An Introduction to merTools

Rendered frommerToolsIntro.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2020-06-22
Started: 2015-05-27

Analyzing Imputed Data with Multilevel Models and merTools

Rendered fromimputation.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2020-06-22
Started: 2017-07-10

Using merTools to Marginalize Over Random Effect Levels

Rendered frommarginal_effects.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2020-06-22
Started: 2019-05-11

Prediction Intervals from merMod Objects

Rendered fromUsing_predictInterval.Rmdusingknitr::rmarkdownon Sep 04 2024.

Last update: 2020-06-22
Started: 2015-05-21

Readme and manuals

Help Manual

Help pageTopics
Find the average observation for a merMod objectaverageObs
Collapse a dataframe to a single average rowcollapseFrame
Draw a single observation out of an object matching some criteriadraw draw.merMod
Calculate the expected rank of random coefficients that account for uncertainty.expectedRank
Find link function familyfamlink
fastdisp: faster display of model summariesfastdisp fastdisp.merMod fastdisp.merModList
Simulate fixed effects from merMod 'FEsim' simulates fixed effects from merMod object posterior distributionsFEsim
Extract all warning msgs from a merMod objectfetch.merMod.msgs
'findFormFuns' used by averageObs to calculate proper averagesfindFormFuns
Extract fixed-effects estimates for a merModListfixef.merModList
Identify if a merMod has weightshasWeights
A subset of data from the 1982 High School and Beyond survey used as examples for HLM softwarehsb
Calculate the intraclass correlation using mixed effect modelsICC
Apply a multilevel model to a list of data framesbglmerModList blmerModList glmerModList lmerModList
Extract averaged fixed effect parameters across a list of merMod objectsmodelFixedEff
Extract model information from a merModmodelInfo
Extract data.frame of random effect statistics from merMod ListmodelRandEffStats
Extract all warning msgs from a merMod objectplot_sim_error_chks
Plot the results of a simulation of the fixed effectsplotFEsim
Plot the results of a simulation of the random effectsplotREsim
Predict from merMod objects with a prediction intervalpredictInterval
Summarize a merMod listprint.merModList
Print the summary of a merMod listprint.summary.merModList
Select a random observation from model datarandomObs
Extract random-effects estimates for a merModListranef.merModList
Extract the correlations between the slopes and the intercepts from a modelREcorrExtract
Extracts random effectsREextract
Calculate the weighted mean of fitted values for various levels of random effect terms.REimpact
Calculate the predicted value for each observation across the distribution of the random effect terms.REmargins
Identify group level associated with RE quantileREquantile
Extract the standard deviation of the random effects from a merMod objectREsdExtract
Simulate random effects from merMod 'REsim' simulates random effects from merMod object posterior distributionsREsim
Estimate the Root Mean Squared Error (RMSE) for a lmerModRMSE.merMod
Clean up variable names in data framessanitizeNames
Set up parallel environmentsetup_parallel
Launch a shiny app to explore your merMod interactivelyshinyMer
Randomly reorder a dataframeshuffle
Remove attributes from a data.framestripAttributes
Bootstrap a subset of an lme4 modelsubBoot
Subset a data.frame using a list of conditionssubsetList
Titlesum.mm
Print the results of a merMod listsummary.merModList
Create a factor with unobserved levelssuperFactor
Extract theta parameters from a merMod modelthetaExtract
Extract the variances and correlations for random effects from a merMod listVarCorr.merModList
Assign an observation to different valueswiggle