LMMELSM

R Package for fitting latent multivariate mixed effects location scale models.

https://github.com/stephensrmmartin/lmmelsm

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary

Keywords

bayesian mixed-effects multilevel-models stan statistics
Last synced: 6 months ago · JSON representation

Repository

R Package for fitting latent multivariate mixed effects location scale models.

Basic Info
  • Host: GitHub
  • Owner: stephensrmmartin
  • License: other
  • Language: R
  • Default Branch: master
  • Homepage:
  • Size: 726 KB
Statistics
  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • Open Issues: 1
  • Releases: 0
Topics
bayesian mixed-effects multilevel-models stan statistics
Created over 5 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License

README.md

LMMELSM

LMMELSM stands for latent, multidimensional mixed effects location scale models.

The mixed effects location scale model is a multilevel model in which both the location ($\mu$) and scale ($\sigma$) are modeled and have random effects. That is, in addition to random intercepts and coefficients, the MELSM allows variance to differ between groups, and across covariates. Within the MELSM framework, variances are meaningful, and can be directly modeled. MELSMs are useful for predicting volatility, variance, uncertainty, variation between group means, measurement error variance, and much more. As an added side effect, prediction intervals are tailored to each individual or group (differing predictive uncertainty), and fixed effects are more robust because those with less variance (more reliability) are implicitly weighted more.

LMMELSM extends the MELSM to include latent variables. Instead of predicting the expected values and variances of observed or computed variables, the LMMELSM predicts expected values and variances of multiple correlated latent factors. Assuming an adequate measurement model, the LMMELSM therefore models the variance of a reduced-error score.

LMMELSM is therefore useful for modeling conditional and group-specific latent means and variances. One such example is modeling the intraindividual variability of latent scores of a persons over time in an experience sampling methodology. Another example is modeling the heterogeneity of individuals' latent means from person-level covariates.

LMMELSM currently supports: - Observed outcomes - Latent outcomes - Single or multiple outcomes - Location modeling, with random intercepts and coefficients - Within-group scale modeling, with random intercepts and coefficients - Between-group scale modeling (on the between-group mean variances)

Installation

You can install the released version of LMMELSM from github with:

r remotes::install_github("stephensrmmartin/LMMELSM")

Example

In this example, increasingly complex MELSMs are modeled, and demonstrate the simple formula syntax. ``` r library(LMMELSM)

data(sim_data)

Intercept-only model

fit <- lmmelsm(Agreeableness ~ A1 + A2 + A3 + A4 + A5 + A6, subject, sim_data)

Random Time-varying predictor on location

fit <- lmmelsm(list(Agreeableness ~ A1 + A2 + A3 + A4 + A5 + A6, location ~ x1 | x1), subject, sim_data)

Random Time-varying predictors on both location and scale

fit <- lmmelsm(list(Agreeableness ~ A1 + A2 + A3 + A4 + A5 + A6, location ~ x1 | x1, scale ~ x2 | x2), subject, sim_data)

Time-varying predictors, person-level predictors on location, scale, and between-group variance

Multidimensional!

fit <- lmmelsm(list(Agreeableness ~ A1 + A2 + A3 + A4 + A5 + A6, Neuroticism ~ N1 + N2 + N3 + N4 + N5 + N6, location ~ x1 + baseline | x1, scale ~ x2 + baseline | x2, between ~ baseline), subject, sim_data)

Time-varying predictors, person-level predictors on location, scale, and between-group variance

fit <- lmmelsm(list(Agreeableness ~ A1 + A2 + A3 + A4 + A5 + A6, Neuroticism ~ N1 + N2 + N3 + N4 + N5 + N6, location ~ x1 + baseline | x1, scale ~ x1 + x2 + baseline | x1 + x2, between ~ baseline), subject, sim_data)

Non-latent Multivariate MELSM

fit <- lmmelsm(list(observed ~ A1 + N1, location ~ x1 + baseline|x1, scale ~ x2 + baseline|x2, between ~ baseline), subject, sim_data)

Summarize

summary(fit)

Get subject-specific random effects

ranef(fit)

Get subject-specific coefficients

coef(fit)

```

Owner

  • Name: Stephen Martin
  • Login: stephensrmmartin
  • Kind: user
  • Location: Davis, CA
  • Company: comScore

Statistics. Data science. Bayesian nerd. Probabilistic Machine learning. Psychometrics.

GitHub Events

Total
  • Issue comment event: 1
  • Push event: 4
  • Pull request event: 1
  • Pull request review event: 1
  • Create event: 1
Last Year
  • Issue comment event: 1
  • Push event: 4
  • Pull request event: 1
  • Pull request review event: 1
  • Create event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 246
  • Total Committers: 2
  • Avg Commits per committer: 123.0
  • Development Distribution Score (DDS): 0.069
Top Committers
Name Email Commits
Stephen Martin s****n@g****m 229
Stephen R. Martin s****n@g****m 17

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: over 1 year
  • Total issue authors: 1
  • Total pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 2.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • madelinecraft (1)
Pull Request Authors
  • andrjohns (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • cran 571 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
cran.r-project.org: LMMELSM

Fit Latent Multivariate Mixed Effects Location Scale Models

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 571 Last month
Rankings
Forks count: 21.9%
Stargazers count: 28.5%
Dependent packages count: 29.8%
Average: 35.5%
Dependent repos count: 35.5%
Downloads: 61.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • R >= 3.4.0 depends
  • Formula >= 1.2 imports
  • MASS >= 7.0 imports
  • Rcpp >= 0.12.0 imports
  • loo >= 2.3.0 imports
  • methods * imports
  • nlme >= 3.0 imports
  • parallel >= 3.6.0 imports
  • rstan >= 2.18.1 imports
  • rstantools >= 2.0.0 imports
  • testthat * suggests