File: cuminc.Rd

package info (click to toggle)
r-cran-cmprsk 2.2-7-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 248 kB
  • sloc: fortran: 769; sh: 31; makefile: 2
file content (92 lines) | stat: -rw-r--r-- 2,841 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
\name{cuminc}
\alias{cuminc}
\title{
Cumulative Incidence Analysis
}
\description{
Estimate cumulative incidence functions from competing risks
data and test equality across groups
}
\usage{
cuminc(ftime, fstatus, group, strata, rho=0, cencode=0,
subset, na.action=na.omit)
}
\arguments{
\item{ftime}{
failure time variable
}
\item{fstatus}{
variable with distinct codes for different causes of failure
and also a distinct code for censored observations
}
\item{group}{
estimates will calculated within groups given by distinct values of this
variable.  Tests will compare these groups.  If missing then treated as all
one group (no test statistics)
}
\item{strata}{
stratification variable.  Has no effect on estimates.  Tests will be
stratified on this variable.  (all data in 1 stratum, if missing)
}
\item{rho}{
Power of the weight function used in the tests.
}
\item{cencode}{
value of fstatus variable which indicates the failure time is censored.
}
\item{subset}{
  a logical vector specifying a subset of cases to include in the
  analysis
}
\item{na.action}{
  a function specifying the action to take for any cases missing any of
  ftime, fstatus, group, strata, or subset.
}
}
\value{
A list with components giving the subdistribution estimates for each
cause in each group, and a component \code{Tests} giving the test
statistics and p-values for comparing the subdistribution for each cause
across groups (if the 
number of groups is \eqn{>}{>}1).  The components giving the estimates
have names that are a combination 
of the group name and the cause code.  
These components are also lists, with components
\item{\code{time}}{ the times
where the estimates are calculated}
\item{\code{est}}{the estimated
sub-distribution functions.  These are step functions (all corners
of the steps given), so they can be plotted using ordinary lines() commands.
Estimates at particular times can be located using the timepoints()
function.}
\item{\code{var}}{the estimated variance of
  the estimates, which are estimates of the asymptotic
  variance of Aalen (1978).  }
}
\references{
Gray RJ (1988) A class of K-sample tests for comparing the cumulative
incidence of a competing risk, ANNALS OF STATISTICS, 16:1141-1154.


Kalbfleisch and Prentice (1980) THE ANALYSIS OF FAILURE TIME DATA, p 168-9.


Aalen, O. (1978) Nonparametric estimation of partial transition
probabilities in multiple decrement models, ANNALS OF STATISTICS,
6:534-545.
}
\author{Robert Gray}
\seealso{
\code{\link{plot.cuminc}} \code{\link{timepoints}} \code{\link{print.cuminc}}
}
\examples{
set.seed(2)
ss <- rexp(100)
gg <- factor(sample(1:3,100,replace=TRUE),1:3,c('a','b','c'))
cc <- sample(0:2,100,replace=TRUE)
strt <- sample(1:2,100,replace=TRUE)
print(xx <- cuminc(ss,cc,gg,strt))
plot(xx,lty=1,color=1:6)
# see also test.R, test.out
}
\keyword{survival}