Description Usage Arguments Examples
Remove one or several variable from the linear predictors
1 2 3 | lavaReduce.remove.hook(x, var, expar = TRUE, restaure = FALSE, ...)
lavaReduce.cancel.hook(x, value, expar = TRUE, restaure = FALSE, ...)
|
x |
|
var |
the names of the variables that should be removed |
expar |
should the external parameters be also removed |
restaure |
should the link be kept while removing the linear predictor |
... |
argument passed to |
value |
the names of the variables that should be removed |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | m <- lvm()
m <- regression(m, x=paste0("x",1:10),y="y")
kill(m) <- "x7"
rm <- reduce(m, rm.exo = FALSE)
kill(rm) <- ~x6
kill(rm, value = "x1")
kill(rm, value = c("x2","x3"))
kill(rm, value = ~x4+x5)
kill(rm, value = ~LPy)
m <- lvm.reduced()
regression(m) <- y1 ~ x1+x2+x3
regression(m) <- y2 ~ z
covariance(m) <- y1 ~ y2
cancel(m) <- y1~x1+x2+x3
m
cancel(m) <- "y1 ~~ y2"
coef(m)
# see test/testthat/test-cancel.R
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.