cran-task-views / mixedmodels Goto Github PK
View Code? Open in Web Editor NEWCRAN Task View: Mixed, Multilevel, and Hierarchical Models in R
Home Page: https://CRAN.R-project.org/view=MixedModels
CRAN Task View: Mixed, Multilevel, and Hierarchical Models in R
Home Page: https://CRAN.R-project.org/view=MixedModels
regress: Gaussian Linear Models with Linear Covariance Structure
Functions to fit Gaussian linear model by maximising the residual log likelihood where the covariance structure can be written as a linear combination of known matrices. Can be used for multivariate models and random effects models. Easy straight forward manner to specify random effects models, including random interactions. Code now optimised to use Sherman Morrison Woodbury identities for matrix inversion in random effects models. We've added the ability to fit models using any kernel as well as a function to return the mean and covariance of random effects conditional on the data (best linear unbiased predictors, BLUPs). Clifford and McCullagh (2006) https://www.r-project.org/doc/Rnews/Rnews_2006-2.pdf.
I would like to propose a few items to be added to the View in the Generalized estimating equations section.
The glmtoolbox that I found recently is awesome.
Personally speaking, glmtoolbox seems the new king and a standard for GEE in R, outperforming geepack in most aspects.
The other proposed packages, MIIPW, CRTgeeDR, drgee, geeCRT, are important from the clinical trials perspective, offering ways to deal with data missing at random (MAR).
I'm only aware of support for this brms
, and even then it seems to be not that useful for most cases:
The WeMix
package fits weighted multilevel models with weights at multiple levels.
sensu Nelder, Lee, Pawitan. We already include hglm
but there's also dhglm
(doubly hierarchical GLMs), mdhglm
, vglmer
(HGLMMM
used to exist but was archived in 2013).
Package wgeesel is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN. See the section on CRAN package archivals in the maintenance guidelines for more details.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
marginaleffects (for prediction/estimation)
Don't know whether 'simulation' should be lumped with power analysis or a separate sub-head.
Candidates: faux
(general mixed models), rxode2
, mrgsolve
(ODE/pharmacokinetic models), ... ?
I feel like we should go ahead and pursue something in an initial proposal format (scope; tentative list of packages; overlap; maintainers) before worrying about finishing/cleaning/polishing, since incorporating suggestions from the task view admins might be extra work if we have done too much development on our own ...
(I'm going to be away/unavailable from now to August 21, but can tackle it when I get back.)
newish book and free PDF:
Generalized Linear Mixed Models with Applications in Agriculture and Biology
from @wviechtb :
New package just released: https://cran.r-project.org/package=mmrm
Essentially, it fits models of the form gls(outcome ~ time + other_fixed_effects, correlation = corSymm(form = ~ 1 | subjectid), weights=varIdent(form = ~ 1 | time)) (although one can also use other structures for the error var-cov matrix), so this is what they mean by "marginal linear model without random effects". In one sense, one could regard this as a GEE approach. Alternatively, we could put this under the Specialized models with a new entry Repeated-measures (or something like that).
Check this reference for more to add to the "model summaries" section: https://www.anthonyschmidt.co/post/2020-09-06-table-options-mlm/
The new subsection (under "specialized models"):
Repeated measures: (packages with specialized covariance structures for handling repeated measures) r pkg("nlme", priority = "core")
, r pkg("mmrm")
, r pkg("glmmTMB", priority = "core")
, r github("Biometris/LMMsolver")
, r pkg("repeated")
, r pkg("mmrm")
Only a few packages were added to this section because I do not know all the packages that should be included here. Please fix as needed.
add appropriate cross-references to https://cran.r-project.org/view=Pharmacokinetics ! add Matt Fidler as contributor.
Add these:
pedigreemm
is listed twice in that section!)Hi, I wanted to suggest adding a resource to the CRAN task view on mixed models. I've been developing a GLMM model fitting package for R (currently on CRAN as glmmrBase v0.4.6 ), which I wanted to suggest is added to the mixed model task view page. Just as an overview of what it does, I've put a summary below. There's a linked paper under review at JSS, which is online here. The github page is here and an (unfinished) page of tutorials and the like here.
Summary of package functionality:
I thought the package may be useful to some people, so hoping to add it to the CRAN page. Please let me know if you would like any further information.
right now we have
Multi-trait analysis: (multiple dependent variables) BMTME, MCMCglmm, MegaLMM
We should
brms
mgcv
is in the wrong category (it's frequentist); could add GLMMadaptive
to frequentist category as well
Consider adding to the repo, in some sensible format:
I'm working on the specialized models section and here are some proposed changes. Please weigh in.
there's a few other changes (minor edits, packages to add), but it would easier for you to review those after I add them.
Panel data models (to me) are essentially mixed models for econometricians (some discussion about this in Cross Validated here). Would it make sense to include these here? I feel it does because for example pglm::pglm()
is used quite often for analysis of count longitudinal data and while the motivation of these models are often driven by econometrics data, the models can be applicable beyond econometrics.
Package mlmtools definitely seems relevant, although it provides a bit of a mix of different things (e.g., some pre-processing stuff,
Package mind seems to be related to small area estimation, which is already covered by the Official Statistics & Survey Statistics task view, but that of course does overlap thematically with mixed-effects models. Not sure how we should handle that.
Just stumbled across this: https://cran.r-project.org/package=glmmrBase
"Specification of generalised linear mixed models using the 'R6' object-orientated class system." Could be even considered to fit under 'Basic model fitting'.
I'm still torn about whether we should include more general engines (e.g. Stan, NIMBLE, greta, JAGS/BUGS, rethinking) and interfaces thereto in this Task View. Opinions?
(Having taken a quick look at the first few hits I'm not sure this is going to provide a lot of actionable material, but it's worth a look ...)
remotes::install_github("DylanDijk/CTVsuggest")
library("CTVsuggest")
CTVsuggest(taskview = "MixedModels", n = 5)
MixedModels Packages
hillR 0.9977753 hillR
Rsmlx 0.9977393 Rsmlx
jlctree 0.9974878 jlctree
SimCorMultRes 0.9952925 SimCorMultRes
npde 0.9943997 npde
From @zeileis
It would be great if you also ran code like the one above for the first ten or twenty suggestions for the task view maintained by you. After assessing which of the suggestions match the scope of your task view well enough, please update the task view correspondingly. Dylan might also create a GitHub issue for you containing the output from his package so that you can easily have a look and decide which packages to add or not to add.
Starting a list here so we can keep track of this. Core packages have to be on CRAN (which sadly, leaves out broom.mixed)
lme4
nlme
brms
MCMCglmm
multilevelmod
geepack
lavaan
FYI: I found out the hard way that every time a core package is mentioned in the task view, it has to say include the tag priority = "core"
to be processed correctly by ctv::ctv2html()
. I tried to fixed the instances of this in the TV, but I may have missed some.
Package dalmatian is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
The mclogit
package allows for random effects (intercepts and slopes) for multinomial logistic regression models.
for sampling weights/complex sampling designs
somewhat limited in scope, but offers additional R^2 choices
Package mlmmm is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN. See the section on CRAN package archivals in the maintenance guidelines for more details.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
Thanks so much for adding this task view!
2 possible additions:
phylolm
under "Specialized models: Phylogenetic models"sommer
, possibly would fit best under "Specialized models: Kinship-augmented models"Package Phxnlme is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN. See the section on CRAN package archivals in the maintenance guidelines for more details.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
Package clusterPower is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN. See the section on CRAN package archivals in the maintenance guidelines for more details.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
The proposal is excellent! A mixed models task view is long overdue, I suspect in part since it's a rather substantial task. So thank you for tackling this.
One thing that immediately comes to mind is location-scale models, like Hedeker's stuff (e.g., https://doi.org/10.18637/jss.v052.i12) except that MIXREGLS isn't an R package (but could link to it under Other/Links: https://voices.uchicago.edu/hedeker/mixwild_mixregls/). But glmmTMB
allows this via the dispformula
argument for the error variance / dispersion parameter. I am not aware of any packages that also allow scale modeling of other variance components, but one might cobble something together via OpenMx
. In any case, I think location-scale models should fall under Specialized models and glmmTMB
should be mentioned there.
Under Missing values, I would also mention mice
there since it can do some multilevel imputation stuff. Also, JointAI
and mdmb
should be mentioned here as packages that go beyond the mice capabilities for mixed effects models.
Also, package mbest
should be added. It fits hierarchical models using moment-based estimation. Could mention this under the Frequentist packages (it also does GLMMs), or alternatively under Specialized models but it's not really a different model per se, just an alternative to maximum likelihood estimation.
Since the group of people working with mixed effects models overlaps with people who may want to do model selection via information-theoretic methods, it might be worth mentioning packages like glmulti
and MuMIn
as well.
I need to migrate kinship-augmented models from the Agriculture CTV to this one. Do any maintainers have any pending changes? Please let me know if you have anything that needs to be pushed or if I can proceed.
Package BMTME is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN. See the section on CRAN package archivals in the maintenance guidelines for more details.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
An R package that allows for combining tree-boosting with Gaussian process and mixed effects models. It also allows for independently doing tree-boosting as well as inference and prediction for Gaussian process and mixed effects models. See https://github.com/fabsig/GPBoost for more information on the software and Sigrist (2020) <arXiv:2004.02653> and Sigrist (2021) <arXiv:2105.08966> for more information on the methodology.
bcmixed
and boxcoxmix
implement Box-Cox transformations for mixed models. Would not they fit mixed models task view?
https://cran.r-project.org/package=ggResidpanel
automated residual checking - current set to work with lme4/lmerTest and nlme
Package qgtools is currently listed in CRAN Task View MixedModels but the package has actually been archived for more than 60 days on CRAN. Often this indicates that the package is currently not sufficiently actively maintained and should be excluded from the task view.
Alternatively, you might also consider reaching out to the authors of the package and encourage (or even help) them to bring the package back to CRAN. See the section on CRAN package archivals in the maintenance guidelines for more details.
In any case, the situation should be resolved in the next four weeks. If the package does not seem to be brought back to CRAN, please exclude it from the task view.
I think we should put quantitative-genetic/bioinformatic mixed model packages in their own special category. It would be nice to link to an external document specializing in this area; I don't think there's a Task View for this, don't know if there's some analogous info on Bioconductor somewhere ... ? There's a view for Statistical Methods but not a specific mixed-model category ... (we could search on Bioconductor to find out if/where our genetic/bioinformatic-type packages are listed ...)
I think Task Views generally don't include detailed bibliographic references throughout. We have a link to a Liang and Zeger paper. I think I'd like to leave out the explicit URL/link (because of fragility). OK to give only author/date and expect that users will find the right reference ... ?
Should we mention these in the taskview? I'm only aware of two pieces of software supporting it:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.