LMMELSM0.2.1 package

Fit Latent Multivariate Mixed Effects Location Scale Models

coef.lmmelsm

Extract group-specific coefficients.

dot-add_group_codings

Adds group codings for predictive df.

dot-combine_RHS

Combines multiple formulas' RHS into one.

dot-detect_L2_only

Detect whether the predictors are L2-only

dot-full_to_lower_tri

Get indices for subsetting lower-tri summaries of square matrices.

dot-get_elapsed_time

Gets elapsed time.

dot-get_formula_names

Get names in formula.

dot-get_indicator_spec

Get indicator spec for stan model.

dot-get_LHS

Get LHS variable as string.

dot-get_RHS

Get RHS terms or variables.

dot-list_zip

Zip two lists together with function.

dot-magicsep

Convert char vector to columns.

dot-newline

Print newline.

dot-pars_to_indices

Convert stan par-string to numeric columns.

dot-parse_formula.indicators

Compute indicator data.

dot-parse_formula.predictor

Compute predictor data.

dot-parse_formula

Convert spec to stan data.

dot-sep

Print separator.

dot-simulate.X

Simulate covariates without correlation.

dot-summarize

Compute posterior summaries.

dot-summary_rearrange

Rearrange summary output.

dot-tidy_summary

Takes stan summary, returns summary with indices-as-columns.

dot-which_location_scale

Check for location-scale formulas

fitted.lmmelsm

Extracted model fitted variates.

grapes-IfNull-grapes

Operator for testing NULL and returning expr if NULL

LMMELSM-package

The 'LMMELSM' package.

lmmelsm

Specify and fit the (latent) (multivariate) melsm.

loo.lmmelsm

loo method for LMMELSM objects.

nlist

Creates named list.

predict.lmmelsm

Predict method for lmmelsm objects.

print.lmmelsm

Print method for lmmelsm objects.

print.summary.lmmelsm

Print method for summary.lmmelsm objects.

ranef.lmmelsm

Extract random effects.

row_multiply_list_mats

Multiply a row by a list of matrices

simulate_lmmelsm

Simulate data from latent uni/multidimensional MELSM

summary.lmmelsm

Summary method for lmmelsm objects.

In addition to modeling the expectation (location) of an outcome, mixed effects location scale models (MELSMs) include submodels on the variance components (scales) directly. This allows models on the within-group variance with mixed effects, and between-group variances with fixed effects. The MELSM can be used to model volatility, intraindividual variance, uncertainty, measurement error variance, and more. Multivariate MELSMs (MMELSMs) extend the model to include multiple correlated outcomes, and therefore multiple locations and scales. The latent multivariate MELSM (LMMELSM) further includes multiple correlated latent variables as outcomes. This package implements two-level mixed effects location scale models on multiple observed or latent outcomes, and between-group variance modeling. Williams, Martin, Liu, and Rast (2020) <doi:10.1027/1015-5759/a000624>. Hedeker, Mermelstein, and Demirtas (2008) <doi:10.1111/j.1541-0420.2007.00924.x>.

  • Maintainer: Stephen Martin
  • License: MIT + file LICENSE
  • Last published: 2025-05-04