Question
Question 2 (15 points): Using R or R Studio, please refer to birth data in package catdata. Only use the data where the country is
Question 2 (15 points):
Using R or R Studio, please refer to birth data in package catdata. Only use the data where the country is France. We want to know if the weight of babies has the association with cesarean or not in France.
a. Add a new column BWeightG to group to babies weights into three groups: Weight2500 g, 2500 g<Weight4000 g, and AgeMother>4000 g.
b. Plot a stacked bar plot where x axis is the baby weights group (2500, (2500, 4000] and >4000), and y axis is the number of babies who are were born by cesarean. Brief describe what you find in the bar plot.
c. Do a Chi-square test to see if the association between babys weight and cesarean is significant if we use =0.05. Show the observed table and the expected table. What is the degrees of freedom? What is the p-value?
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