File: modelsearch.Rd

package info (click to toggle)
r-cran-lava 1.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,816 kB
  • sloc: sh: 13; makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,307 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modelsearch.R
\name{modelsearch}
\alias{modelsearch}
\title{Model searching}
\usage{
modelsearch(x, k = 1, dir = "forward", type = "all", ...)
}
\arguments{
\item{x}{\code{lvmfit}-object}

\item{k}{Number of parameters to test simultaneously. For \code{equivalence}
the number of additional associations to be added instead of \code{rel}.}

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

\item{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)}

\item{...}{Additional arguments to be passed to the low level functions}
}
\value{
Matrix of test-statistics and p-values
}
\description{
Performs Wald or score tests
}
\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")
}
\seealso{
\code{\link{compare}}, \code{\link{equivalence}}
}
\author{
Klaus K. Holst
}
\keyword{htest}