Learn R Programming

lava (version 1.4.7)

kill: Remove variables from (model) object.

Description

Generic method for removing elements of object

Usage

kill(x, ...) <- value

Arguments

x
Model object
value
Vector of variables or formula specifying which nodes to remove
...
additional arguments to lower level functions

See Also

cancel

Examples

Run this code

m <- lvm()
addvar(m) <- ~y1+y2+x
covariance(m) <- y1~y2
regression(m) <- c(y1,y2) ~ x
### Cancel the covariance between the residuals of y1 and y2
cancel(m) <- y1~y2
### Remove y2 from the model
rmvar(m) <- ~y2

Run the code above in your browser using DataLab