| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/transMat.R |
| 3 |
\name{transMat} |
| 4 |
\alias{transMat} |
| 5 |
\alias{trans.illdeath} |
| 6 |
\alias{trans.comprisk} |
| 7 |
\title{Define transition matrix for multi-state model} |
| 8 |
\usage{ |
| 9 |
transMat(x, names) |
| 10 |
} |
| 11 |
\arguments{ |
| 12 |
\item{x}{List of possible transitions; x[[i]] consists of a vector of state |
| 13 |
numbers reachable from state i} |
| 14 |
|
| 15 |
\item{names}{A character vector containing the names of either the competing |
| 16 |
risks or the states in the multi-state model specified by the competing |
| 17 |
risks or illness-death model. \code{names} should have the same length as |
| 18 |
the list \code{x} (for \code{transMat}), or either \code{K} or \code{K}+1 |
| 19 |
(for \code{trans.comprisk}), or 3 (for \code{trans.illdeath})} |
| 20 |
} |
| 21 |
\value{ |
| 22 |
A transition matrix describing the states and transitions in the |
| 23 |
multi-state model. |
| 24 |
} |
| 25 |
\description{ |
| 26 |
Define transition matrices for multi-state model. Specific functions for |
| 27 |
defining such transition matrices are pre-defined for common multi-state |
| 28 |
models like the competing risks model and the illness-death model. |
| 29 |
} |
| 30 |
\details{ |
| 31 |
If \code{names} is missing, the names \code{"eventfree"}, \code{"cause1"}, |
| 32 |
etcetera are assigned in \code{trans.comprisk}, or \code{"healthy"}, |
| 33 |
\code{"illness"}, \code{"death"} in \code{trans.illdeath}. |
| 34 |
} |
| 35 |
\examples{ |
| 36 |
|
| 37 |
transMat(list(c(2, 3), c(), c(1, 2)), |
| 38 |
names = c("Disease-free", "Death", "Relapsed")) |
| 39 |
tmat <- transMat(x = list( c(2, 3), c(1, 3), c() ), |
| 40 |
names = c("Normal", "Low", "Death")) |
| 41 |
tmat |
| 42 |
transListn <- list("Normal" = c(2, 3), "Low" = c(1, 3), "Death" = c()) |
| 43 |
transMat(transListn) |
| 44 |
trans.comprisk(3) |
| 45 |
trans.comprisk(3,c("c1","c2","c3")) |
| 46 |
trans.comprisk(3,c("nothing","c1","c2","c3")) |
| 47 |
trans.illdeath() |
| 48 |
trans.illdeath(c("nothing","ill","death")) |
| 49 |
|
| 50 |
} |
| 51 |
\author{ |
| 52 |
Steven McKinney <[email protected]>; Hein Putter |
| 53 |
<[email protected]> |
| 54 |
} |
| 55 |
\keyword{array} |