Summary method for an object of class 'msfit'. It prints a selection of the estimated cumulative transition intensities, and, if requested, also of the (co)variances.

# S3 method for msfit
summary(
  object,
  times,
  transitions,
  variance = TRUE,
  conf.int = 0.95,
  conf.type = c("log", "none", "plain"),
  extend = FALSE,
  ...
)

Arguments

object

Object of class 'msfit', containing estimated cumulative transition intensities for all transitions in a multi-state model

times

Time points at which to evaluate the cumulative transition hazards

transitions

The transition for which to summarize the cumulative transition hazards

variance

Whether or not the standard errors of the estimated cumulative transition intensities should be printed; default is TRUE

conf.int

The proportion to be covered by the confidence intervals, default is 0.95

conf.type

The type of confidence interval, one of "log", "none", or "plain". Defaults to "log"

extend

logical value: if TRUE, prints information for all specified times, even if there are no subjects left at the end of the specified times. This is only valid if the times argument is present

...

Further arguments to summary

Value

Function summary.msfit returns an object of class "summary.msfit", which is a list (for each from state) of cumulative transition hazaards at the specified (or all) time points. The print method of a summary.probtrans doesn't return a value.

See also

Author

Hein Putter H.Putter@lumc.nl

Examples

# Start with example from msfit tmat <- trans.illdeath() tg <- data.frame(illt=c(1,1,6,6,8,9),ills=c(1,0,1,1,0,1), dt=c(5,1,9,7,8,12),ds=c(1,1,1,1,1,1), x1=c(1,1,1,0,0,0),x2=c(6:1)) tglong <- msprep(time=c(NA,"illt","dt"),status=c(NA,"ills","ds"), data=tg,keep=c("x1","x2"),trans=tmat) tglong <- expand.covs(tglong,c("x1","x2")) cx <- coxph(Surv(Tstart,Tstop,status)~x1.1+x2.2+strata(trans), data=tglong,method="breslow") newdata <- data.frame(trans=1:3,x1.1=c(0,0,0),x2.2=c(0,1,0),strata=1:3) msf <- msfit(cx,newdata,trans=tmat) # Default, all transitions, with SE summary(msf)
#> #> Transition 1 : #> time Haz seHaz lower upper #> 1 1 0.06204689 0.08871763 0.003763839 1.022843 #> 2 5 0.06204689 0.08871763 0.003763839 1.022843 #> 3 6 0.33333333 0.33333333 0.046954498 2.366357 #> 4 7 0.33333333 0.33333333 0.046954498 2.366357 #> 5 8 0.33333333 0.33333333 0.046954498 2.366357 #> 6 9 1.33333333 1.05409255 0.283142349 6.278742 #> 7 12 1.33333333 1.05409255 0.283142349 6.278742 #> #> Transition 2 : #> time Haz seHaz lower upper #> 8 1 0.007971491 0.03134544 3.584681e-06 17.726731 #> 9 5 0.007971491 0.03134544 3.584681e-06 17.726731 #> 10 6 0.007971491 0.03134544 3.584681e-06 17.726731 #> 11 7 0.007971491 0.03134544 3.584681e-06 17.726731 #> 12 8 0.305921143 0.36774138 2.900000e-02 3.227164 #> 13 9 0.305921143 0.36774138 2.900000e-02 3.227164 #> 14 12 0.305921143 0.36774138 2.900000e-02 3.227164 #> #> Transition 3 : #> time Haz seHaz lower upper #> 15 1 0.0 0.000000 0.0000000 0.000000 #> 16 5 1.0 1.000000 0.1408635 7.099071 #> 17 6 1.0 1.000000 0.1408635 7.099071 #> 18 7 1.5 1.118034 0.3480512 6.464567 #> 19 8 1.5 1.118034 0.3480512 6.464567 #> 20 9 2.5 1.500000 0.7712925 8.103282 #> 21 12 3.5 1.802776 1.2753583 9.605144
summary(msf, conf.type="plain")
#> #> Transition 1 : #> time Haz seHaz lower upper #> 1 1 0.06204689 0.08871763 0 0.2359302 #> 2 5 0.06204689 0.08871763 0 0.2359302 #> 3 6 0.33333333 0.33333333 0 0.9866547 #> 4 7 0.33333333 0.33333333 0 0.9866547 #> 5 8 0.33333333 0.33333333 0 0.9866547 #> 6 9 1.33333333 1.05409255 0 3.3993168 #> 7 12 1.33333333 1.05409255 0 3.3993168 #> #> Transition 2 : #> time Haz seHaz lower upper #> 8 1 0.007971491 0.03134544 0 0.06940743 #> 9 5 0.007971491 0.03134544 0 0.06940743 #> 10 6 0.007971491 0.03134544 0 0.06940743 #> 11 7 0.007971491 0.03134544 0 0.06940743 #> 12 8 0.305921143 0.36774138 0 1.02668100 #> 13 9 0.305921143 0.36774138 0 1.02668100 #> 14 12 0.305921143 0.36774138 0 1.02668100 #> #> Transition 3 : #> time Haz seHaz lower upper #> 15 1 0.0 0.000000 0 0.000000 #> 16 5 1.0 1.000000 0 2.959964 #> 17 6 1.0 1.000000 0 2.959964 #> 18 7 1.5 1.118034 0 3.691306 #> 19 8 1.5 1.118034 0 3.691306 #> 20 9 2.5 1.500000 0 5.439946 #> 21 12 3.5 1.802776 0 7.033375
# Only transitions 1 and 3 summary(msf, tra=c(1, 3))
#> #> Transition 1 : #> time Haz seHaz lower upper #> 1 1 0.06204689 0.08871763 0.003763839 1.022843 #> 2 5 0.06204689 0.08871763 0.003763839 1.022843 #> 3 6 0.33333333 0.33333333 0.046954498 2.366357 #> 4 7 0.33333333 0.33333333 0.046954498 2.366357 #> 5 8 0.33333333 0.33333333 0.046954498 2.366357 #> 6 9 1.33333333 1.05409255 0.283142349 6.278742 #> 7 12 1.33333333 1.05409255 0.283142349 6.278742 #> #> Transition 3 : #> time Haz seHaz lower upper #> 15 1 0.0 0.000000 0.0000000 0.000000 #> 16 5 1.0 1.000000 0.1408635 7.099071 #> 17 6 1.0 1.000000 0.1408635 7.099071 #> 18 7 1.5 1.118034 0.3480512 6.464567 #> 19 8 1.5 1.118034 0.3480512 6.464567 #> 20 9 2.5 1.500000 0.7712925 8.103282 #> 21 12 3.5 1.802776 1.2753583 9.605144
# Default is 95% confidence interval, change here to 90% summary(msf, conf.int=0.90)
#> #> Transition 1 : #> time Haz seHaz lower upper #> 1 1 0.06204689 0.08871763 0.00590618 0.6518284 #> 2 5 0.06204689 0.08871763 0.00590618 0.6518284 #> 3 6 0.33333333 0.33333333 0.06434694 1.7267505 #> 4 7 0.33333333 0.33333333 0.06434694 1.7267505 #> 5 8 0.33333333 0.33333333 0.06434694 1.7267505 #> 6 9 1.33333333 1.05409255 0.36324095 4.8942108 #> 7 12 1.33333333 1.05409255 0.36324095 4.8942108 #> #> Transition 2 : #> time Haz seHaz lower upper #> 8 1 0.007971491 0.03134544 1.237582e-05 5.134584 #> 9 5 0.007971491 0.03134544 1.237582e-05 5.134584 #> 10 6 0.007971491 0.03134544 1.237582e-05 5.134584 #> 11 7 0.007971491 0.03134544 1.237582e-05 5.134584 #> 12 8 0.305921143 0.36774138 4.235487e-02 2.209610 #> 13 9 0.305921143 0.36774138 4.235487e-02 2.209610 #> 14 12 0.305921143 0.36774138 4.235487e-02 2.209610 #> #> Transition 3 : #> time Haz seHaz lower upper #> 15 1 0.0 0.000000 0.0000000 0.000000 #> 16 5 1.0 1.000000 0.1930408 5.180252 #> 17 6 1.0 1.000000 0.1930408 5.180252 #> 18 7 1.5 1.118034 0.4401955 5.111366 #> 19 8 1.5 1.118034 0.4401955 5.111366 #> 20 9 2.5 1.500000 0.9318146 6.707343 #> 21 12 3.5 1.802776 1.5001031 8.166106
# Do not show variances (nor confidence intervals) summary(msf, variance=FALSE)
#> #> Transition 1 : #> time Haz #> 1 1 0.06204689 #> 2 5 0.06204689 #> 3 6 0.33333333 #> 4 7 0.33333333 #> 5 8 0.33333333 #> 6 9 1.33333333 #> 7 12 1.33333333 #> #> Transition 2 : #> time Haz #> 8 1 0.007971491 #> 9 5 0.007971491 #> 10 6 0.007971491 #> 11 7 0.007971491 #> 12 8 0.305921143 #> 13 9 0.305921143 #> 14 12 0.305921143 #> #> Transition 3 : #> time Haz #> 15 1 0.0 #> 16 5 1.0 #> 17 6 1.0 #> 18 7 1.5 #> 19 8 1.5 #> 20 9 2.5 #> 21 12 3.5
# Cumulative hazards only at specified time points summary(msf, times=seq(0, 15, by=3))
#> #> Transition 1 : #> times Haz seHaz lower upper #> 1 0 0.06204689 0.08871763 0.003763839 1.022843 #> 2 3 0.06204689 0.08871763 0.003763839 1.022843 #> 3 6 0.33333333 0.33333333 0.046954498 2.366357 #> 4 9 1.33333333 1.05409255 0.283142349 6.278742 #> 5 12 1.33333333 1.05409255 0.283142349 6.278742 #> #> Transition 2 : #> times Haz seHaz lower upper #> 1 0 0.007971491 0.03134544 3.584681e-06 17.726731 #> 2 3 0.007971491 0.03134544 3.584681e-06 17.726731 #> 3 6 0.007971491 0.03134544 3.584681e-06 17.726731 #> 4 9 0.305921143 0.36774138 2.900000e-02 3.227164 #> 5 12 0.305921143 0.36774138 2.900000e-02 3.227164 #> #> Transition 3 : #> times Haz seHaz lower upper #> 1 0 0.0 0.000000 0.0000000 0.000000 #> 2 3 0.0 0.000000 0.0000000 0.000000 #> 3 6 1.0 1.000000 0.1408635 7.099071 #> 4 9 2.5 1.500000 0.7712925 8.103282 #> 5 12 3.5 1.802776 1.2753583 9.605144
# Last specified time point is larger than last observed, not printed # Use extend=TRUE as in summary.survfit summary(msf, times=seq(0, 15, by=3), extend=TRUE)
#> #> Transition 1 : #> times Haz seHaz lower upper #> 1 0 0.06204689 0.08871763 0.003763839 1.022843 #> 2 3 0.06204689 0.08871763 0.003763839 1.022843 #> 3 6 0.33333333 0.33333333 0.046954498 2.366357 #> 4 9 1.33333333 1.05409255 0.283142349 6.278742 #> 5 12 1.33333333 1.05409255 0.283142349 6.278742 #> 6 15 1.33333333 1.05409255 0.283142349 6.278742 #> #> Transition 2 : #> times Haz seHaz lower upper #> 1 0 0.007971491 0.03134544 3.584681e-06 17.726731 #> 2 3 0.007971491 0.03134544 3.584681e-06 17.726731 #> 3 6 0.007971491 0.03134544 3.584681e-06 17.726731 #> 4 9 0.305921143 0.36774138 2.900000e-02 3.227164 #> 5 12 0.305921143 0.36774138 2.900000e-02 3.227164 #> 6 15 0.305921143 0.36774138 2.900000e-02 3.227164 #> #> Transition 3 : #> times Haz seHaz lower upper #> 1 0 0.0 0.000000 0.0000000 0.000000 #> 2 3 0.0 0.000000 0.0000000 0.000000 #> 3 6 1.0 1.000000 0.1408635 7.099071 #> 4 9 2.5 1.500000 0.7712925 8.103282 #> 5 12 3.5 1.802776 1.2753583 9.605144 #> 6 15 3.5 1.802776 1.2753583 9.605144
# Different types of confidence intervals, default is log summary(msf, times=seq(0, 15, by=3), conf.type="plain")
#> #> Transition 1 : #> times Haz seHaz lower upper #> 1 0 0.06204689 0.08871763 0 0.2359302 #> 2 3 0.06204689 0.08871763 0 0.2359302 #> 3 6 0.33333333 0.33333333 0 0.9866547 #> 4 9 1.33333333 1.05409255 0 3.3993168 #> 5 12 1.33333333 1.05409255 0 3.3993168 #> #> Transition 2 : #> times Haz seHaz lower upper #> 1 0 0.007971491 0.03134544 0 0.06940743 #> 2 3 0.007971491 0.03134544 0 0.06940743 #> 3 6 0.007971491 0.03134544 0 0.06940743 #> 4 9 0.305921143 0.36774138 0 1.02668100 #> 5 12 0.305921143 0.36774138 0 1.02668100 #> #> Transition 3 : #> times Haz seHaz lower upper #> 1 0 0.0 0.000000 0 0.000000 #> 2 3 0.0 0.000000 0 0.000000 #> 3 6 1.0 1.000000 0 2.959964 #> 4 9 2.5 1.500000 0 5.439946 #> 5 12 3.5 1.802776 0 7.033375
summary(msf, times=seq(0, 15, by=3), conf.type="no")
#> #> Transition 1 : #> times Haz seHaz #> 1 0 0.06204689 0.08871763 #> 2 3 0.06204689 0.08871763 #> 3 6 0.33333333 0.33333333 #> 4 9 1.33333333 1.05409255 #> 5 12 1.33333333 1.05409255 #> #> Transition 2 : #> times Haz seHaz #> 1 0 0.007971491 0.03134544 #> 2 3 0.007971491 0.03134544 #> 3 6 0.007971491 0.03134544 #> 4 9 0.305921143 0.36774138 #> 5 12 0.305921143 0.36774138 #> #> Transition 3 : #> times Haz seHaz #> 1 0 0.0 0.000000 #> 2 3 0.0 0.000000 #> 3 6 1.0 1.000000 #> 4 9 2.5 1.500000 #> 5 12 3.5 1.802776
# When the number of time points specified is larger than 12, head and tail is shown x <- summary(msf, times=seq(5, 8, by=0.25)) x
#> #> Transition 1 (head and tail): #> times Haz seHaz lower upper #> 1 5.00 0.06204689 0.08871763 0.003763839 1.022843 #> 2 5.25 0.06204689 0.08871763 0.003763839 1.022843 #> 3 5.50 0.06204689 0.08871763 0.003763839 1.022843 #> 4 5.75 0.06204689 0.08871763 0.003763839 1.022843 #> 5 6.00 0.33333333 0.33333333 0.046954498 2.366357 #> 6 6.25 0.33333333 0.33333333 0.046954498 2.366357 #> #> ... #> times Haz seHaz lower upper #> 8 6.75 0.3333333 0.3333333 0.0469545 2.366357 #> 9 7.00 0.3333333 0.3333333 0.0469545 2.366357 #> 10 7.25 0.3333333 0.3333333 0.0469545 2.366357 #> 11 7.50 0.3333333 0.3333333 0.0469545 2.366357 #> 12 7.75 0.3333333 0.3333333 0.0469545 2.366357 #> 13 8.00 0.3333333 0.3333333 0.0469545 2.366357 #> #> Transition 2 (head and tail): #> times Haz seHaz lower upper #> 1 5.00 0.007971491 0.03134544 3.584681e-06 17.72673 #> 2 5.25 0.007971491 0.03134544 3.584681e-06 17.72673 #> 3 5.50 0.007971491 0.03134544 3.584681e-06 17.72673 #> 4 5.75 0.007971491 0.03134544 3.584681e-06 17.72673 #> 5 6.00 0.007971491 0.03134544 3.584681e-06 17.72673 #> 6 6.25 0.007971491 0.03134544 3.584681e-06 17.72673 #> #> ... #> times Haz seHaz lower upper #> 8 6.75 0.007971491 0.03134544 3.584681e-06 17.726731 #> 9 7.00 0.007971491 0.03134544 3.584681e-06 17.726731 #> 10 7.25 0.007971491 0.03134544 3.584681e-06 17.726731 #> 11 7.50 0.007971491 0.03134544 3.584681e-06 17.726731 #> 12 7.75 0.007971491 0.03134544 3.584681e-06 17.726731 #> 13 8.00 0.305921143 0.36774138 2.900000e-02 3.227164 #> #> Transition 3 (head and tail): #> times Haz seHaz lower upper #> 1 5.00 1 1 0.1408635 7.099071 #> 2 5.25 1 1 0.1408635 7.099071 #> 3 5.50 1 1 0.1408635 7.099071 #> 4 5.75 1 1 0.1408635 7.099071 #> 5 6.00 1 1 0.1408635 7.099071 #> 6 6.25 1 1 0.1408635 7.099071 #> #> ... #> times Haz seHaz lower upper #> 8 6.75 1.0 1.000000 0.1408635 7.099071 #> 9 7.00 1.5 1.118034 0.3480512 6.464567 #> 10 7.25 1.5 1.118034 0.3480512 6.464567 #> 11 7.50 1.5 1.118034 0.3480512 6.464567 #> 12 7.75 1.5 1.118034 0.3480512 6.464567 #> 13 8.00 1.5 1.118034 0.3480512 6.464567