Title: | Relative Risk Based on the Ratio of Median Unbiased Estimates |
Version: | 0.1.1 |
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>. |
Depends: | R (≥ 3.2.3) |
Imports: | stats |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 6.0.1 |
Suggests: | knitr, rmarkdown |
VignetteBuilder: | knitr |
NeedsCompilation: | no |
Packaged: | 2018-04-05 17:05:06 UTC; m070316 |
Author: | Rickey Carter [aut, cre] |
Maintainer: | Rickey Carter <carter.rickey@mayo.edu> |
Repository: | CRAN |
Date/Publication: | 2018-04-06 12:58:02 UTC |
Function to determine the MUE estimate based on the beta distribution.
Description
This function calculates the median unbiased estimate for a single proportion.
Usage
dobeta(n, y)
Arguments
n |
Number of independent trials. |
y |
Number of successes. |
Value
A number with the MUE estimate
Generate the exact bootstrap interval for the MUE estimate.
Description
This function enumerates the exact bootstrap confidence interval for the MUE-based estimate of the relative risk.
Usage
mue_confidence_interval(n1, p1, n2, p2, alpha)
Arguments
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. |
Value
Returns a matrix of the upper and lower limits for the confidence interval.
Calculate relative risk based on ratio of median unbiased estimators.
Description
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).
Usage
mue_rr(n1, y1, n2, y2, alpha = 0.05)
Arguments
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. |
Value
A dataframe with the various components generated during the estimation along with the MUE-based estimate of the relative risk.
Examples
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)