lvm: Initialize new latent variable model

Description Usage Arguments Value Author(s) See Also Examples

View source: R/lvm.R

Description

Function that constructs a new latent variable model object

Usage

1
lvm(x = NULL, ..., silent = lava.options()$silent)

Arguments

x

Vector of variable names. Optional but gives control of the sequence of appearance of the variables. The argument can be given as a character vector or formula, e.g. ~y1+y2 is equivalent to c("y1","y2"). Alternatively the argument can be a formula specifying a linear model.

...

Additional arguments to be passed to the low level functions

silent

Logical variable which indicates whether messages are turned on/off.

Value

Returns an object of class lvm.

Author(s)

Klaus K. Holst

See Also

regression, covariance, intercept, ...

Examples

1
2
3
4
m <- lvm() # Empty model
m1 <- lvm(y~x) # Simple linear regression
m2 <- lvm(~y1+y2) # Model with two independent variables (argument)
m3 <- lvm(list(c(y1,y2,y3)~u,u~x+z)) # SEM with three items

lava documentation built on May 2, 2019, 4:49 p.m.