George Washington University Model Selection & Automatic Search Procedures Discussion

User Generated

wnxrlybir

Mathematics

George Washington University

Description

Questions about

Understanding Model Selection?

More with Automatic-Search Procedures

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Here ya go.Remember to change the name in the file in the code output (this time it's highlighted in RED at the end of the document)Have a good night!

Assignment #12
Part 1: Understanding Model Selection
Instructions: You must provide a full explanation for the following problems.
1. (based on text p. 376: 9.4) In forward stepwise regression, what advantage is there in using a
relatively small α-to-enter value for adding variables? What advantage is there in using a larger αto-enter value?
In forward stepwise regression, a set of regression models is generated by adding a predictor
variable at each step.
In forward stepwise regression, using a relatively small alpha-to-enter value for adding variables is a
more conservative method that can lead to models which are overestimated.
On the other hand, using a relatively large alpha-to-enter value is a more liberal approach that can
cause too many predictor variables to be allowed into the model.
Each method can be advantageous, depending on the specific goal of the model.

Part 2: More with Automatic-Search Procedures
Instructions: Use statistical software to answer the following questions. For each, please provide
any relevant output and your answer to the question.
2. Here we will use forward and backward algorithms with partial F-tests at each step. This tool is
in the package SignifReg (significance testing in regression model building).
> install.packages("SignifReg")
> library(SignifReg)
Longley's macroeconomic data set is pre-loaded in R. We’ll use it to predict the unemployment
rate. Enter the following to see the variables in the data set.
> data(longley)
> names(longley)
a) Let’s try the search procedure. For will start with forward selection. Remember that in this
method we start with the model that includes only the intercept. Enter:
> null = lm( Unemployed ~ 1, data=longley )
> SignifReg( null )
Paste your output. (You should see that of all available variables, R selected only the Population,
*Gross National Product and Year. )
> #2a
> null = lm( Unemployed ~ 1, data=longley )
> SignifReg( null )
Call:
lm(formula = Unemployed ~ Population + GNP + Year, data = longley)
Coefficients:
(Intercept)
Population
-1.840e+05
3.924e+01

GNP
-6.599e+00

Year
9.326e+01

b) By default, each F-test is at the α-to-enter level 𝛼 = 0.05. Now we will try other α-to-enter
levels. To designate the level, such as α-to-enter=0.2, use the alpha= as follows:
> SignifReg( null, alpha=0.2)
Try α-to-enter levels of 0.2 and 0.001. Paste the results for both. Comment on the results.
> #2b
> SignifReg( null, alpha=0.2)
Call:
lm(formula = Unemployed ~ Population + GNP + Year + Armed.Forces +
GNP.deflator, data = longley)
Coefficients:
(Intercept)
lator
-1.524e+05
9e+00

Population

GNP

Year

Armed.Forces

GNP.def

3.510e+01

-6.484e+00

7.686e+01

-2.714e-01

9.64

> SignifReg( null, alpha=0.001)
Call:
lm(formula = Unemployed ~ 1, data = longley)
Coefficients:
(Intercept)
319.3

At an alpha level of 0.2, the model was found to contain an intercept value and the following
predictor variables: Population, GNP, Year, Armed.Forces, and GNP.deflator.
However, at alpha level of 0.001, the model only contained an intercept value.
This means that at this lower significance level, there are no predictor variables that are deemed as
significant in the model.

c) Backward elimination is similar, and we can set a desired α-to-remove level (0.05 is still the
default). Remember that with backward elimination we start with the full model that includes all
possible predictor variables. To do this enter:
> full = lm( Unemployed ~ ., data=longley )
> SignifReg( full, direction="backward" )
Paste your results.
> #2c
> full = lm( Unemployed ~ ., data=longley )
> SignifReg( ful...


Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags