BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.

Hi,

I'm using proc regression and i want to freeze a few variables. In other words, i dont want a few variables to get dropped. I'm trying to build a code, which can be used going forward. And where the user does not need to keep manually force including these variables.

Any ideas how i can take this forward?

Regards,

Nimish

1 ACCEPTED SOLUTION

Accepted Solutions
stat_sas
Ammonite | Level 13

Hi,

Put INCLUDE=n  in model statement, that forces the first n independent variables listed in the MODEL statement to be included in all models.

Thanks,

Naeem

View solution in original post

6 REPLIES 6
stat_sas
Ammonite | Level 13

Hi,

Put INCLUDE=n  in model statement, that forces the first n independent variables listed in the MODEL statement to be included in all models.

Thanks,

Naeem

Nimish_Vaddiparti
Calcite | Level 5

Hi,

Can you help with the statement? As in where should i add the include option?

Cheers,

Nimish

stat_sas
Ammonite | Level 13

Hi,

proc reg data=have;

model  y=x1 x2 x3 x4/include=2 selection=forward;

quit;

First two variables x1 and x2 will be included in the model.

Thanks,

Naeem

Nimish_Vaddiparti
Calcite | Level 5

Hi Naeem,

I'm looking to use the regression output to build a new model. Lets say i have 10 variables in my initial model. And out of the 10, 2 have a high p -value. Now, I want to rerun my regression equation, after excluding these two variables, without having to manually write the code. Is this possible? If yes, can you suggest the best way forward.

Regards,

Nimish

stat_sas
Ammonite | Level 13

Hi,

Is there any cut off value to decide whether p-value high or not?

Thanks,

Naeem

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

I don't like the idea of automating this based on fixed p values. Model building should involve judgements and interpretation. All the stepwise procedures are VERY dangerous to start with, unless derived models are tested on independent data (at a minimum). p values can be very misleading in stepwise procedures. I highly recommend that you check out the GLMSELECT procedure for better ways of selecting predictor variables. The SAS Global Forum has some nice articles on use of this procedure.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 6 replies
  • 2004 views
  • 9 likes
  • 3 in conversation