data.reshape: Reshaping individual patient data

Description Usage Arguments Value Note See Also Examples

Description

Aggregates individual patient data and combines it in a data.frame format required for irates

Usage

1
data.reshape(times, events, covar, no.event.code, event.code = NULL, covar.code = NULL)

Arguments

times

Timepoints corresponding to event status for each individual (vector or factor)

events

Event status for each individual (vector or factor)

covar

Event status for each individual (vector or factor)

no.event.code

A character or numerical value that specifies the value in events corresponding to “no event observed”.

event.code

A character or numerical value that specifies the respective competing events in events. If NULL, event.code will be automatically extracted from events

covar.code

A character or numerical value that specifies the respective covariate values in covar. If NULL, covar.code will be automatically extracted from covar

Value

An object of class data.frame of the form data.frame(time, no.event.code, event.code) with row.names given by covar.code and corresponding aggregated data entries.

Note

With individual patient data you may also perform non-parametric competing risks analyses, e.g., estimating the cumulative event-specific hazards by applying the package mvna or estimating the cumulative incidence function (CIF) by using the package etm. etm is also required as a diagnostic tool in CIFplot that enables to compare parametric and non-parametric CIF estimates.

See Also

irates, CIFplot, mvna, etm

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
### Example data: 
### Pneumonia on admission in intenive care unit patients

data(sir.adm)

data.reshape(
		times = sir.adm$time, 
		events = sir.adm$status, 
		covar = sir.adm$pneu, 
		no.event.code = "0")

### Example data: 
### Bloodstream infections in stem-cell transplanted patients

data(okiss)

data.reshape(
		times = okiss$time, 
		events = okiss$status, 
		covar = okiss$allo, 
		no.event.code = "11")

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