Package: galamm 0.4.0

Øystein Sørensen

galamm: Generalized Additive Latent and Mixed Models

Estimates generalized additive latent and mixed models using maximum marginal likelihood, as defined in Sorensen et al. (2023) <doi:10.1007/s11336-023-09910-z>, which is an extension of Rabe-Hesketh and Skrondal (2004)'s unifying framework for multilevel latent variable modeling <doi:10.1007/BF02295939>. Efficient computation is done using sparse matrix methods, Laplace approximation, and automatic differentiation. The framework includes generalized multilevel models with heteroscedastic residuals, mixed response types, factor loadings, smoothing splines, crossed random effects, and combinations thereof. Syntax for model formulation is close to 'lme4' (Bates et al. (2015) <doi:10.18637/jss.v067.i01>) and 'PLmixed' (Rockwood and Jeon (2019) <doi:10.1080/00273171.2018.1516541>).

Authors:Øystein Sørensen [aut, cre], Douglas Bates [ctb], Ben Bolker [ctb], Martin Maechler [ctb], Allan Leal [ctb], Fabian Scheipl [ctb], Steven Walker [ctb], Simon Wood [ctb]

galamm_0.4.0.tar.gz
galamm_0.4.0.zip(r-4.7)galamm_0.4.0.zip(r-4.6)galamm_0.4.0.zip(r-4.5)
galamm_0.4.0.tgz(r-4.6-x86_64)galamm_0.4.0.tgz(r-4.6-arm64)galamm_0.4.0.tgz(r-4.5-x86_64)galamm_0.4.0.tgz(r-4.5-arm64)
galamm_0.4.0.tar.gz(r-4.7-arm64)galamm_0.4.0.tar.gz(r-4.7-x86_64)galamm_0.4.0.tar.gz(r-4.6-arm64)galamm_0.4.0.tar.gz(r-4.6-x86_64)
galamm_0.4.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION
card.svg |card.png
galamm/json (API)

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

Bug tracker:https://github.com/lcbc-uio/galamm/issues

Pkgdown/docs site:https://lcbc-uio.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • cognition - Simulated Data with Measurements of Cognitive Abilities
  • diet - Diet Data
  • epilep - Epilepsy Data
  • hsced - Example Data with Heteroscedastic Residuals
  • latent_covariates - Simulated Data with Latent and Observed Covariates Interaction
  • latent_covariates_long - Simulated Longitudinal Data with Latent and Observed Covariates Interaction
  • lifespan - Simulated Dataset with Lifespan Trajectories of Three Cognitive Domains
  • mresp - Simulated Mixed Response Data
  • mresp_hsced - Simulated Mixed Response Data with Heteroscedastic Residuals

On CRAN:

Conda:

generalized-additive-modelshierarchical-modelsitem-response-theorylatent-variable-modelsstructural-equation-modelscpp

7.76 score 34 stars 42 scripts 633 downloads 18 exports 56 dependencies

Last updated from:e9e27fcb66. Checks:13 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-arm64OK254
linux-devel-x86_64OK260
source / vignettesOK279
linux-release-arm64OK232
linux-release-x86_64OK243
macos-release-arm64OK206
macos-release-x86_64OK545
macos-oldrel-arm64OK169
macos-oldrel-x86_64OK415
windows-develOK211
windows-releaseOK228
windows-oldrelOK230
wasm-releaseOK175

Exports:appraisederivativesdrawextract_optim_parametersfactor_loadingsfixefgalammgalamm_controlgfamplot_smoothqqmathranefresponsesslt2t2lVarCorr

Dependencies:BHbootcachemclicpp11dplyrfarverfastmapgenericsggokabeitoggplot2gluegratiagtableisobandlabelinglatticelifecyclelme4magrittrMASSMatrixmemoisemgcvminqamiraimvnfastnanonextnlmenloptrpatchworkpillarpkgconfigpurrrR6rbibutilsRColorBrewerRcppRcppArmadilloRcppEigenRdpackreformulasrlangS7scalesstatmodstringistringrtibbletidyrtidyselecttweedieutf8vctrsviridisLitewithr

Generalized Linear Mixed Models with Factor Structures
Model with Binomially Distributed Responses | Binomial Model with Multiple Trials | Model with Poisson Distributed Responses | References

Last update: 2025-12-21
Started: 2023-08-11

Heteroscedastic Linear Mixed Models
Group-Wise Heteroscedasticity | References

Last update: 2025-12-21
Started: 2023-08-13

Models with Mixed Response Types
Mixed Normal and Binomial Response | Mixed Response and Heteroscedastic Residuals | Covariate Measurement Error Model | Structural Model | Measurement Model | Disease Model | Nonlinear Predictor | Estimating the Model with galamm | Comparison to a Model with Indirect Effect Only | References

Last update: 2025-12-21
Started: 2023-08-13

Posterior Sampling
Confidence intervals for extrema of a smooth function | References

Last update: 2025-12-21
Started: 2025-12-10

Semiparametric Latent Variable Modeling
Generalized Additive Mixed Models | Gaussian Responses | Binomial Responses | Generalized Additive Models with Factor Structures | Smooth Terms with Loadings and Factor Interactions | Mixed Gaussian and Binomial Responses | References

Last update: 2025-12-21
Started: 2023-08-14

Interactions Between Latent and Observed Covariates
Linear Mixed Model with Latent Covariates | Model Formulation | $$\begin | Model Without Interaction | Linear Interaction Between Observed and Latent Covariates | Interaction Between Latent Covariate and a Quadratic Term | Models with Additional Random Effects | Model with Smooth Terms | References

Last update: 2025-11-28
Started: 2023-09-25

Linear Mixed Models with Factor Structures
Crossed Random Effects Model with Persistence Parameters | $$\begin | Multi-Trait Multi-Rater Model | $$\begin | $$\begin | References

Last update: 2025-11-28
Started: 2023-08-11

Optimization
High-Level Overview | Modifying the L-BFGS-B algorithm | Optimization with the Nelder-Mead algorithm | Implementation Details | Future Improvements | References

Last update: 2025-11-25
Started: 2023-08-14

Computational Scaling
Linear Mixed Models with Factor Structures | Model with Group-Wise Heteroscedasticity | Generalized Linear Mixed Models with Factor Structures | Semiparametric Model with Gaussian Responses | Semiparametric Model with Binomial Responses | Conclusion | References

Last update: 2025-09-28
Started: 2023-10-16

Introduction
Generalized Additive Latent and Mixed Models | Response Model | Nonlinear Predictor | Structural Model | Mixed Model Representation | Maximum Marginal Likelihood Estimation | Evaluating the Marginal Likelihood | Maximizing the Marginal Likelihood | Example Models | References

Last update: 2024-09-16
Started: 2023-08-15

Readme and manuals

Help Manual

Help pageTopics
Compare likelihoods of galamm objectsanova.galamm
Gratia style model diagnostic plotsappraise appraise.galamm
Extract galamm coefficientscoef.galamm
Simulated Data with Measurements of Cognitive Abilitiescognition
Confidence intervals for model parametersconfint.galamm
Derivatives of estimated smooth via finite differencesderivatives derivatives.galamm
Extract deviance of galamm objectdeviance.galamm
Diet Datadiet
Draw method for galamm objectsdraw draw.galamm
Epilepsy Dataepilep
Extract parameters from fitted model for use as initial valuesextract_optim_parameters extract_optim_parameters.galamm
Extract factor loadings from galamm objectfactor_loadings factor_loadings.galamm
Extract family or families from fitted galammfamily.galamm
Extract model fitted valuesfitted.galamm
Extract fixed effects from galamm objectsfixef fixef.galamm
Extract formula from fitted galamm objectformula.galamm
Fit a generalized additive latent and mixed modelgalamm
Control values for galamm fitgalamm_control
Class "galamm"galammObject
Grouped familiesgfam
Example Data with Heteroscedastic Residualshsced
Simulated Data with Latent and Observed Covariates Interactionlatent_covariates
Simulated Longitudinal Data with Latent and Observed Covariates Interactionlatent_covariates_long
Simulated Dataset with Lifespan Trajectories of Three Cognitive Domainslifespan
Extract Log-Likelihood of galamm ObjectlogLik.galamm
Extract the model frame from a galamm objectmodel.frame.galamm
Simulated Mixed Response Datamresp
Simulated Mixed Response Data with Heteroscedastic Residualsmresp_hsced
Extract the Number of Observations from a galamm Fitnobs.galamm
Plot smooth terms for galamm fitsplot_smooth plot_smooth.galamm
Diagnostic plots for galamm objectsplot.galamm
Predictions from a model at new data valuespredict.galamm
Print method for GALAMM fitsprint.galamm
Print method for summary GALAMM fitsprint.summary.galamm
Print method for variance-covariance objectsprint.VarCorr.galamm
Quantile-quantile plots for galamm objectsqqmath qqmath.galamm
Extract random effects from galamm object.ranef ranef.galamm
Residuals of galamm objectsresiduals.galamm
Extract response valuesresponse
Set up smooth term with factor loadings sl
Extract square root of dispersion parameter from galamm objectsigma.galamm
Summarizing GALAMM fitssummary.galamm
Set up smooth term with factor loadingt2 t2l
Extract variance and correlation components from modelVarCorr VarCorr.galamm
Calculate variance-covariance matrix for GALAMM fitvcov.galamm