Package: INLAvaan 0.3.2.9006

INLAvaan: Approximate Bayesian Latent Variable Analysis

Implements approximate Bayesian inference for Structural Equation Models (SEM) using a custom adaptation of the Integrated Nested Laplace Approximation (Rue et al., 2009) <doi:10.1111/j.1467-9868.2008.00700.x> as described in Jamil and Rue (2026a) <doi:10.48550/arXiv.2603.25690>. Provides a computationally efficient alternative to Markov Chain Monte Carlo (MCMC) for Bayesian estimation, allowing users to fit latent variable models using the 'lavaan' syntax. See also the companion paper on implementation and workflows, Jamil and Rue (2026b) <doi:10.48550/arXiv.2604.00671>.

Authors:Haziq Jamil [aut, cre, cph], Håvard Rue [ctb], Alvin Bong [ctb]

INLAvaan_0.3.2.9006.tar.gz
INLAvaan_0.3.2.9006.zip(r-4.7-any)INLAvaan_0.3.2.9006.zip(r-4.6-any)INLAvaan_0.3.2.9006.zip(r-4.5-any)
INLAvaan_0.3.2.9006.tgz(r-4.6-any)INLAvaan_0.3.2.9006.tgz(r-4.5-any)
INLAvaan_0.3.2.9006.tar.gz(r-4.7-any)INLAvaan_0.3.2.9006.tar.gz(r-4.6-any)
INLAvaan_0.3.2.9006.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
INLAvaan/json (API)

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

Bug tracker:https://github.com/haziqj/inlavaan/issues

Pkgdown/docs site:https://inlavaan.haziqj.ml

On CRAN:

Conda:

bayesian-inferencebayesian-statisticsfactor-analysisgrowth-curve-modelsinlalaplace-approximationlatent-variablespath-analysispsychometricsskew-normalstatistical-modelingstructural-equation-modelingquarto

7.02 score 14 stars 30 scripts 425 downloads 44 exports 7 dependencies

Last updated from:db52ad76f7. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK708
source / vignettesOK236
linux-releaseOK611
macos-releaseOK592
macos-oldrelOK415
windows-develOK898
windows-releaseOK894
windows-oldrelOK678
wasm-releaseOK125

Exports:acfaadd_looagrowthAICanovaas_fun_stringasembfit_indicesBICcoefcomparedbeta_boxdiagnosticsdsnormfit_skew_normalfit_skew_normal_sampfitmeasuresfitMeasuresfittedfitted.valuesget_inlavaan_internalinlavaanis_same_functionlogLikloonobsplotpredictpriors_forqsnorm_fastresidresidualssamplingshowsimulatestandardisedsolutionstandardisedSolutionstandardizedsolutionstandardizedSolutionsummarytimingupdatevcovwaic

Dependencies:clilavaanMASSmnormtnumDerivpbivnormquadprog

Introduction to INLAvaan
Introduction | Motivating example | Data | Model fit | Methods | Predictions | Predictive checks | Fit measures | Diagnostics | Plot | Model comparison | Setting priors | Dependency on R-INLA | References

Last update: 2026-09-17
Started: 2025-12-06

Mediation Analysis
Data Simulation | Model Specification and Fit | Results | References

Last update: 2026-04-02
Started: 2026-01-11

Readme and manuals

Help Manual

Help pageTopics
Fit an Approximate Bayesian Confirmatory Factor Analysis Modelacfa
Fit an Approximate Bayesian Growth Curve Modelagrowth
Convert function to single stringas_fun_string
Fit an Approximate Bayesian Structural Equation Modelasem
Bayesian Fit Indicesbfit_indices print.bfit_indices summary.bfit_indices
Compare Bayesian Models Fitted with INLAvaananova anova,INLAvaan-method compare compare,INLAvaan-method
Density of a Beta distribution on a bounded intervaldbeta_box
Deviance for INLAvaan Modelsdeviance deviance.INLAvaan
Convergence and Approximation Diagnostics for INLAvaan Modelsdiagnostics diagnostics,INLAvaan-method
The Skew Normal Distributiondsnorm
Fit a skew normal distribution to log-density evaluationsfit_skew_normal
Fit a skew normal distribution to a samplefit_skew_normal_samp
Fit Measures for a Latent Variable Model estimated using INLAfitmeasures fitMeasures,INLAvaan-method fitmeasures,INLAvaan-method
Model-Implied Moments for INLAvaan Modelsfitted fitted,INLAvaan-method fitted.values,INLAvaan-method
Extract the Internal INLAvaan Objectget_inlavaan_internal
Fit an Approximate Bayesian Latent Variable Modelinlavaan
Class For Representing a (Fitted) Latent Variable Modelcoef coef,INLAvaan-method INLAvaan-class nobs nobs,INLAvaan-method show show,INLAvaan-method summary summary,INLAvaan-method
Helper function to check if two functions are the sameis_same_function
Log-Likelihood for INLAvaan ModelsAIC,INLAvaan-method BIC,INLAvaan-method logLik logLik,INLAvaan-method
Approximate Leave-One-Out Cross-Validation for INLAvaan Modelsadd_loo loo loo.INLAvaan loo.inlavaan_internal print.inlavaan_loo summary.inlavaan_loo
Plot an INLAvaan Objectplot plot,INLAvaan,ANY-method
Posterior Predictions for INLAvaan Modelspredict predict,INLAvaan-method
Specify priors for a SEMpriors_for
Fast Approximation of Skew-Normal Quantile Functionqsnorm_fast
Model Residuals for INLAvaan Modelsresid,INLAvaan-method residuals residuals,INLAvaan-method
Draw Samples from the Generative Modelsampling sampling,INLAvaan-method
Simulate Datasets from the Generative Modelsimulate simulate,INLAvaan-method
Standardised solution of a latent variable modelstandardisedSolution standardisedsolution standardizedSolution standardizedsolution
Timing Information for INLAvaan Modelstiming timing,INLAvaan-method
Update and re-fit an INLAvaan modelupdate update,INLAvaan-method
Variance-Covariance Matrix for INLAvaan Modelsvcov vcov,INLAvaan-method
Widely Applicable Information Criterion for INLAvaan Modelsprint.inlavaan_waic summary.inlavaan_waic waic waic.INLAvaan waic.inlavaan_internal