BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ghecht
Calcite | Level 5

Hello, I am trying to run multiple linear regression using proc reg. It is a practice dataset where I am trying to create a predictive model of fuel efficiency from several predictors. When I run the code for stepwise regression, SAS is defaulting to an alpha = 0.15 significance level. I would like to run it at a different significance level, but the "ALPHA=" option does not seem to be working.

  1. I have tried putting the option in the data step when I create a new dataset from the original to code in two dummy vars.
  2. I have tried to put the option on the prog reg line.
  3. I have also put the option on the model statement line.

Nothing is working. Here is my code (note I have tried several ways of putting the "ALPHA=" option as stated above) and the output showing the wrong significance level.

 

Does anyone know why this might not be working?

 

wrong_sig.PNG

 

data Lab1.Auto_dummy;
set Lab1.Auto;
	if Origin1 = 1 then dummy1 = 1;
	if Origin1 = 1 then dummy2 = 0;
	if Origin2 = 1 then dummy1 = 0;
	if Origin2 = 1 then dummy2 = 1;
	if Origin3 = 1 then dummy1 = 0;
	if Origin3 = 1 then dummy2 = 0;
run;

proc reg data = Lab1.auto_dummy;
	model MPG = Cylinders Displacement100ci Horsepower100 
				Weight1000lb Seconds0to60 Year dummy1 dummy2 / SELECTION=stepwise ALPHA=0.05;
run;
1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

The 0.1500 level mentioned in the message refers to the SLSTAY= option.

 

"the stepwise method looks at all the variables already included in the model and deletes any variable that does not produce an F statistic significant at the SLSTAY= level. Only after this check is made and the necessary deletions are accomplished can another variable be added to the model. The stepwise process ends when none of the variables outside the model has an F statistic significant at the SLENTRY= level and every variable in the model is significant at the SLSTAY= level, or when the variable to be added to the model is the one just deleted from it."

 

The ALPHA= option sets the significance value for confidence and prediction intervals and tests (on the final model).

PG

View solution in original post

2 REPLIES 2
PGStats
Opal | Level 21

The 0.1500 level mentioned in the message refers to the SLSTAY= option.

 

"the stepwise method looks at all the variables already included in the model and deletes any variable that does not produce an F statistic significant at the SLSTAY= level. Only after this check is made and the necessary deletions are accomplished can another variable be added to the model. The stepwise process ends when none of the variables outside the model has an F statistic significant at the SLENTRY= level and every variable in the model is significant at the SLSTAY= level, or when the variable to be added to the model is the one just deleted from it."

 

The ALPHA= option sets the significance value for confidence and prediction intervals and tests (on the final model).

PG
ghecht
Calcite | Level 5
Thank you for the information. That makes complete sense. I will use that to set my desired parameters in the model. Thank you again!

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1021 views
  • 3 likes
  • 2 in conversation