Question: Create thegaltondataset using the code below: library(tidyverse) library(HistData) data(GaltonFamilies) set.seed( 1 ) # if you are using R 3.5 or earlier set.seed( 1 , sample.kind

Create thegaltondataset using the code below:

library(tidyverse) library(HistData) data("GaltonFamilies") set.seed(1) # if you are using R 3.5 or earlier set.seed(1, sample.kind = "Rounding") # if you are using R 3.6 or later galton <- GaltonFamilies %>% group_by(family, gender) %>% sample_n(1) %>% ungroup() %>% gather(parent, parentHeight, father:mother) %>% mutate(child = ifelse(gender == "female", "daughter", "son")) %>% unite(pair, c("parent", "child")) galton 

Question 8

Group bypairand summarize the number of observations in each group.

  1. How many father-daughter pairs are in the dataset?
  2. How many mother-son pairs are in the dataset?

Question 9

Calculate the correlation coefficients for fathers and daughters, fathers and sons, mothers and daughters and mothers and sons.

Which pair has thestrongestcorrelation in heights?

1. fathers and daughters

2.fathers and sons

3.mothers and daughters

4.mothers and sons

Which pair has theweakestcorrelation in heights?

1.fathers and daughters

2.fathers and sons

3.mothers and daughters

4.mothers and sons

Question 10 hastwo parts. The information here applies to both parts.

Uselm()and thebroompackage to fit regression lines for each parent-child pair type. Compute the least squares estimates, standard errors, confidence intervals and p-values for theparentHeightcoefficient for each pair.

1.What is the estimate of the father-daughter coefficient?

2.For every 1-inch increase in mother's height, how many inches does the typical son's height increase?

Question 10b

Which sets of parent-child heights are significantly correlated at a p-value cut off of .05?

Select ALL that apply.

1.father-daughter

2.father-son

3.mother-daughter

4.mother-son

Which of the following statements are true?

Select ALL that apply.

1.All of the confidence intervals overlap each other.

2.At least one confidence interval covers zero.

3.The confidence intervals involving mothers' heights are larger than the confidence intervals involving fathers' heights.

4.The confidence intervals involving daughters' heights are larger than the confidence intervals involving sons' heights.

5.The data are consistent with inheritance of height being independent of the child's gender.

6.The data are consistent with inheritance of height being independent of the parent's gender.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!