plot.proprate2.fit {surv2sample}R Documentation

Plot the Two-Sample Proportionl Rate Model for Censored Data

Description

This function plots estimates of cumulative rates (cumulative hazards or odds functions) for two samples of censored data. It may plot both separate estimates from the two samples and estimates based on the proportional rate model.

Usage

## S3 method for class 'proprate2.fit':
plot(x, log.transform = FALSE, diff = FALSE, lwds = 1, cols = 1,
     ltys, ...)

Arguments

x a "proprate2.fit" object, as returned by proprate2.
log.transform logical. Should the logarithms of cumulative rates be plotted?
diff logical. Instead of two curves, should the difference of their logarithms be plotted?
lwds, cols, ltys vectors of length equal to the number of curves in plots (4 if diff is FALSE, 2 if TRUE). These give line widths, colours and line types for each curve. If of length 1, the value is replicated.
... further plotting parameters.

Details

If diff is FALSE, four curves are plotted (two individual sample estimates and two model based estimates). In this case, ltys defaults to c(1,1,2,2). If diff is FALSE, the function plots their differences. Then ltys defaults to c(1,1). To omit a curve, set the corresponding component of lty to 0.

Using these plots one may visually assess the validity of the proportional rate assumption.

Author(s)

David Kraus (http://www.davidkraus.net/)

See Also

proprate2 for estimation

proprate2.neyman, proprate2.ks, proprate2.gs for tests of the proportional rate assumption

Examples

## chronic active hepatitis data
data(hepatitis)

## fit the proportional odds model
fit = with(hepatitis, proprate2(Surv(time, status), treatment,
    model = 1))

## plot model-based and model-free estimates of odds functions
plot(fit)
## their logarithms
plot(fit, log.transform = TRUE)
## differences of log-functions
plot(fit, diff = TRUE)

[Package surv2sample version 0.1-2 Index]