predict.idm: Predictions for an illness-death model using either a...

View source: R/predict.idm.R

predict.idmR Documentation

Predictions for an illness-death model using either a penalized likelihood approach or a Weibull parametrization.

Description

Predict transition probabilities and cumulative probabilities from an object of class idmSplines with confidence intervals are calculated.

Usage

## S3 method for class 'idm'
predict(object, s, t, newdata, nsim = 200, seed = 21,
  conf.int = 0.95, lifeExpect = FALSE, maxtime, ...)

Arguments

object

an idm class objects returned by a call to the idm function

s

time point at which prediction is made.

t

time horizon for prediction.

newdata

A data frame with covariate values for prediction.

nsim

number of simulations for the confidence intervals calculations. The default is 200.

seed

Seed passed to set.seed for Monte Carlo simulation of confidence intervals.

conf.int

Level of confidence, i.e., a value between 0 and 1, the default is 0.95. The default is also used when conf.int=TRUE. To avoid computation of confidence intervals, set conf.int to FALSE or NULL.

lifeExpect

Logical. If TRUE compute life expectancies, i.e., t=Inf.

maxtime

The upper limit of integration for calculations of life expectancies from Weibull parametrizations.

...

other parameters.

Value

a list containing the following predictions with pointwise confidence intervals:

p00

the transition probability p_{00}.

p01

the transition probability p_{01}.

p11

the transition probability p_{11}.

p12

the transition probability p_{12}.

p02_0

the probability of direct transition from state 0 to state 2.

p02_1

the probability of transition from state 0 to state 2 via state 1.

p02

transition probability p_{02}. Note that p02=p_02_0+p02_1.

F01

the lifetime risk of disease. F01=p01+p02_1.

F0.

the probability of exit from state 0. F0.=p02_0+p01+p02_1.

RM

the restricted mean survival time without disease.

or a list containing the following life expectancies with pointwise confidence intervals (when lifeExpect=TRUE):

LE.0.

Total life expectancy

LE.00

Life expectancy free of the disease (ie. Healthy life expectancy)

LE.01

Life expectancy with the disease (for a non-disease subject at time=s) (Note that LE.01=LE.0.-LE.00).

LE.11

Life expectancy for diseased subject at time=s

LTR

Life-time risk of the disease.

Author(s)

R: Celia Touraine <Celia.Touraine@isped.u-bordeaux2.fr> and Thomas Alexander Gerds <tag@biostat.ku.dk> Fortran: Pierre Joly <Pierre.Joly@isped.u-bordeaux2.fr>

See Also

idm

Examples


## Not run: 
set.seed(100)
d=simulateIDM(n = 100)
fit <- idm(formula01=Hist(time=list(L,R),event=seen.ill)~X1+X2+X3,
               formula02=Hist(time=observed.lifetime,event=seen.exit)~X1+X2+X3,
               data=d,conf.int=FALSE)
predict(fit,s=0,t=80,conf.int=FALSE,lifeExpect=FALSE)
predict(fit,s=0,t=80,nsim=4,conf.int=TRUE,lifeExpect=FALSE)
predict(fit,s=0,t=80,nsim=4,conf.int=FALSE,lifeExpect=TRUE)

data(Paq1000)
library(prodlim)
fit.paq <- idm(formula02=Hist(time=t,event=death,entry=e)~certif,
formula01=Hist(time=list(l,r),event=dementia)~certif,data=Paq1000)

predict(fit.paq,s=70,t=80,newdata=data.frame(certif=1))
predict(fit.paq,s=70,lifeExpect=TRUE,newdata=data.frame(certif=1))

fit.splines <-  idm(formula02=Hist(time=t,event=death,entry=e)~certif,
		formula01=Hist(time=list(l,r),event=dementia)~certif,
                formula12=~1,
                method="Splines",
		data=Paq1000)

predict(fit.splines,s=70,t=80,newdata=data.frame(certif=1))
predict(fit.splines,s=70,t=80,lifeExpect=TRUE,newdata=data.frame(certif=1),nsim=20)



## End(Not run)


tagteam/SmoothHazard documentation built on April 5, 2024, 6:32 a.m.