Some Latent Variable Models

Includes some procedures for latent variable modeling with a particular focus on multilevel data. The 'LAM' package contains mean and covariance structure modelling for multivariate normally distributed data (mlnormal(); Longford, 1987; ), a general Metropolis-Hastings algorithm (amh(); Roberts & Rosenthal, 2001, ) and penalized maximum likelihood estimation (pmle(); Cole, Chu & Greenland, 2014; ).

Some Latent Variable Models

If you use LAM and have suggestions for improvement or have found bugs, please email me at [email protected].

CRAN version

The official version of LAM is hosted on CRAN and may be found here. The CRAN version can be installed from within R using:


GitHub version

The version hosted here is the development version of LAM. The GitHub version can be installed using devtools as:





Some Latent Variable Models (LAM) A. Robitzsch

/\ \ /\ __ \ /\ "-./ \
\ \ ____ \ \ __ \ \ \ -./\ \
\ _\ \ _\ _\ \ _\ \ _\ /_____/ //// // //


Alexander Robitzsch [email protected]

For reporting a bug, please always provide a reproducible R script and (if necessary) a corresponding dataset.


VERSIONS LAM 0.3 | 2018-06-06 | Last: LAM 0.3-48

ADDED * included Rcpp implementations for loglike_mvnorm() and loglike_mvnorm_NA_pattern() functions NOTE * optimization function stats::nlminb() can be used in the pmle() function as an alternative to stats::optim() NOTE * added 'numDeriv' package to the list of imported packages NOTE * included argument 'proposal_equal' in amh() NOTE * set the argument 'prior=NULL' as the default in pmle() ADDED * included argument 'model_grad' in pmle() which allows the specification of the gradient of the log-likelihood function

DATA * included/modified datasets: --- EXAMP * included/modified examples: amh (1)

VERSIONS LAM 0.2 | 2018-03-20 | Last: LAM 0.2-9

ADDED * included function suff_stat_NA_pattern() which computes sufficient statistics for a given dataset with missing response patterns ADDED * included function loglike_mvnorm_NA_pattern() which computed the multivariate normal log-likelihood for data with missing response patterns NOTE * fixed a problem with only one phase for tuning proposal distribution

DATA * included/modified datasets: --- EXAMP * included/modified examples: suff_stat_NA_pattern (1), loglike_mvnorm (2)

VERSIONS LAM 0.1 | 2017-11-24 | Last: LAM 0.1-22

NOTE * added Example 3 in amh() which was transferred from the 'STARTS' package to the 'LAM' package

DATA * included/modified datasets: --- EXAMP * included/modified examples: amh (3)

VERSIONS LAM 0.0 | 2017-05-11 | Last: LAM 0.0-17

ADDED * moved amh(), loglike_mvnorm(), mlnormal() and pmle() functions from 'sirt' package to 'LAM' package NOTE * included value acceptance_rates_history() in amh() containing acceptance rates of parameters during burn-in phase

DATA * included/modified datasets: --- EXAMP * included/modified examples: ---

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.3-48 by Alexander Robitzsch, 8 months ago

Browse source code at

Authors: Alexander Robitzsch [aut,cre]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports CDM, coda, graphics, MASS, numDeriv, Rcpp, sirt, stats, TAM, utils

Suggests lavaan, lme4, STARTS

Linking to Rcpp, RcppArmadillo

Imported by STARTS.

See at CRAN