Learn R Programming

SmoothHazard (version 1.0.9)

predict.idmPl: Predictions for an illness-death model using the penalized likelihood approach.

Description

Predict transition probabilities and cumulative probabilities from an object of class idmPl. Confidence intervals are calculated.

Usage

## S3 method for class 'idmPl':
predict(object, s, t, Z01, Z02, Z12, nsim=2000, CI=TRUE, ...)

Arguments

object
an idmPl class objects returned by a call to the idm function with hazard="Splines".
s
time at prediction.
t
time for 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 2000.
CI
boolean: with (TRUE) or without (WRONG) confidence intervals for the predicted values. The default is TRUE.
...
other parameters.

Value

  • a list containing the following predictions with confidence bands:
  • p00the transition probability $p_{00}$.
  • p01the transition probability $p_{01}$.
  • p11the transition probability $p_{11}$.
  • p12the transition probability $p_{12}$.
  • p02_0the probability of direct transition from state 0 to state 2.
  • p02_1the probability of transition from state 0 to state 2 via state 1.
  • p02transition probability $p_{02}$. Note that p02=p_02_0+p02_1.
  • F01the lifetime risk of disease. F01=p01+p02_1.
  • F0.the probability of exit from state 0. F0.=p02_0+p01+p02_1.

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=mort,entry=entry)~certif,
formula01=Hist(time=list(L,R),event=dementia)~certif,data=d,hazard="Splines") 

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

Run the code above in your browser using DataLab