Package: INLAvaan 0.2.5.9002

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.2.5.9002.tar.gz
INLAvaan_0.2.5.9002.zip(r-4.7)INLAvaan_0.2.5.9002.zip(r-4.6)INLAvaan_0.2.5.9002.zip(r-4.5)
INLAvaan_0.2.5.9002.tgz(r-4.6-any)INLAvaan_0.2.5.9002.tgz(r-4.5-any)
INLAvaan_0.2.5.9002.tar.gz(r-4.7-any)INLAvaan_0.2.5.9002.tar.gz(r-4.6-any)
INLAvaan_0.2.5.9002.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

6.65 score 14 stars 20 scripts 206 downloads 35 exports 7 dependencies

Last updated from:256b9476f5. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK383
source / vignettesOK218
linux-release-x86_64OK378
macos-release-arm64OK309
macos-oldrel-arm64OK250
windows-develOK354
windows-releaseOK299
windows-oldrelOK344
wasm-releaseOK144

Exports:acfaadd_looagrowthas_fun_stringasembfit_indicescoefcomparedbeta_boxdiagnosticsdsnormfit_skew_normalfit_skew_normal_sampfitmeasuresfitMeasuresget_inlavaan_internalinlavaanis_same_functionloonobsplotpredictpriors_forqsnorm_fastsamplingshowsimulatestandardisedsolutionstandardisedSolutionstandardizedsolutionstandardizedSolutionsummarytimingvcovwaic

Dependencies:clilavaanMASSmnormtnumDerivpbivnormquadprog

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

Last update: 2026-04-02
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 INLAvaancompare compare,INLAvaan-method
Density of a Beta distribution on a bounded intervaldbeta_box
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
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
Approximate Leave-One-Out Cross-Validation for INLAvaan Modelsadd_loo loo loo.INLAvaan loo.inlavaan_internal
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
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
Variance-Covariance Matrix for INLAvaan Modelsvcov vcov,INLAvaan-method
Widely Applicable Information Criterion for INLAvaan Modelswaic waic.INLAvaan waic.inlavaan_internal