Learn R Programming

SmoothHazard (version 1.0.9)

lifexpect.idmPl: Predictions of life expectancies from an illness-death model using a penalized likelihood approach.

Description

Predict life expectancies from an object of class idmPl. Life expectancies are calculated at time s for a subject who has the covariates values Z01, Z02, Z12. Confidence intervals are calculated.

Usage

lifexpect.idmPl(object, s, Z01, Z02, Z12, nsim=1000, CI=TRUE, 
...)

Arguments

object
an idmPl class objects returned by a call to the idm function with hazard="Splines".
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 (TRUE) or without (WRONG) confidence intervals for the life expectancies. The default is TRUE.
...
others arguments.

Value

  • a list containing:
  • life.in.0.expectancylife expectancy in state 0 and confidence interval.
  • life.expectancy.nondislife expectancy of a non-diseased subject and confidence interval.
  • life.expectancy.dislife expectancy of a diseased subject and confidence interval.

See Also

idm

Examples

Run this code
data(Paq1000)
d <- Paq1000
names(d) <- c("dementia","mort","entry","L","R","time","certif","death")

fit <- idm(formula02=Hist(time,event=death,entry=entry)~certif,
formula01=Hist(time=list(L,R),event=dementia)~certif,data=d,hazard="Splines") 

pred <- lifexpect.idmPl(fit,s=70,t=80,Z01=c(1),Z02=c(1),Z12=c(1))

Run the code above in your browser using DataLab