Question
Please use R Programming for the following questions. For all figures, please properly label the x and y axes and provide a title for the
Please use R Programming for the following questions. For all figures, please properly label the x and y axes and provide a title for the figure. If there are multiple plotting symbols or different colors in a figure, provide a legend to annotate the figure.
Use the UCBAdmissions dataset inside R for this.
1) For the three-way table, UCBAdmissions,
a) Estimate admission rates for males and females respectively, and test if there is a difference in admission rate between male and female in each department. What is your conclusion based on the results?
b) Pool counts from all departments into one table and estimate admission rates for males and females respectively. Test if there is a difference in admission rates between males and females using pooled data ignoring department. What is your conclusion based on the results? (hint: collapse the table across departments using margin.table(UCBAdmissions,c(1,2)))
c) Estimate odds ratios and relative risks comparing admissions rates between males and females for each department, and provide corresponding 95% confidence intervals. Organize them into a single table with Department as the rows and columns RR, RR 95% L, RR 95% U, OR, OR 95% L, OR 95% U, corresponding to the estimates and their respective upper and lower 95% confidence bounds.
d) Do you think the department is a confounding variable?
* I posted these questions earlier in cheggs as well. The code did not run effectively.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started