Description Usage Arguments References See Also Examples
Function for plotting irates
objects. For each covariate value, multistate-type graphics will be displayed, i.e., plots with transition arrows from the initial event to each competing event, where the thickness describes the particular amount of every incidence rate. Full sample graphics might also be plotted.
1 2 3 4 | ## S3 method for class 'irates'
plot(x, covar.code = NULL, full.sample = FALSE, n.row = 1, viewport.size = list(w = 3.5, h = 2.5),
box.size = list(w = NULL, h = NULL), dist = 0.5, irates.vbw = NULL, arrow.maxlwd = 10, display.digits = 2, cex = 0.9, show.values = TRUE, mark = NULL, mark.col = "red", main = "", main.dist = 0.4,
main.gp = gpar(cex = 1.2), ...)
|
x |
|
covar.code |
A character or numerical value that specifies the respective covariates value(s) for which the result of |
full.sample |
A |
n.row |
An integer value that specifies the number of rows to display the plots for each covariate value. Default is set to 1 |
viewport.size |
A list with 2 numerical values |
box.size |
A list with 2 numerical values |
dist |
A numerical value to set the distance between plots in a row. Default is 0.5 |
irates.vbw |
A numerical value to set the width of the background box for the incidence rate values to be displayed. If |
arrow.maxlwd |
A numerical value to set the maximum arrow width for the transition with the highest incidence rate. Default is 10. |
display.digits |
An integer value specifying the number of decimal place for all incidence rates that shall be plotted. Default is 2 |
cex |
A numerical value giving the amount by which plotting the incidence rate values should be magnified relative to the default |
show.values |
A |
mark |
A vector of length |
mark.col |
The color to be used for marking transition arrows. Defaults to "red" |
main |
An overall title for the plot |
main.dist |
A numerical value to set the distance between the overall title and the plots |
main.gp |
A numerical value giving the amount by which plotting the title values should be magnified relative to the default |
... |
Further arguments for plot |
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
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 | #########################
### Pneumonia on admission data: sir.adm
data(sir.adm)
agg.sir <- data.reshape(
times = sir.adm$time,
events = sir.adm$status,
covar = sir.adm$pneu,
no.event.code = "0")
### Compute irates object from dat
ir1 <- irates(agg.sir)
### Plot multistate-type graphic from irates object
plot(ir1)
#########################
### Compute irates object with certain labels
ir2 <- irates(
agg.sir,
no.event.lab = "Admission",
event.lab = c("Discharge","Death"),
covar.lab = c("No pneumonia","Pneumonia"))
### Plot multistate-type graphic from irates object
plot(ir2)
#########################
### ONKO-KISS data: okiss
data(okiss)
### Aggregate individual patient data
agg.okiss <- data.reshape(
times = okiss$time,
events = okiss$status,
covar = okiss$allo,
no.event.code = "11")
### Plot multistate-type graphic from irates object
plot(irates(agg.okiss,
no.event.lab = "Neutropenia",
event.lab = c("Infection","End of\n Neutropenia","Death"),
covar.lab = c("Autologous","Allogenic")
),
viewport.size = list(w = 4.5, h = 2.5)
)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.