Question: Please use Rsutdio or Rmarkdown to answer the questions and show the code! Please use Rsutdio or Rmarkdown to answer the questions and show the
Please use Rsutdio or Rmarkdown to answer the questions and show the code!
Please use Rsutdio or Rmarkdown to answer the questions and show the code!
Please do questions 5,6,7,8
Please do questions 5,6,7,8
Please do not give irrelevant wrong answers or you will receive thumbs down.
If you can complete the requirements, I will give praise and thumbs up.
Thank you very much
Dataset: galton_height.csv
Family,Father,Mother,Gender,Height,Kids 1,78.5,67,M,73.2,4 1,78.5,67,F,69.2,4 1,78.5,67,F,69,4 1,78.5,67,F,69,4 2,75.5,66.5,M,73.5,4 2,75.5,66.5,M,72.5,4 2,75.5,66.5,F,65.5,4 2,75.5,66.5,F,65.5,4 3,75,64,M,71,2 3,75,64,F,68,2 4,75,64,M,70.5,5 4,75,64,M,68.5,5 4,75,64,F,67,5 4,75,64,F,64.5,5 4,75,64,F,63,5 5,75,58.5,M,72,6 5,75,58.5,M,69,6 5,75,58.5,M,68,6 5,75,58.5,F,66.5,6 5,75,58.5,F,62.5,6 5,75,58.5,F,62.5,6 6,74,68,F,69.5,1 7,74,68,M,76.5,6 7,74,68,M,74,6 7,74,68,M,73,6 7,74,68,M,73,6 7,74,68,F,70.5,6 7,74,68,F,64,6 8,74,66.5,F,70.5,3 8,74,66.5,F,68,3 8,74,66.5,F,66,3 9,74.5,66,F,66,1 10,74,65.5,F,65.5,1 11,74,62,M,74,8 11,74,62,M,70,8 11,74,62,F,68,8 11,74,62,F,67,8 11,74,62,F,67,8 11,74,62,F,66,8 11,74,62,F,63.5,8 11,74,62,F,63,8 12,74,61,F,65,1 14,73,67,M,68,2 14,73,67,M,67,2 15,73,66.5,M,71,3 15,73,66.5,M,70.5,3 15,73,66.5,F,66.7,3 16,73,65,M,72,9 16,73,65,M,70.5,9 16,73,65,M,70.2,9 16,73,65,M,70.2,9 16,73,65,M,69.2,9 16,73,65,F,68.7,9 16,73,65,F,66.5,9 16,73,65,F,64.5,9 16,73,65,F,63.5,9 17,73,64.5,M,74,6 17,73,64.5,M,73,6 17,73,64.5,M,71.5,6 17,73,64.5,M,62.5,6 17,73,64.5,F,66.5,6 17,73,64.5,F,62.3,6 18,73,64,F,66,3 18,73,64,F,64.5,3 18,73,64,F,64,3 19,73.2,63,F,62.7,1 20,72.7,69,M,73.2,8 20,72.7,69,M,73,8 20,72.7,69,M,72.7,8 20,72.7,69,F,70,8 20,72.7,69,F,69,8 20,72.7,69,F,68.5,8 20,72.7,69,F,68,8 20,72.7,69,F,66,8 21,72,68,M,73,3 21,72,68,F,68.5,3 21,72,68,F,68,3 22,72,67,M,73,3 22,72,67,M,71,3 22,72,67,F,67,3 23,72,65,M,74.2,7 23,72,65,M,70.5,7 23,72,65,M,69.5,7 23,72,65,F,66,7 23,72,65,F,65.5,7 23,72,65,F,65,7 23,72,65,F,65,7 24,72,65.5,F,65.5,1 25,72,64,F,66,2 25,72,64,F,63,2 26,72,63,M,70.5,5 26,72,63,M,70.5,5 26,72,63,M,69,5 26,72,63,F,65,5 26,72,63,F,63,5 27,72,63,M,69,3 27,72,63,M,67,3 27,72,63,F,63,3 28,72,63,M,73,6

In this part, the dependent variable is the raw height of the child, and the child's gender is one of the independent variables, the other independent one is the mid-height of parent (Father height +1.08 Mother Height) /2 1. Have a scatterplot of child's height vs. mid height of parents, with different colors for male and female of the child. Add smooth lines for male and female separately in the scatterplot. First, plot the smooth lines with same slope. Secondly with different slopes. By looking at the plots, does it look like that the slopes are different even if you didn't force them to be parallel? 2. Run a regression with parallel slopes. Are both independent variables significant? 3. In the linear model in Q2, what is the expected increase in child's height if the mid-height of parents increases by 1 inch? Does this depend on the gender of the child? 4. Run a regression with interaction term. Is the interaction term significant? 5. In the linear model in Q4, what is the expected increase in adult daughter's height if the mid-height of parent increases by 1 inch? What is the expected increase in adult son's height if the mid-height of parent increase by 1 inch? Is there significant difference between these two values? Why? 6. Run two regressions for child's height on mid-height of parents, respectively for adult daughters and sons. Compare the two slopes from the two regressions to the slopes from the interaction model. 7. If you are going to choose a model between Q2 and Q4, which one will you choose? Why? 8. Have the scatterplot, histogram and QQ plot of the residual from the model you choose in Q7, and comment on the assumptions of the multiple regression. What is the R2 from the model
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
