Learn R Programming

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

lava (version 1.6.2)

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 (two-stage)... 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

131,508

Version

1.6.2

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Klaus Holst

Last Published

July 2nd, 2018

Functions in lava (1.6.2)

Org

Convert object to ascii suitable for org-mode
intercept

Fix mean parameters in 'lvm'-object
addvar

Add variable to (model) object
backdoor

Backdoor criterion
images

Organize several image calls (for visualizing categorical data)
fplot

fplot
children

Extract children or parent elements of object
Range.lvm

Define range constraints of parameters
confpred

Conformal prediction
cancel

Generic cancel method
calcium

Longitudinal Bone Mineral Density Data
eventTime

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

Remove variables from (model) object.
indoorenv

Data
%ni%

Matching operator (x not in y) oposed to the %in%-operator (x in y)
getMplus

Read Mplus output
parpos

Generic method for finding indeces of model parameters
startvalues

For internal use
lava-package

Estimation and simulation of latent variable models
devcoords

Returns device-coordinates and plot-region
commutation

Finds the unique commutation matrix
curly

Adds curly brackets to plot
Model

Extract model
diagtest

Calculate diagnostic tests for 2x2 table
plot.estimate

Plot method for 'estimate' objects
csplit

Split data into folds
covariance

Add covariance structure to Latent Variable Model
partialcor

Calculate partial correlations
plotConf

Plot regression lines
path

Extract pathways in model graph
baptize

Label elements of object
plot.lvm

Plot path diagram
tr

Trace operator
labels<-

Define labels of graph
gof

Extract model summaries and GOF statistics for model object
ksmooth2

Plot/estimate surface
km

Weighted K-means
modelsearch

Model searching
bmd

Longitudinal Bone Mineral Density Data (Wide format)
cv

Cross-validation
rotate2

Performs a rotation in the plane
predict.lvm

Prediction in structural equation models
multinomial

Estimate probabilities in contingency table
regression<-

Add regression association to latent variable model
bmidata

Data
getSAS

Read SAS output
timedep

Time-dependent parameters
toformula

Converts strings to formula
ordreg

Univariate cumulative link regression models
zibreg

Regression model for binomial data with unkown group of immortals
sim

Simulate model
plot.sim

Plot method for simulation 'sim' objects
serotonin

Serotonin data
spaghetti

Spaghetti plot
serotonin2

Data
blockdiag

Combine matrices to block diagonal structure
trim

Trim tring of (leading/trailing/all) white spaces
stack.estimate

Stack estimating equations
vars

Extract variable names from latent variable model
confband

Add Confidence limits bar to plot
makemissing

Create random missing data
measurement.error

Two-stage (non-linear) measurement error
click

Identify points on plot
correlation

Generic method for extracting correlation coefficients of model object
contr

Create contrast matrix
closed.testing

Closed testing procedure
lvm

Initialize new latent variable model
confint.lvmfit

Calculate confidence limits for parameters
%++%

Concatenation operator
ordinal<-

Define variables as ordinal
pdfconvert

Convert pdf to raster format
dsep.lvm

Check d-separation criterion
revdiag

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

Identify candidates of equivalent models
hubble

Hubble data
twostage

Two-stage estimator
nldata

Example data (nonlinear model)
twindata

Twin menarche data
estimate.default

Estimation of functional of parameters
wait

Wait for user input (keyboard or mouse)
vec

vec operator
estimate.lvm

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

Hubble data
wrapvec

Wrap vector
lava.options

Set global options for lava
summary.sim

Summary method for 'sim' objects
missingdata

Missing data example
iid

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

Estimate mixture latent variable model
mixture

Estimate mixture latent variable model.
pcor

Polychoric correlation
nsem

Example SEM data (nonlinear)
subset.lvm

Extract subset of latent variable model
twostage.lvmfit

Two-stage estimator (non-linear SEM)
predictlvm

Predict function for latent variable models
sim.default

Wrapper function for mclapply
scheffe

Calculate simultaneous confidence limits by Scheffe's method
semdata

Example SEM data
twostageCV

Cross-validated two-stage estimator
Grep

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

Convert to/from NA
Combine

Report estimates across different models
Missing

Missing value generator
By

Apply a Function to a Data Frame Split by Factors
Graph

Extract graph
bootstrap

Generic bootstrap method
Expand

Create a Data Frame from All Combinations of Factors
PD

Dose response calculation for binomial regression models
Col

Generate a transparent RGB color
brisa

Simulated data
bootstrap.lvm

Calculate bootstrap estimates of a lvm object
compare

Statistical tests
constrain<-

Add non-linear constraints to latent variable model
colorbar

Add color-bar to plot
complik

Composite Likelihood for probit latent variable models