Description Usage Arguments Details Author(s) See Also Examples
strate
calculates incidence rates of the cohort.
1 2 |
time |
specify the timer interval when the subject is at risk |
status |
event of interest to calculate incidence: 1 for event, 0 for censored |
strata |
specify variable to calculate stratified rates |
data |
an optional data frame |
fail |
failure event |
perPY |
units to be used in reported rates |
rnd |
Rounding of numbers |
Rates of event occurrences, known as incidence rates are outcome measures in longitudinal studies. In most longitudinal studies, follow-up times vary due to logistic resasons, different periods of recruitment, delay enrolment into the study, lost-to-follow-up, immigration or emigration and death.
Follow-up time in longitudinal studies
Period of observation (called as follow-up time) starts when individuals join
the study and ends when they either have an outcome of interest, are lost-to-
follow-up or the follow-up period ends, whichever happens first. This period is
called person-year-at-risk. This is denoted by PY in strate
function's output and numer of event by D.
Rate
is calcluated using the following formula:
λ = D / PY
Confidence interval of rate
is derived using the following formula:
95\% CI (rate) = rate x Error Factor
Error Factor (rate) = exp(1.96 / √{D})
References:
Essential Medical Statistics, Betty R. Kirkwood & Jonathan A.C. Sterne, Second Edition. Chapter 22, page 229 & 239
Myo Minn Oo (Email: dr.myominnoo@gmail.com | Website: https://myominnoo.github.io/)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
data(lung)
str(lung)
## incidence rates
strate(time, status, data = lung)
strate(time, status, data = lung, per = 100000)
## stratified incidence rates
lung$sex <- factor(lung$sex, levels = c(1:2), labels = c('male', 'female'))
strate(time, status, sex, lung, per = 100000)
strate(time, status, inst, lung, per = 100000)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.