Learn R Programming

SmoothHazard (version 1.0.9)

illness-death model: Fit an illness-death model

Description

Fit an illness-death model using either a semi-parametric approach (penalized likelihood with an approximation of the transition intensity functions by linear combination of M-splines) or a parametric approach (specifying Weibull distributions on the transition intensities). Left-truncated, right-censored, and interval-censored data are allowed. State 0 corresponds to the initial state, state 1 to the transient one, state 2 to the absorbant one. The allowed transitions are: 0 --> 1, 0 --> 2 and 1 --> 2.

Usage

idm(formula01, formula02, formula12, data, maxiter=200, eps=c(5,5,3), 
n.knots=c(7,7,7), irec=0,kappa0 = c(1000000,500000,20000), igraph=1, 
hazard="Weib", print.iter=FALSE, subset=NULL, na.action=na.omit)

Arguments

formula01
a formula object for transition '0 --> 1' (from the initial state to the transient state), with the response on the left of a $\texttildelow$ operator, and the terms on the right. The response must be a survival object or Hist object as returned by the 'S
formula02
a formula object for transition '0 --> 2' (from the initial state to the absorbant state), with the response on the left of a $\texttildelow$ operator, and the terms on the right. The response must be a survival object or Hist object as returned by the 'S
formula12
a formula object for transition '1 --> 2' (from the transient state to the absorbant state). The response on the left of the $\texttildelow$ operator is not required. If missing formula12, variables of transition '1--->2' are the same as the ones of trans
data
a data frame in which to interpret the variables named in formula01, formula02 and formula12.
maxiter
maximum number of iterations. The default is 200.
eps
a vector of length 3 for the convergence criteria (criterion for parameters, criterion for likelihood, criterion for second derivatives). The default is 'c(5,5,3)' and corresponds to criteria equals to $10^{-5}$, $10^{-5}$ and $10^{-3}$.
n.knots
a vector of length 3 for the number of knots for the splines to use to approximate the intensities for transitions 0 --> 1, 0 --> 2 and 1 --> 2 respectively. Argument for the penalized likelihood approach. The default is c(7,7,7).
irec
binary variable equals to 1 when search (by approximated cross validation) of the smoothing parameters kappa and 0 otherwise. Argument for the penalized likelihood approach. The default is 0.
kappa0
a vector of length 3. If irec=0, smoothing parameters for the transition 0 --> 1, 0 --> 2 and 1 --> 2. If irec=1, initial values of the smoothing parameters for the cross validation search. Argument for the penalized likelihood approach.
igraph
a binary variable equals to 1 when you want to output graphs of the transition intensities, 0 otherwise. The default is 1.
hazard
type of estimation method: "Splines" for a penalized likelihood approach with approximation of the transition intensities by M-splines, "Weib" for a parametric approach with a Weibull distribution on the transition intensities. Default is "Weib".
print.iter
boolean parameter. Equals to TRUE to print the likelihood during the iteration process, FALSE otherwise. Default is FALSE. This option is not running on Windows.
subset
expression indicating the subset of the rows of data to be used in the fit. All observaation are included by default.
na.action
how NAs are treated. The default is first, any na.action attribute of data, second a na.action setting of options, and third 'na.fail' if that is unset. The 'factory-fresh' default is na.omit. Another possible value is NULL.

Value

  • callthe call that produced the result.
  • coefregression parameters.
  • loglikvector containing the log-likelihood without and with covariate.
  • cvvector containing the convergence criteria.
  • niternumber of iterations.
  • convergedinteger equal to 1 when the model converged, 2, 3 or 4 otherwise.
  • modelParWeibull parameters.
  • Nnumber of subjects.
  • events1number of events 0 --> 1.
  • events2number of events 0 --> 2 or 0 --> 1 --> 2.
  • NCvector containing the number of covariates on transitions 0 --> 1, 0 --> 2, 1 --> 2.
  • responseTransmodel response for the 0 --> 1 transition. Hist or Surv object.
  • responseAbsmodel response for the 0 --> 2 transition. Hist or Surv object.
  • timetimes for which transition intensities have been evaluated for plotting. Vector in the Weibull approach. Matrix in the penalized likelihhod approach for which the colums corresponds to the transitions 0 --> 1, 1 --> 2, 0 --> 2.
  • hazard01matched values of the intensities for transition 0 --> 1.
  • lowerHazard01lower confidence intervals for the values of the intensities for transition 0 --> 1.
  • upperHazard01upper confidence intervals for the values of the intensities for transition 0 --> 1.
  • hazard02matched values of the intensities for transition 0 --> 2.
  • lowerHazard02lower confidence intervals for the values of the intensities for transition 0 --> 2.
  • upperHazard02upper confidence intervals for the values of the intensities for transition 0 --> 2.
  • hazard12matched values of the intensities for transition 1 --> 2.
  • lowerHazard12lower confidence intervals for the values of the intensities for transition 1 --> 2.
  • upperHazard12upper confidence intervals for the values of the intensities for transition 1 --> 2.
  • RRvector of relative risks.
  • Vvariance-covariance matrix.
  • sestandart errors of the regression parameters.
  • Xnames01names of covariates on 0 --> 1.
  • Xnames02names of covariates on 0 --> 2.
  • Xnames12names of covariates on 1 --> 2.
  • knots01knots to approximate by M-splines the intensity of the 0 --> 1 transition.
  • knots02knots to approximate by M-splines the intensity of the 0 --> 2 transition.
  • knots12knots to approximate by M-splines the intensity of the 1 --> 2 transition.
  • nknots01number of knots on transition 0 --> 1.
  • nknots02number of knots on transition 0 --> 2.
  • nknots12number of knots on transition 1 --> 2.
  • theta01square root of splines coefficients for transition 0 --> 1.
  • theta02square root of splines coefficients for transition 0 --> 2.
  • theta12square root of splines coefficients for transition 1 --> 2.
  • ireca binary variable equals to 1 when search of the smoothing parameters kappa by approximated cross-validation, 1 otherwise. The default is 0.
  • igrapha binary variable equals 1 when you need to output transition intensity to plot, 0 otherwise. The default is 1.
  • kappavector containing the smoothing parameters for transition 0 --> 1, 0 --> 2, 1 --> 2 used to estimate the model by the penalized likelihood approach.
  • CVcritcross validation criteria.
  • DoFdegrees of freedom of the model.
  • na.actionobservations deleted if missing values.

Details

The estimated parameters are obtained using the robust Marquardt algorithm (Marquardt, 1963) which is a combination between a Newton-Raphson algorithm and a steepest descent algorithm.

References

D. Marquardt (1963). An algorithm for least-squares estimation of nonlinear parameters. SIAM Journal of Applied Mathematics, 431-441.

See Also

print.idmWeib, print.idmPl, summary.idmWeib, summary.idmPl

Examples

Run this code
# Weibull illness deaths model 
data(Paq1000)
d <- Paq1000
names(d) <- c("dementia","death","entry","L","R","time","certif","gender")

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


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

## to print
fit.weib

## to summary
summary(fit.weib)

Run the code above in your browser using DataLab