Debian Codegraph @

man/redrank.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/redrank.R
3 \name{redrank}
4 \alias{redrank}
5 \title{Reduced rank proportional hazards model for competing risks and multi-state
6 models}
7 \usage{
8 redrank(
9 redrank,
10 full = ~1,
11 data,
12 R,
13 strata = NULL,
14 Gamma.start,
15 method = "breslow",
16 eps = 1e-05,
17 print.level = 1
18 )
19 }
20 \arguments{
21 \item{redrank}{Survival formula, starting with either Surv(time,status) ~ or
22 with Surv(Tstart,Tstop,status) ~, followed by a formula containing
23 covariates for which a reduced rank estimate is to be found}
24
25 \item{full}{Optional, formula specifying that part which needs to be
26 retained in the model (so not subject to reduced rank)}
27
28 \item{data}{Object of class 'msdata', as prepared for instance by
29 \code{\link{msprep}}, in which to interpret the \code{redrank} and,
30 optionally, the \code{full} formulas}
31
32 \item{R}{Numeric, indicating the rank of the solution}
33
34 \item{strata}{Name of covariate to be used inside the
35 \code{\link[survival:strata]{strata}} part of
36 \code{\link[survival:coxph]{coxph}}}
37
38 \item{Gamma.start}{A matrix of dimension K x R, with K the number of
39 transitions and R the rank, to be used as starting value}
40
41 \item{method}{The method for handling ties in
42 \code{\link[survival:coxph]{coxph}}}
43
44 \item{eps}{Numeric value determining when the iterative algorithm is
45 finished (when for two subsequent iterations the difference in
46 log-likelihood is smaller than \code{eps})}
47
48 \item{print.level}{Determines how much output is written to the screen; 0:
49 no output, 1: iterations, for each iteration solutions of Alpha, Gamma,
50 log-likelihood, 2: also the Cox regression results}
51 }
52 \value{
53 A list with elements \item{Alpha}{the Alpha matrix} \item{Gamma}{the
54 Gamma matrix} \item{Beta}{the Beta matrix corresponding to
55 \code{covariates}} \item{Beta2}{the Beta matrix corresponding to
56 \code{fullcovs}} \item{cox.itr1}{the \code{\link[survival:coxph]{coxph}}
57 object resulting from the last call giving \code{Alpha}} \item{alphaX}{the
58 matrix of prognostic scores given by \code{Alpha}, n x R, with n number of
59 subjects} \item{niter}{the number of iterations needed to reach convergence}
60 \item{df}{the number of regression parameters estimated} \item{loglik}{the
61 log-likelihood}
62 }
63 \description{
64 This function estimates regression coefficients in reduced rank proportional
65 hazards models for competing risks and multi-state models.
66 }
67 \details{
68 For details refer to Fiocco, Putter & van Houwelingen (2005, 2008).
69 }
70 \examples{
71
72 \dontrun{
73 # This reproduces the results in Fiocco, Putter & van Houwelingen (2005)
74 # Takes a while to run
75 data(ebmt2)
76 # transition matrix for competing risks
77 tmat <- trans.comprisk(6,names=c("Relapse","GvHD","Bacterial","Viral","Fungal","Other"))
78 # preparing long dataset
79 ebmt2$stat1 <- as.numeric(ebmt2$status==1)
80 ebmt2$stat2 <- as.numeric(ebmt2$status==2)
81 ebmt2$stat3 <- as.numeric(ebmt2$status==3)
82 ebmt2$stat4 <- as.numeric(ebmt2$status==4)
83 ebmt2$stat5 <- as.numeric(ebmt2$status==5)
84 ebmt2$stat6 <- as.numeric(ebmt2$status==6)
85 covs <- c("dissub","match","tcd","year","age")
86 ebmtlong <- msprep(time=c(NA,rep("time",6)),
87 stat=c(NA,paste("stat",1:6,sep="")),
88 data=ebmt2,keep=covs,trans=tmat)
89
90 # The reduced rank 2 solution
91 rr2 <- redrank(Surv(Tstart,Tstop,status) ~ dissub+match+tcd+year+age,
92 data=ebmtlong, R=2)
93 rr3$Alpha; rr3$Gamma; rr3$Beta; rr3$loglik
94 # The reduced rank 3 solution
95 rr3 <- redrank(Surv(Tstart,Tstop,status) ~ dissub+match+tcd+year+age,
96 data=ebmtlong, R=3)
97 rr3$Alpha; rr3$Gamma; rr3$Beta; rr3$loglik
98 # The reduced rank 3 solution, with no reduction on age
99 rr3 <- redrank(Surv(Tstart,Tstop,status) ~ dissub+match+tcd+year, full=~age,
100 data=ebmtlong, R=3)
101 rr3$Alpha; rr3$Gamma; rr3$Beta; rr3$loglik
102 # The full rank solution
103 fullrank <- redrank(Surv(Tstart,Tstop,status) ~ dissub+match+tcd+year+age,
104 data=ebmtlong, R=6)
105 fullrank$Beta; fullrank$loglik
106 }
107
108 }
109 \references{
110 Fiocco M, Putter H, van Houwelingen JC (2005). Reduced rank
111 proportional hazards model for competing risks. \emph{Biostatistics}
112 \bold{6}, 465--478.
113
114 Fiocco M, Putter H, van Houwelingen HC (2008). Reduced-rank proportional
115 hazards regression and simulation-based prediction for multi-state models.
116 \emph{Statistics in Medicine} \bold{27}, 4340--4358.
117
118 Putter H, Fiocco M, Geskus RB (2007). Tutorial in biostatistics: Competing
119 risks and multi-state models. \emph{Statistics in Medicine} \bold{26},
120 2389--2430.
121 }
122 \author{
123 Marta Fiocco and Hein Putter \email{[email protected]}
124 }
125 \keyword{survival}