Statistical problems using R studio Lab Questions
- First, we will revisit the mtcars data set built into R. Attach the data file and review the variable names.
attach(mtcars)
names(mtcars)
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines
Order Paper Now
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.
- 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?
Sample Solution
The post Statistical problems using R studio Lab Questions appeared first on homework handlers.