Giter VIP home page Giter VIP logo

mixedmodels's People

Contributors

bbolker avatar emitanaka avatar jpiaskowski avatar kwstat avatar mattfidler avatar mthulin avatar palday avatar strengejacke avatar thierryo avatar wviechtb avatar zeileis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

mixedmodels's Issues

rr2 package

somewhat limited in scope, but offers additional R^2 choices

Package suggestions: `phylolm` & `sommer`

Thanks so much for adding this task view!

2 possible additions:

  1. phylolm under "Specialized models: Phylogenetic models"
  2. sommer, possibly would fit best under "Specialized models: Kinship-augmented models"

What are the core packages

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' has been archived on CRAN for more than 60 days

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.

migrate kinship-augmented models

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 'mlmmm' has been archived on CRAN for more than 60 days

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.

Package 'BMTME' has been archived on CRAN for more than 60 days

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.

Proposals for the Generalized estimating equations section: glmtoolbox, MIIPW, CRTgeeDR, drgee, geeCRT

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.

  1. unlike geepack (no new features, no bug fixes, frozen/zombie state), glmtoolbox it's actively developed. Only it's a pity it lacks a GitHub repo, which would facilitate reporting issues a lot. Maybe you could try to convince prof. Vanegas to share it on GitHub well?
  2. unlike geepack, it doesn't crash (prints informative warning) when the unstructured cov. is combined with waves (useful when analysing longitudinal data with missing visits)
  3. supports more covariance structures than any other package
  4. provides leverage, local.influence, DFBETA and Cook's distance out of the box
  5. offers model-comparison based anova through Wald's and generalized score tests.
  6. unlike geepack, it well supports IPW (inverse-probability) weighting for dropouts out of the box (one has to specify the model for MAR dropouts), no need to play separately with the ipw package. Works on both observation and cluster level.
  7. offers a module for non-linear GEE
  8. predict() is available
  9. QIC and RJC (Rotnitzky-Jewell's) criterion out of the box
  10. Mahalanobis', Pearson's and deviance residuals
  11. forward/backward stepwise variable selection
  12. various var.cov estimators are available: robust (Sandwich), df-adjusted, model (naive), bias-corrected (small-sample Mancl-DeRouen) and jackknife.
  13. gives results consistent with other packages (only minor discrepancies)
  14. It well integrates with emmeans via qdrg(), so advanced contrasts over LS-means can be tested, also with MVT adjustment.

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).

add simulation pkgs to power-analysis section?

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), ... ?

Specialized Models section

I'm working on the specialized models section and here are some proposed changes. Please weigh in.

  1. should we order this section alphabetically?
  2. for the pedigree models (in which there is considerably more than what is listed) should we reference the ag task view instead? I also would also call this "kinship/pedigree models".
  3. Can we change "penalised models" to "regularized models" since glmm also can be considered penalised?
  4. I'd like to remove mention of MICE and reference the missing data task view. It seems like the focus should be packages whose primary purpose is mixed models.
  5. I don't think the section for "large data sets" is needed unless we want to establish clear criteria for what belongs to that.
  6. I'd like to rename "longitudinal data" to "repeated measures". It seems to me that many packages have functions for this (too many to list?) so maybe focus on the packages that have more options (e.g. 'nlme')
  7. can we made lavaan a core package since that is thee package for SEM?
  8. I'd like to move lmeNB to "generalized linear models" since it runs a negative binomial for its primary functionality - sound okay?

there's a few other changes (minor edits, packages to add), but it would easier for you to review those after I add them.

Package suggestion: regress

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.

Package 'Phxnlme' has been archived on CRAN for more than 60 days

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.

Packages mlmtools and mind

Package mlmtools definitely seems relevant, although it provides a bit of a mix of different things (e.g., some pre-processing stuff, $R^2$, some visualizations, some model assumption checks), so not quite sure where it would fit. We also don't have anything related to visualization in the first place. Maybe Model diagnostics and summary statistics could be expanded to Model diagnostics, summary statistics, and visualization.

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.

submission plan/release-critical tasks?

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.)

Package 'clusterPower' has been archived on CRAN for more than 60 days

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.

"Repeated Measures" subsection created - help needed

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 brms to multi-trait models?

right now we have

Multi-trait analysis: (multiple dependent variables) BMTME, MCMCglmm, MegaLMM

We should

  • add brms
  • indicate which of these packages can do multi-type models (i.e. multivariate responses with different conditional marginal distributions for different outputs)
  • maybe also add that many flexible (G)LMM packages can do multi-trait analysis by 'melting' data into long format; e.g. example here (is there a better/more canonical reference for these, e.g. a package vignette somewhere?)

Suggested package to add (glmmrBase, glmmrOptim)

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:

  • Frequentist model fitting using Markov chain monte carlo Maximum likelihood and also Laplace approximation. The MCMC part of the maximum likelihood algorithms uses either Stan or the in-built HMC sampler (Stan much better though!)
  • Currently a range of models and link functions. Random effects structures include exchangeable, autoregressive/exponential, matern (and associated functions), some compactly supported functions for inducing sparsity. The next version will also include nearest neighbour Gaussian process approximation covariance. Families are Gaussian, Binomial, Poisson, Beta, and Gamma. It also supports non-linear fixed effect specifications using a first-order approximation with autodifferentiation. I'm planning to add further models in future versions including splines.
  • The R package includes a large number of functions providing access to various calculations and matrices to support other applications (e.g. information matrices, gradient and likelihood calculations). It's built on R6 object orientated classes on R side. It also provides power calculations and similar.
  • It provides some different standard errors including GLS, robust sandwich estimator, and the Kenward-Roger correction.
  • There is currently another dependent package on CRAN (glmmrOptim ) that has several (c-)optimal design algorithms based on GLMMs. The main library is header only in glmmrBase to help importing into other projects (for example, it is used in this online randomised trial designer). I'll push an update to another package soon that estimates log Gaussian cox processes using the GLMM functionality and the Gaussian process approximations above.

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.

new package suggestion: mmrm

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).

CTVsuggest

(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.

Some suggestions (location-scale models, missing values, mbest, and information-theoretic methods)

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.

bioinformatic stuff?

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 ...)

bibliographic references?

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 ... ?

general machinery?

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?

list of packages to watch/exclude

Consider adding to the repo, in some sensible format:

  • a list of archived or not-yet-on-CRAN packages to watch/check periodically for (re)inclusion
  • a list of packages that we decide are out of scope, with brief justification (so that this is documented and doesn't need to be rediscovered if someone asks why the package isn't included)

(doubly) hierarchical GLMs

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).

scope for panel data models

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.