plot.intensity: Plot Intensity Functions In event: Event History Procedures and Models

Description

Plot the empirical intensity curve for given times between events.

Usage

 ```1 2 3 4 5 6``` ```## S3 method for class 'intensity' plot(x, ...) ## Default S3 method: plot.intensity(x, censor=1, group=1, colour=TRUE, mix=1, ylim=c(0,1), ylab="p", xlab="Time", main="Empirical Hazard Function(s)", ...) ```

Arguments

 `censor` Vector of censoring indicators corresponding to the vector of times or to the last time in each vector of a list. `group` Vector indicating to which group each individual belongs. `colour` Use a different colour for each curve. `x` An object produced by `km` for `plot.intensity`; for `plot.intensity.default` it is `times` (Vector of times to events or a list of vectors of such times for different individuals.) These changes were made for S3 methods compatability. `mix` ... `main` Plotting control options. `ylab` Plotting control options. `xlab` Plotting control options. `ylim` Plotting control options. `...` Plotting control options.

Author(s)

J.K. Lindsey

`km`, `plot.surv`

Examples

 ```1 2 3 4 5 6 7``` ```surv <- rgamma(40,2,scale=5) cens <- rbinom(40,1,0.9) treat <- gl(2,20) plot(km(surv, cens, group=treat), main="",xlab="Months", ylab="Probability of deterioration") plot.dist(km(surv, cens, group=treat)) plot.intensity(km(surv, cens, group=treat),ylab="Risk of deterioration") ```

Example output

```Loading required package: rmutil

Attaching package: ‘rmutil’

The following object is masked from ‘package:stats’:

nobs

The following objects are masked from ‘package:base’:

as.data.frame, units
```

event documentation built on May 2, 2019, 4:07 a.m.