Description Usage Arguments Details Value Note References See Also Examples
This function computes event-specific incidence rates (a.k.a incidence densities) for competing risks data together with corresponding variances and confidence intervals. Incidence rates can be computed for separate covariate values of one binary or categorical covariate.
1 2 |
data |
A data.frame, where columns contain the aggregated observation time (i.e., |
time.code |
A character or numerical value that specifies the |
no.event.code |
A character or numerical value that specifies the |
no.event.lab |
A character value that specifies a certain label for |
event.lab |
A character value (potentially vector with order and length according to order and number of competing events in |
covar.lab |
A character value (potentially vector with order and length according to order and number of covariate values in |
full.sample.lab |
A character value that specifies a certain label for the full sample |
ci.level |
A numerical value between 0 and 1 that specifies the level for the two-sided confidence interval. Default is set to .95 |
ci.fun |
A character value out of c(“lin”, “log”) that specifies the confidence interval function, either linear or log-transformed. Default is set to “log” |
The incidence rate is defined as the number of new cases of disease in a sample divided by the sample-time at risk.
An object of class irates
. This object is implemented as a list of the (besides pre-specified) following items:
ir |
Competing events incidence rates |
var |
Variance estimates for competing events incidence rates |
conf.lower |
Lower confidence interval corresponding to pre-specified function and level |
conf.upper |
Upper confidence interval corresponding to pre-specified function and level |
N |
Distribution of covariate values at baseline |
n |
data.frame with counts for each event according to covariate value as well as for the full sample |
If individual patient data is available and incidence rates shall be computed, the data can be easily reshaped to the required data.frame format by using the function data.reshape
Grambauer, N., Schumacher, M., Dettenkofer, M. and Beyersmann, J. (2010) Incidence densities in a competing events setting. American Journal of Epidemiology 172,1077–1084. http://aje.oxfordjournals.org/lookup/doi/10.1093/aje/kwq246
print.irates
, summary.irates
, plot.irates
, data.reshape
, grid
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 | ### With individual patient data - sir.adm - using the function data.reshape
data(sir.adm)
dat1 <- data.reshape(
times = sir.adm$time,
events = sir.adm$status,
covar = sir.adm$pneu,
no.event.code = "0")
### With aggregated count data
dat2 <- data.frame(
time = c(7948,2899),
no.event = c(6,8),
event.1 = c(589,68),
event.2 = c(55,21),
row.names = c("covar0","covar1"))
### Compute incidence rates from dat1 or dat2 (here dat2)
irates(dat2)
### Specify columns with time and no.event information
irates(
dat2,
time.code = "time",
no.event.code = "no.event")
### Set specific labels
irates(
dat2,
no.event.lab = "Admission",
event.lab = c("Discharge","Death"),
covar.lab = c("No pneumonia","Pneumonia"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.