Description Details Author(s) Examples
Framwork for estimating parameters and simulate data from Latent Variable
Models with binary and censored observations. Plugin for the lava
package
Package: | lava.tobit |
Type: | Package |
Version: | 0.4-5 |
Date: | 2012-03-15 |
License: | GPL-3 |
LazyLoad: | yes |
Klaus K. Holst Maintainer: <kkho@biostat.ku.dk>
1 2 3 4 5 6 7 8 9 10 11 12 | library('lava.tobit')
m <- lvm(list(c(y,z) ~ x, y~z))
## Simulate 200 observation from path analysis model
## with all slopes and residual variances set to 1 and intercepts 0:
d <- sim(m,200,seed=1)
## Dichotomize y and introduce censoring on z
d <- transform(d, y=as.factor(y>0), z=Surv(z,z<2))
## if (requireNamespace("mets",quietly=TRUE)) {
## e <- estimate(m,d,control=list(trace=1),estimator="gaussian")
## effects(e,y~x)
## }
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.