View source: R/DiagnosticStatistics.R
| computeMdrrForRateRatio | R Documentation |
Calculates the minimum detectable relative risk for a two-sample Poisson rate comparison using the Signed Root Likelihood (SRL1) method described by Musonda et al. (2006). This diagnostic assesses whether the study has adequate statistical power to detect clinically meaningful effects in a self-controlled design.
computeMdrrForRateRatio(
exposedPersonTime,
unexposedPersonTime,
exposedEvents,
unexposedEvents,
alpha = 0.05,
power = 0.8
)
exposedPersonTime |
Total person-time in exposed window (in days) |
unexposedPersonTime |
Total person-time in unexposed window (in days) |
exposedEvents |
Number of outcome events in exposed window |
unexposedEvents |
Number of outcome events in unexposed window |
alpha |
Significance level (default: 0.05) |
power |
Desired power (default: 0.80) |
The MDRR is the minimum incidence rate ratio that can be detected with the given sample size, alpha, and power. This implementation uses the SRL1 method from Musonda (2006), which is more accurate for self-controlled studies than standard binomial approximations.
Numeric value representing the MDRR. Values > 10.0 typically indicate low power.
Musonda P, Farrington CP, Whitaker HJ (2006) Samples sizes for self-controlled case series studies, Statistics in Medicine, 15;25(15):2618-31
if (interactive()) {
# Calculate MDRR for a study with 100 exposed person-years and 200 unexposed person-years
mdrr <- computeMdrrForRateRatio(
exposedPersonTime = 36500, # 100 person-years in days
unexposedPersonTime = 73000, # 200 person-years in days
exposedEvents = 10,
unexposedEvents = 15
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.