r语言考试代写

## Name:

r语言考试代写 Use the principal components above as independent variables in a multiple regression withthe CPI inflation rate as the dependent variable.

### (1)Using the dataset provided for the midterm.    r语言考试代写

a.Generate 8 principal components from the dataset and graph them in a time series graph.

b.What variable within the dataset is each of the principal components most correlatedwith?

c.Use the principal components above as independent variables in a multiple regression withthe CPI inflation rate as the dependent variable. Are the results statistically significant?

d.Use the principal components above as independent variables in a multiple regression withthe year-over-year change in Industrial productionas the dependent variable. Are the results statistically significant?

### (2)Using the dataset provided for the midterm.    r语言考试代写

a.Generate one principal component by category as displayed in the data dictionary.

b.What variable within the catagory is each of the principal components most correlatedwith?

c.Generate a table illustrating the correlations between each of the principal components.

d.Use the principal components above as independent variables in a multiple regression withthe CPI inflation rate as the dependent variable. Are the results statistically significant?

e.Use the principal components above as independent variables in a multiple regression with the year-over-year change in Industrial productionas the dependent variable. Are the results statisticallysignificant?

### (3)Compare and contrast the methodological assumptions from questions (1) and (2). Do you believe that one approach is preferred to one of theothers?    r语言考试代写

(4)In tone of the lab, a classification tree was applied to the Carseats data set afterconverting Sales into a qualitative response variable. Now we will seek to predict Sales using regression trees and related approaches, treating the response as a quantitative variable.

(a)Split the data set into a training set and a test set.

(b)Fit a regression tree to the training set. Plot the tree, and interpret he results. What test MSE do you obtain?

(c)Use cross-validation in order to determine the optimal level of tree complexity. Does pruning the tree improve the testMSE?

(d)Use the bagging approach in order to analyze this data. What test MSE do you obtain? Use the importance() function to determine which variables are most important.