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