Debian Codegraph @

man/summary.msfit.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/summary.msfit.R
3 \name{summary.msfit}
4 \alias{summary.msfit}
5 \title{Summary method for an msfit object}
6 \usage{
7 \method{summary}{msfit}(
8 object,
9 times,
10 transitions,
11 variance = TRUE,
12 conf.int = 0.95,
13 conf.type = c("log", "none", "plain"),
14 extend = FALSE,
15 ...
16 )
17 }
18 \arguments{
19 \item{object}{Object of class 'msfit', containing estimated cumulative
20 transition intensities for all transitions in a multi-state model}
21
22 \item{times}{Time points at which to evaluate the cumulative transition
23 hazards}
24
25 \item{transitions}{The transition for which to summarize the cumulative
26 transition hazards}
27
28 \item{variance}{Whether or not the standard errors of the estimated
29 cumulative transition intensities should be printed; default is \code{TRUE}}
30
31 \item{conf.int}{The proportion to be covered by the confidence intervals,
32 default is 0.95}
33
34 \item{conf.type}{The type of confidence interval, one of "log", "none", or
35 "plain". Defaults to "log"}
36
37 \item{extend}{logical value: if \code{TRUE}, prints information for all
38 specified times, even if there are no subjects left at the end of the
39 specified times. This is only valid if the times argument is present}
40
41 \item{\dots}{Further arguments to summary}
42 }
43 \value{
44 Function \code{summary.msfit} returns an object of class
45 "summary.msfit", which is a list (for each \code{from} state) of cumulative
46 transition hazaards at the specified (or all) time points. The \code{print}
47 method of a \code{summary.probtrans} doesn't return a value.
48 }
49 \description{
50 Summary method for an object of class 'msfit'. It prints a selection of the
51 estimated cumulative transition intensities, and, if requested, also of the
52 (co)variances.
53 }
54 \examples{
55
56 # Start with example from msfit
57 tmat <- trans.illdeath()
58 tg <- data.frame(illt=c(1,1,6,6,8,9),ills=c(1,0,1,1,0,1),
59 dt=c(5,1,9,7,8,12),ds=c(1,1,1,1,1,1),
60 x1=c(1,1,1,0,0,0),x2=c(6:1))
61 tglong <- msprep(time=c(NA,"illt","dt"),status=c(NA,"ills","ds"),
62 data=tg,keep=c("x1","x2"),trans=tmat)
63 tglong <- expand.covs(tglong,c("x1","x2"))
64 cx <- coxph(Surv(Tstart,Tstop,status)~x1.1+x2.2+strata(trans),
65 data=tglong,method="breslow")
66 newdata <- data.frame(trans=1:3,x1.1=c(0,0,0),x2.2=c(0,1,0),strata=1:3)
67 msf <- msfit(cx,newdata,trans=tmat)
68
69 # Default, all transitions, with SE
70 summary(msf)
71 summary(msf, conf.type="plain")
72 # Only transitions 1 and 3
73 summary(msf, tra=c(1, 3))
74 # Default is 95\% confidence interval, change here to 90\%
75 summary(msf, conf.int=0.90)
76 # Do not show variances (nor confidence intervals)
77 summary(msf, variance=FALSE)
78 # Cumulative hazards only at specified time points
79 summary(msf, times=seq(0, 15, by=3))
80 # Last specified time point is larger than last observed, not printed
81 # Use extend=TRUE as in summary.survfit
82 summary(msf, times=seq(0, 15, by=3), extend=TRUE)
83 # Different types of confidence intervals, default is log
84 summary(msf, times=seq(0, 15, by=3), conf.type="plain")
85 summary(msf, times=seq(0, 15, by=3), conf.type="no")
86 # When the number of time points specified is larger than 12, head and tail is shown
87 x <- summary(msf, times=seq(5, 8, by=0.25))
88 x
89
90 }
91 \seealso{
92 \code{\link{msfit}}
93 }
94 \author{
95 Hein Putter \email{[email protected]}
96 }
97 \keyword{print}