simrecPlot: simrecPlot

Description Usage Arguments Value Author(s) See Also Examples

View source: R/simrec_plot.R

Description

This function allows plotting of recurrent event data.

Usage

1
simrecPlot(data, id = "id", start = "start", stop = "stop", status = "status")

Arguments

data

A data set of recurrent event data to be plotted. The input-data must include columns corresponding to: id (patient-ID), start (= beginning of an interval where the patient is at risk for an event), stop (= end of the interval due to an event or censoring), status (= an indicator of the patient status at stop with = 0 censoring, 1 = event)

id

the name of the id column, default is "id"

start

the name of the start column, default is "start"

stop

the name of the stop column, default is "stop"

status

the name of the status column, default is "status"

Value

The output is a plot of the data with a bullet indicating a recurrent event and a circle indicating censoring.

Author(s)

Katharina Ingel, Stella Preussler, Antje Jahn-Eimermacher. Institute of Medical Biostatistics, Epidemiology and Informatics (IMBEI), University Medical Center of the Johannes Gutenberg-University Mainz, Germany

See Also

simrec, simreccomp, simreccompPlot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
### Example:
### First simulate a sample of 10 individuals (for more details see the help of \code{simrec})
N <- 10
dist.x <- c("binomial", "normal")
par.x <- list(0.5, c(0, 1))
beta.x <- c(0.3, 0.2)
dist.z <- "gamma"
par.z <- 0.25
dist.rec <- "weibull"
par.rec <- c(1, 2)
fu.min <- 2
fu.max <- 2
cens.prob <- 0.2
dfree <- 30 / 365
pfree <- 0.5
simdata <- simrec(
  N, fu.min, fu.max, cens.prob, dist.x, par.x, beta.x,
  dist.z, par.z, dist.rec, par.rec, pfree, dfree
)
simrecPlot(simdata)

simrec documentation built on Nov. 20, 2020, 5:08 p.m.