Skip to main content
Contents Index
Calc
Dark Mode Prev Up Next Scratch ActiveCode Profile
\(
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section 12.5 Summary of Inference for Relative Risk
\(A\)
\(B\)
\(C\)
\(D\)
\(A + C\)
\(B + D\)
Relative Risk Procedures.
Statistic: Ratio of conditional proportions (typically set up to be larger than one) =
\(\frac{\hat{p}_1}{\hat{p}_2}\)
Hypotheses: \(H_0: \frac{\pi_1}{\pi_2} = 1\text{;}\) \(H_a: \frac{\pi_1}{\pi_2} < 1\text{,}\) \(\frac{\pi_1}{\pi_2} > 1\text{,}\) or
\(\frac{\pi_1}{\pi_2} \neq 1\)
p-value: Fisherβs Exact Test or normal approximation on
\(\ln\left(\frac{\hat{p}_1}{\hat{p}_2}\right)\)
Confidence interval for \(\frac{\pi_1}{\pi_2}\text{:}\) Exponentiate endpoints of
\begin{equation*}
\ln\left(\frac{\hat{p}_1}{\hat{p}_2}\right) \pm z^*\sqrt{\frac{1}{A}-\frac{1}{A+C}+\frac{1}{B}-\frac{1}{B+D}}
\end{equation*}
In Two-way Tables applet: Choose Relative Risk as statistic and check box for 95% CI
In R: You can install the fmsb package and use the riskratio command.
fmsb::riskratio(A, B, A+C, B+D, conf.level, p.calc.by.independence = TRUE)
In JMP: From the Contingency Analysis hot spot, choose Relative Risk
Technology Detour β Simulating Random Assignment (two-way tables).
Simulate a random sample (number of successes for group 1) using the hypergeometric distribution
Calculate the number of successes for group 2 (total successes β number of successes group 1)
Convert the counts to proportions
Calculate the difference in proportions, relative risk, etc.
Keep in mind you can use "log" to calculate the natural logs of values. Also recall how you created a Boolean expression in Investigation 3.1 to find the p-value from the simulated results.
You have attempted
of
activities on this page.