Description Usage Arguments Details Value See Also Examples
Aalen-Johansen estimator (empirical transition matrix)
1 |
times |
a vector of evaluation times |
data |
data frame (see |
param |
list of parameters (target, states, transitions, censoring, s, t, cov) (see etm documentation) |
Wrapper for 'etm' function from the 'etm' package to be used with ahrAJ
For a description of the parameters in the list param
see the documentation of the etm
function in package etm
.
a list containing
times |
the argument |
S |
vector of 1 minus transition probabilities at |
V |
vector of variances at 'times' (only if |
logCOV |
matrix containing estimated values of the log-covariance function evaluated for all pairs of elements of the vector |
1 2 3 4 5 6 7 8 9 10 11 12 | ## competing risks
T <- rexp(100)
C <- rexp(100)
r <- rbinom(100, 2, 0.5)
r[(r == 0) | (T > C)] <- "cens"
data <- data.frame(id=1:100, time=pmin(T,C), from=rep(0, 100), to=r)
data <- data[order(data$time),]
tra <- matrix(FALSE, nrow=3, ncol=3)
tra[1, 2:3] <- TRUE
# estimate cumulative incidence function for event type 1
fit <- aj(sort(data$time), data, list(target="0 1", states=c("0", "1", "2"), transitions=tra,
censoring="cens", s=0, t="last", covariance=TRUE))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.