computeMdrrForRateRatio: Compute Minimum Detectable Relative Risk (MDRR) for rate...

View source: R/DiagnosticStatistics.R

computeMdrrForRateRatioR Documentation

Compute Minimum Detectable Relative Risk (MDRR) for rate ratio

Description

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.

Usage

computeMdrrForRateRatio(
  exposedPersonTime,
  unexposedPersonTime,
  exposedEvents,
  unexposedEvents,
  alpha = 0.05,
  power = 0.8
)

Arguments

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)

Details

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.

Value

Numeric value representing the MDRR. Values > 10.0 typically indicate low power.

References

Musonda P, Farrington CP, Whitaker HJ (2006) Samples sizes for self-controlled case series studies, Statistics in Medicine, 15;25(15):2618-31

Examples


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
)
}


SelfControlledCohort documentation built on June 17, 2026, 5:07 p.m.