| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/cutLMms.R |
| 3 |
\name{cutLMms} |
| 4 |
\alias{cutLMms} |
| 5 |
\title{Cut a multi-state data set at a landmark time point} |
| 6 |
\usage{ |
| 7 |
cutLMms(msdata, LM, cens) |
| 8 |
} |
| 9 |
\arguments{ |
| 10 |
\item{msdata}{An object of class \code{"msdata"}, such as output by |
| 11 |
\code{\link{msprep}}} |
| 12 |
|
| 13 |
\item{LM}{The landmark time point at which the cut is to be made} |
| 14 |
|
| 15 |
\item{cens}{The time point at which administrative censoring is to be |
| 16 |
applied; if missing, no administrative censoring will be applied} |
| 17 |
} |
| 18 |
\value{ |
| 19 |
An object of class \code{"msdata"} again, containing only follow-up |
| 20 |
data after LM. The data frame contains an extra column \code{Tentry} with |
| 21 |
the time of entry into the present state. |
| 22 |
} |
| 23 |
\description{ |
| 24 |
Given a dataset in long format, for instance generated by |
| 25 |
\code{\link{msprep}}, this function cuts a multi-state data frame (object of |
| 26 |
type "msdata") at a landmark time point LM. Administrative censoring can be |
| 27 |
applied at time \code{cens}, equal for all individuals. |
| 28 |
} |
| 29 |
\details{ |
| 30 |
The function has a similar purpose as the \code{cutLM} function in the |
| 31 |
\code{dynpred} package. Only follow-up after a landmark time point LM is |
| 32 |
considered, so all subjects who are no longer at risk are removed. Column |
| 33 |
\code{time} is updated based on the new Tstart and Tstop. |
| 34 |
} |
| 35 |
\examples{ |
| 36 |
|
| 37 |
tmat <- trans.illdeath(names=c("Tx","PR","RelDeath")) |
| 38 |
data(ebmt3) # data from Section 4 of Putter, Fiocco & Geskus (2007) |
| 39 |
msebmt <- msprep(time=c(NA,"prtime","rfstime"),status=c(NA,"prstat","rfsstat"), |
| 40 |
data=ebmt3,trans=tmat) |
| 41 |
# Cut at 5 years |
| 42 |
cutLMms(msebmt, LM=1826) |
| 43 |
events(cutLMms(msebmt, LM=1826)) |
| 44 |
|
| 45 |
} |
| 46 |
\references{ |
| 47 |
L. C. de Wreede, M. Fiocco, and H. Putter (2011). mstate: An R |
| 48 |
Package for the Analysis of Competing Risks and Multi-State Models. Journal |
| 49 |
of Statistical Software 38: 7. |
| 50 |
} |
| 51 |
\author{ |
| 52 |
Hein Putter \email{[email protected]} |
| 53 |
} |
| 54 |
\keyword{univar} |