Description Usage Arguments Value Author(s) See Also Examples
Predict life expectancies from an object of class idm
. Life
expectancies are calculated at time s
for a subject who has the
covariates values Z01, Z02, Z12. Confidence intervals are calculated.
1 |
x |
an object as returned by a call to the |
s |
time at prediction. |
Z01 |
vector for the values of the covariates on the transition 0 –> 1 (in the same order as the covariates within the call. The default values are all 0. |
Z02 |
vector for the values of the covariates on the transition 0 –> 2 (in the same order as the covariates within the call. The default values are all 0. |
Z12 |
vector for the values of the covariates on the transition 1 –> 2 (in the same order as the covariates within the call. The default values are all 0. |
nsim |
number of simulations for the confidence intervals calculations. The default is 1000. |
CI |
boolean: with ( |
... |
others arguments. |
a list containing:
life.in.0.expectancy |
life expectancy in state 0 and confidence interval. |
life.expectancy.nondis |
life expectancy of a non-diseased subject and confidence interval. |
life.expectancy.dis |
life expectancy of a diseased subject and confidence interval. |
C. Touraine
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 | ## Not run:
library(lava)
library(prodlim)
set.seed(17)
d <- simulateIDM(100)
table(d$seen.ill,d$seen.exit)
fitIC <- idm(formula01=Hist(time=list(L,R),event=seen.ill)~X1+X2,
formula02=Hist(time=observed.lifetime,event=seen.exit)~X1+X2,
formula12=Hist(time=observed.lifetime,event=seen.exit)~X1+X2,data=d,
conf.int=FALSE)
try(lifexpect(fitIC,s=10),silent=TRUE)
data(Paq1000)
fit <- idm(formula02=prodlim::Hist(time=t,event=death,entry=e)~certif,
formula01=prodlim::Hist(time=list(l,r),event=dementia)~certif,
method="Splines",
data=Paq1000,
conf.int=FALSE)
pred <- lifexpect(fit,s=70,t=80,Z01=c(1),Z02=c(1),Z12=c(1))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.