survRate {biostat3}R Documentation

Describe rates

Description

Describe rates using the Surv function.

Usage

survRate(formula, data, subset, addvars = TRUE, ci=TRUE, ...)

Arguments

formula

formula with the left-hand-side being a Surv function and the right-hand-side being any stratification variables.

data

source dataset

subset

subset conditions for the source dataset

addvars

logical for whether to add the stratification variables to the output (default=TRUE). This is useful for subsequent analysis.

ci

logical for whether to calculate the confidence interval (default=TRUE).

...

other arguments to the poisson.test function for calculation of the confidence intervals.

Value

data-frame with columns tstop, event, rate, lower and upper. Covariates are appended if addvar=TRUE.

Confidence intervals use stats::poisson.test.

Examples

## incidence rates for CHD for low- or high-energy diets
survRate(Surv(y,chd) ~ hieng, data=diet)

[Package biostat3 version 0.1.9 Index]