Primary endpoint: malaria
Create an informative visualization showing the relationship between malaria diagnosis and treatment group, and briefly comment on the findings from your visualization.
Using Fisher’s exact test, evaluate the null hypothesis that the probability of contracting malaria in the 6 months after vaccination is independent of treatment group.
Now let \(\pi_i\) be the probability study participant \(i\) gets malaria, let \(\mbox{group 1}_i\) take value 1 for those in group 1 and 0 otherwise, let \(\mbox{group 2}_i\) take value 1 for those in group 2 and 0 otherwise, and let \(\mbox{group 3}_i\) take value 1 for those in group 3 and 0 otherwise. Fit the logistic regression model \(logit(\pi_i) = \log\left(\frac{\pi_i}{1-\pi_i}\right)=\beta_0 + \beta_1\mbox{group 1}_i + \beta_2 \mbox{group 2}_i\), and provide a table containing exponentiated estimates and confidence intervals. Interpret your estimates in terms of the subject matter.
Now use the
relevel
command to make group 1 the reference group, so that you can fit the model \(logit(\pi_i) = \log\left(\frac{\pi_i}{1-\pi_i}\right)=\alpha_0 + \alpha_1\mbox{group 2}_i + \alpha_2 \mbox{group 3}_i\) and get a straightforward comparison of group 1 and group 2. (Be sure you show your code block for this question.) Provide an estimate and 95% confidence interval for \(\alpha_1\), use a test to evaluate \(H_0: \alpha_1=0\), and interpret the estimate and test results in terms of the subject matter.Notice that \(\hat{\alpha}_1 \neq \hat{\beta}_2\). Should this be surprising? Explain.