Title: | Relative Risk Based on the Ratio of Median Unbiased Estimates |
---|---|
Description: | Implements an estimator for relative risk based on the median unbiased estimator. The relative risk estimator is well defined and performs satisfactorily for a wide range of data configurations. The details of the method are available in Carter et al (2010) <doi:10.1111/j.1467-9876.2010.00711.x>. |
Authors: | Rickey Carter [aut, cre] |
Maintainer: | Rickey Carter <[email protected]> |
License: | GPL-3 |
Version: | 0.1.1 |
Built: | 2025-03-11 03:29:35 UTC |
Source: | https://github.com/rickeycarter/muerelativerisk |
This function calculates the median unbiased estimate for a single proportion.
dobeta(n, y)
dobeta(n, y)
n |
Number of independent trials. |
y |
Number of successes. |
A number with the MUE estimate
This function enumerates the exact bootstrap confidence interval for the MUE-based estimate of the relative risk.
mue_confidence_interval(n1, p1, n2, p2, alpha)
mue_confidence_interval(n1, p1, n2, p2, alpha)
n1 |
Sample size for group 1. |
p1 |
MUE estimate calculated by the dobeta function for group 1. |
n2 |
Sample size for group 2. |
p2 |
MUE estimate calculated by the dobeta function for group 2. |
alpha |
The significance level for the confidence interval. |
Returns a matrix of the upper and lower limits for the confidence interval.
This function calculates an estimate of relative risk based on the ratio of two median unbiased estimates of proportions based on the work by Carter et al (2010). The relative risk will be in the order of Pr(Group 1) / Pr(Group 2).
mue_rr(n1, y1, n2, y2, alpha = 0.05)
mue_rr(n1, y1, n2, y2, alpha = 0.05)
n1 |
Sample size for group 1. |
y1 |
Number of events in group 1. |
n2 |
Sample size for group 2. |
y2 |
Number of events in group 2. |
alpha |
The significance level for the confidence interval. Default value is 0.05. |
A dataframe with the various components generated during the estimation along with the MUE-based estimate of the relative risk.
mue_rr(9,1,11,0) mue_rr(9,1,11,0,0.05) mue_rr(3,0,4,0,0.05) mue_rr(12,1,15,1,0.15)
mue_rr(9,1,11,0) mue_rr(9,1,11,0,0.05) mue_rr(3,0,4,0,0.05) mue_rr(12,1,15,1,0.15)