powered by
Function makes rate table with confidence intervals for crude incidences (rates)
mkratetable(formula, data, alpha = 0.05, add.RR = FALSE, lowest.N = 0, ...)
table with columns named after marginal variables and n, event, incidence, se, exact.lower95ci and exact.upper95ci variables
where Surv object is on lhs and marginal variable(s) on rhs. Marginal variables should usually be factors
data.frame to be used
confidence level, default is 0.05
should rate ratio (RR) be added
lowest frequency to be shown
additional parameter for function survival::pyears
Jari Haukka jari.haukka@helsinki.fi
survival pyears
survival
pyears
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)
Run the code above in your browser using DataLab