plot.irates: Comprehensive multi-state graphic for competing risks...

Description Usage Arguments References See Also Examples

View source: R/plot.irates.R

Description

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.

Usage

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), ...)

Arguments

x

irates object

covar.code

A character or numerical value that specifies the respective covariates value(s) for which the result of irates shall be printed. If NULL, covar.code will be inherited from irates

full.sample

A logical value that specifies if results of irates shall also be printed for the full sample, i.e., irrespective of any covariate value. Default is set to FALSE

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 list(w, h) to set the width (w) and height (h) of the viewport. Default is w= 3.5, h = 2.5

box.size

A list with 2 numerical values list(w, h) to set the width (w) and height (h) of the box(es) for each event. If NULL, w and h will be determined automatically corresponding to the specified event.lab in irates

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 NULL, irates.vbw will be determined automatically corresponding to display.digits

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 logical value specifying if incidence rate values shall be plotted or not. Default is TRUE

mark

A vector of length event.code with logical values specifying if and which transition arrow shall be marked with a certain color. Defaults to NULL

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

References

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

See Also

irates

Examples

 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)
	)

compeir documentation built on May 2, 2019, 5:47 a.m.