BookmarkSubscribeRSS Feed
Golf
Pyrite | Level 9

Hello everyone,
I have been using proc reg with backward selection and noticed some discrepancies in my results. I ran the same independent variable in the last step of backward selection and obtained different output. Below, I have included the code and the results. Can someone please explain which output is correct? Thank you.

Golf_2-1698914596525.png

Golf_3-1698914636076.png

Compared to the below procedure.

Golf_5-1698914751995.png

 

Golf_6-1698914796251.png

 

 

 

 

 

 

 

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I would conclude from your screen captures that the data set ch6EG.time_series has changed between the two runs. This is apparent because the Corrected Total SS is not the same in the two runs.

--
Paige Miller
Golf
Pyrite | Level 9
Thank You
FreelanceReinh
Jade | Level 19

Hello @Golf,

 

It looks like your first model used only 44 observations of the input dataset ch6EG.time_series, whereas the second model used 46 (see column "DF", row "Corrected Total" in the "Analysis of Variance" table or "Number of Observations Used" in the part of the output not shown). The difference is due to two observations having at least one missing value in the variables that have been eliminated in the process of backward selection.

 

I would prefer the second model because it doesn't seem useful to exclude observations due to missing values in variables that are not used in the model anyway.

 

Here is a similar example using the SASHELP.CLASS dataset:

data class;
set sashelp.class;
if mod(_n_,3) then x=age;
run;

proc reg data=class;
model weight=height x / selection=backward;
quit; /* --> 13 observations used, variable x was removed, leaving Intercept and Height. */

proc reg data=class;
model weight=height;
quit; /* --> Same model, but all 19 observations used, hence different statistics. */
Golf
Pyrite | Level 9

@FreelanceReinh  Thank You.

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 807 views
  • 2 likes
  • 3 in conversation