Description Usage Arguments Details Value References See Also Examples
Calculate a standardized morbidity/mortality ratio (SMR) or the expected number of events in each stratum. The SMR is the number of observed events divided by the expected events.
1 2 3 4 5 6 7 8 9 10 |
count |
A scalar, the number of observed events. |
popn |
A numeric vector containing the size of each stratum in the observed population. |
std_r |
A numeric vector containing the rate or risk of each stratum in the standard population. |
std_measure |
A string to indicate whether the values in |
output_type |
If |
percent |
If |
dist |
A string to indicate the type of probability distribution for the
confidence interval to follow. Can be one of the following: |
interval |
A scalar, between 0 and 1, indicating the width of the
confidence interval. For example, for a 95% confidence interval, use
|
This low-level function assumes that the size of each stratum in the observed population and the rate or risk of each stratum in the standard population are provided in the same order.
To construct confidence intervals for the ratio estimates, arguments must be
supplied to both dist
and interval
.
If output_type == "ratio"
(default) and neither dist
nor interval
is supplied, the SMR is returned as a numeric vector.
If output_type == "ratio"
and both dist
and interval
are provided, then a
data frame with the columns smr
, lower
, upper
and interval
is returned.
If output_type == "counts"
, the expected number of events in each stratum
is returned as a numeric vector.
get_ci_norm()
, get_ci_lnorm()
, get_ci_pois()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
count <- 1500
popn <- c(13358, 13029, 34378, 39649, 11671)
std_r <- c(0.004, 0.003, 0.007, 0.011, 0.013)
get_smr(count = count, popn = popn, std_r = std_r, output_type = "ratio")
get_smr(count = count, popn = popn, std_r = std_r, output_type = "counts")
get_smr(count = count, popn = popn, std_r = std_r, percent = TRUE)
get_smr(
count = count, popn = popn, std_r = std_r,
dist = "normal", interval = 0.95
)
get_smr(
count = count, popn = popn, std_r = std_r,
percent = TRUE, dist = "normal", interval = 0.95
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.