Description Usage Arguments Author(s) Examples
Plot empirical (KM) and model-specific cumulative distribution function of standardized residuals
1 2 3 |
x |
Model, |
var |
Character vector of (endogenous) variable names |
ylab |
Label of x-axis |
xlab |
Label of y-axis |
main |
Title of plot |
k |
Optional group number for multiple group analysis |
... |
Additional argument |
Klaus K. Holst
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
## Simulate data where (y01,y2)
## follows conditional bivariate normal distribution
## given covariate x. Instead of y01 we observe
## right censored version y2
n <- 200
m <- lvm(c(y01,y2) ~ x)
covariance(m) <- y01~y2
set.seed(1)
d <- sim(m,n)
d$cens1 <- rexp(n)
d$status1 <- with(d,y01<cens1)
d$y1 <- with(d, pmin(y01,cens1))
## Estimate model parameters
d$S1 <- with(d, Surv(y1,status1))
m <- lvm(c(S1,y2)~x); covariance(m) <- S1~y2
e <- estimate(m,d,control=list(trace=1))
## Plot cumulative distribution functions
par(mfrow=c(2,2)); plotres(e); plot(e)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.