Learn R Programming

⚠️There's a newer version (1.8.1) of this package.Take me there.

lava (version 1.6.4)

Latent Variable Models

Description

A general implementation of Structural Equation Models with latent variables (MLE, 2SLS, and composite likelihood estimators) with both continuous, censored, and ordinal outcomes (Holst and Budtz-Joergensen (2013) ). Mixture latent variable models and non-linear latent variable models (Holst and Budtz-Joergensen (2018) ). The package also provides methods for graph exploration (d-separation, back-door criterion), simulation of general non-linear latent variable models, and estimation of influence functions for a broad range of statistical models.

Copy Link

Version

Install

install.packages('lava')

Monthly Downloads

163,136

Version

1.6.4

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Klaus Holst

Last Published

November 25th, 2018

Functions in lava (1.6.4)

confpred

Conformal prediction
Model

Extract model
ordinal<-

Define variables as ordinal
getMplus

Read Mplus output
Combine

Report estimates across different models
Expand

Create a Data Frame from All Combinations of Factors
blockdiag

Combine matrices to block diagonal structure
bmd

Longitudinal Bone Mineral Density Data (Wide format)
bmidata

Data
brisa

Simulated data
calcium

Longitudinal Bone Mineral Density Data
NA2x

Convert to/from NA
compare

Statistical tests
complik

Composite Likelihood for probit latent variable models
curly

Adds curly brackets to plot
cv

Cross-validation
mixture

Estimate mixture latent variable model.
Missing

Missing value generator
hubble2

Hubble data
binomial.rd

Define constant risk difference or relative risk association for binary exposure
parpos

Generic method for finding indeces of model parameters
estimate.lvm

Estimation of parameters in a Latent Variable Model (lvm)
click

Identify points on plot
trim

Trim tring of (leading/trailing/all) white spaces
iid

Extract i.i.d. decomposition (influence function) from model object
closed.testing

Closed testing procedure
estimate.default

Estimation of functional of parameters
confband

Add Confidence limits bar to plot
bootstrap

Generic bootstrap method
Graph

Extract graph
constrain<-

Add non-linear constraints to latent variable model
lvm

Initialize new latent variable model
gof

Extract model summaries and GOF statistics for model object
Range.lvm

Define range constraints of parameters
Grep

Finds elements in vector or column-names in data.frame/matrix
plotConf

Plot regression lines
makemissing

Create random missing data
nldata

Example data (nonlinear model)
backdoor

Backdoor criterion
NR

Newton-Raphson method
baptize

Label elements of object
labels<-

Define labels of graph
colorbar

Add color-bar to plot
nsem

Example SEM data (nonlinear)
hubble

Hubble data
path

Extract pathways in model graph
addvar

Add variable to (model) object
devcoords

Returns device-coordinates and plot-region
bootstrap.lvm

Calculate bootstrap estimates of a lvm object
diagtest

Calculate diagnostic tests for 2x2 table
pcor

Polychoric correlation
revdiag

Create/extract 'reverse'-diagonal matrix or off-diagonal elements
commutation

Finds the unique commutation matrix
rmvar

Remove variables from (model) object.
confint.lvmfit

Calculate confidence limits for parameters
contr

Create contrast matrix
By

Apply a Function to a Data Frame Split by Factors
predictlvm

Predict function for latent variable models
correlation

Generic method for extracting correlation coefficients of model object
ksmooth2

Plot/estimate surface
summary.sim

Summary method for 'sim' objects
dsep.lvm

Check d-separation criterion
serotonin

Serotonin data
Col

Generate a transparent RGB color
modelsearch

Model searching
getSAS

Read SAS output
ordreg

Univariate cumulative link regression models
predict.lvm

Prediction in structural equation models
timedep

Time-dependent parameters
sim.default

Wrapper function for mclapply
twindata

Twin menarche data
equivalence

Identify candidates of equivalent models
wrapvec

Wrap vector
intercept

Fix mean parameters in 'lvm'-object
Org

Convert object to ascii suitable for org-mode
semdata

Example SEM data
wkm

Weighted K-means
regression<-

Add regression association to latent variable model
twostageCV

Cross-validated two-stage estimator
PD

Dose response calculation for binomial regression models
partialcor

Calculate partial correlations
startvalues

For internal use
measurement.error

Two-stage (non-linear) measurement error
stack.estimate

Stack estimating equations
missingdata

Missing data example
multinomial

Estimate probabilities in contingency table
cancel

Generic cancel method
subset.lvm

Extract subset of latent variable model
children

Extract children or parent elements of object
spaghetti

Spaghetti plot
covariance

Add covariance structure to Latent Variable Model
vars

Extract variable names from latent variable model
csplit

Split data into folds
eventTime

Add an observed event time outcome to a latent variable model.
fplot

fplot
images

Organize several image calls (for visualizing categorical data)
indoorenv

Data
lava-package

Estimation and simulation of latent variable models
lava.options

Set global options for lava
%++%

Concatenation operator
%ni%

Matching operator (x not in y) oposed to the %in%-operator (x in y)
plot.lvm

Plot path diagram
scheffe

Calculate simultaneous confidence limits by Scheffe's method
rotate2

Performs a rotation in the plane
toformula

Converts strings to formula
plot.sim

Plot method for simulation 'sim' objects
tr

Trace operator
mvnmix

Estimate mixture latent variable model
pdfconvert

Convert pdf to raster format
vec

vec operator
plot.estimate

Plot method for 'estimate' objects
wait

Wait for user input (keyboard or mouse)
serotonin2

Data
twostage

Two-stage estimator
sim

Simulate model
zibreg

Regression model for binomial data with unkown group of immortals
twostage.lvmfit

Two-stage estimator (non-linear SEM)