mkratetable | R Documentation |
Function makes rate table with confidence intervals for crude incidences (rates)
mkratetable(formula, data, alpha = 0.05, add.RR = FALSE, lowest.N = 0, ...)
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 |
table with columns named after marginal variables and n, event, incidence, se, exact.lower95ci and exact.upper95ci variables
packages survival is utilized. Frequencies lower than lowest.N replaced by 999999 Person-years scaled by default with 365.25
Jari Haukka jari.haukka@helsinki.fi
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.