mkratetable {cohorttools}R Documentation

Function makes rate table with confidence intervals for crude incidences (rates)

Description

Function makes rate table with confidence intervals for crude incidences (rates)

Usage

mkratetable(formula, data, alpha = 0.05, add.RR = FALSE, lowest.N = 0, ...)

Arguments

formula

where Surv object is on lhs and marginal variable(s) on rhs. Marginal variables should usually be factors

data

data.frame to be used

alpha

confidence level, default is 0.05

add.RR

should rate ratio (RR) be added

lowest.N

lowest frequency to be shown

...

additional parameter for function survival::pyears

Value

table with columns named after marginal variables and n, event, incidence, se, exact.lower95ci and exact.upper95ci variables

Note

packages survival is utilized. Frequencies lower than lowest.N replaced by 999999 Person-years scaled by default with 365.25

Author(s)

Jari Haukka jari.haukka@helsinki.fi

See Also

survival pyears

Examples

library(survival)
tmp.lt1<-mkratetable(Surv(time,status)~ sex,data=lung)
tmp.lt2<-mkratetable(Surv(time,status)~ sex+ph.ecog,data=lung,add.RR=TRUE,lowest.N=10)

[Package cohorttools version 0.1.4 Index]