Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

modelsearch

Model searching


Description

Performs Wald or score tests

Usage

modelsearch(x, k = 1, dir = "forward", type = "all", ...)

Arguments

x

lvmfit-object

k

Number of parameters to test simultaneously. For equivalence the number of additional associations to be added instead of rel.

dir

Direction to do model search. "forward" := add associations/arrows to model/graph (score tests), "backward" := remove associations/arrows from model/graph (wald test)

type

If equal to 'correlation' only consider score tests for covariance parameters. If equal to 'regression' go through direct effects only (default 'all' is to do both)

...

Additional arguments to be passed to the low level functions

Value

Matrix of test-statistics and p-values

Author(s)

Klaus K. Holst

See Also

Examples

m <- lvm();
regression(m) <- c(y1,y2,y3) ~ eta; latent(m) <- ~eta
regression(m) <- eta ~ x
m0 <- m; regression(m0) <- y2 ~ x
dd <- sim(m0,100)[,manifest(m0)]
e <- estimate(m,dd);
modelsearch(e,messages=0)
modelsearch(e,messages=0,type="cor")

lava

Latent Variable Models

v1.6.10
GPL-3
Authors
Klaus K. Holst [aut, cre], Brice Ozenne [ctb], Thomas Gerds [ctb]
Initial release
2021-09-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.