STAT 516 hw 4

Author

Karl Gregory

The code below imports into R a data set containing the self-reported heights (in feet and inches), lengths of index and pinky fingers (in millimeters), shoe size, and shoe size gender (“m”/“w”) of several statistics students. The code then removes an observation with shoe size gender given as “uk” and adds to the data set a column containing the heights in centimeters.

# import the data
link <- url("https://gregorkb.github.io/data/height_length_index_pinky_shoesize_combined.csv")
hl0 <- read.table(link,sep=",",header=T)

# remove a "uk" show size
rmv <- which(hl0$shmw == "uk")
hl <- hl0[-rmv,]

# convert ft and in. to centimeter heights
hl$height <- (hl$ft*12 + hl$in.)*2.54

# view the first few rows of the data frame
head(hl)

It is of interest to use the multiple linear regression model to predict the height of a person based on his or her index and pinky finger lengths, shoe size, and shoe size gender “m” or “w”.

1.

Consider the multiple linear regression model which uses all the covariates—the index and pinky finger lengths, shoe size, and shoe size gender—to predict the height of a person.

1.a

Give the critical value for the overall F test at significance level \(\alpha = 0.05\). This the value such that when it is exceeded by the value of the test statistic \(F_{\operatorname{test}}\) we reject \(H_0\) at \(\alpha = 0.05\).

1.b

Fit the model and give the value of the test statistic for the overall F test of significance as well as the p-value associated with it. Give an interpretation of these values.

1.c

Report the variance inflation factor for each of the four covariates.

2.

Fit a model with all covariates except the shoe size gender covariate.

2.a

Use the full-reduced model F test to test whether the shoe size gender covariate has a nonzero regression coefficient in the full model. Give the value of the test statistic as well as the p value. Interpret the result of your test.

2.b

Obtain the value of the test statistic \(T_{\operatorname{test}}\) and the p value associated with it for testing \(H_0\): \(\beta_j=0\) versus \(H_1\): \(\beta_j \neq 0\) where \(j\) is the index of the shoe size gender covariate.

2.c

Explain the relationship between the value of the test statistic \(F_{\operatorname{test}}\) of the full-reduced model F test when one considers the removal of a single covariate with the test statistic \(T_{\operatorname{test}}\) for testing whether a single covariate is significantly related to the response.

3.

Fit a model using only the two shoe size covariates.

3.a

Use the full-reduced model F test to test whether either of the finger length variables has a nonzero regression coefficient in the full model. Give the value of the test statistic as well as the p value. Interpret the result of your test.

3.b

Compute the variance inflation factors of the two variables in this model. Comment on how these compare to their counterparts in the model with all four covariates.

3.c

Comment on anything else interesting about these two variance inflation factors!

4.

Fit a model using only the index and pinky finger lengths.

4.a

Give the value of the test statistic and the p value for the full-reduced model F test for testing whether either of the two shoe size covariates has a nonzero regression coefficient in the full model. Interpret the result.

4.b

Suppose the index and pinky finger measurements were recorded in centimeters instead of millimeters. Describe the effect this would have on the value of the test statistic \(F_{\operatorname{test}}\) in the previous part as well as on the p value.

5.

5.a

Give the model chosen by backward selection based on the AIC criterion.

5.b

Give the model chosen by forward selection based on the AIC criterion.

6.

Considering your “best” model, check whether there are any outlying observations.