Programming the statistical procedures from SAS

Force PROC REG to include a variable in selection?

Reply
Contributor
Posts: 41

Force PROC REG to include a variable in selection?

I have a variable that I would like to model using another.  The initial relationship isn't very good, but I have a raft of potential covariates. 

 

Is there any way to force certain variables to kept in during selection procedures?  I mean, I can always just sort the list manually from selection Cp, but it would be nice to just lock that one down and look at how the other things shake out.

 

Thanks

Grand Advisor
Posts: 16,908

Re: Force PROC REG to include a variable in selection?

On your model statement, use the INCLUDE= option to specify at least 1 so the first variable will always be included. Make sure to list that variable first in your model statement. 

 

INCLUDE=n

forces the first n independent variables listed in the MODEL statement to be included in all models. The selection methods are performed on the other variables in the MODEL statement. The INCLUDE= option is not available with SELECTION=NONE.

 

Contributor
Posts: 41

Re: Force PROC REG to include a variable in selection?

Ahh... that was a brain lapse for me.  I saw that in the format page and was thinking of something entirely different.

Sorry for such an obvious question.

Ask a Question
Discussion stats
  • 2 replies
  • 350 views
  • 8 likes
  • 2 in conversation