STAT 415 GWU Statistical Problems Using R Studio Lab Questions Regression problems. With hint to follow. 1. First, we will revisit the mtcars data set

STAT 415 GWU Statistical Problems Using R Studio Lab Questions Regression problems.

With hint to follow.

1. First, we will revisit the mtcars data set built into R. Attach the data file and review the variable names.

> attach(mtcars)

> names(mtcars)

We will begin by looking at some diagnostic tools, starting with the pairwise simple correlation values amongst all variables presented in the correlation matrix. To obtain this enter:

> cor(mtcars)

Paste the results. Is there evidence of multicollinearity? State a few specific correlation values to support your answer.

2. Now let’s look at the variance inflation factors ( ) . To do this, we must define the estimated regression function for predicting mpg based on all other variables and then find the values. The function for is in the car package.

Enter:

> library(car) > reg = lm( mpg ~ ., data=mtcars ) > vif(reg)

Paste the results. What can you conclude about multicollinearity based on these values?

Submit a Comment