Programming the statistical procedures from SAS

Proc GLMSelect Backward Selection With Many intereaction Terms

Reply
New Contributor
Posts: 2

Proc GLMSelect Backward Selection With Many intereaction Terms

proc glmselect data=data1;

by month;

class day weekday year ;

model percent_change = year| day | weekday dummy1 dummy2 dummy3 /

selection=backward slstay=0.10 details=all stats=all ;

output out=outdata predicted=p_expost residual=r_expost ;

ods output ParameterEstimates=paramest;

run;

ods output off;

 

I am trying to make a model using the year (2007 through 2015), the day of the month (1 through 28-31), and weekday (1 through7), as well as dummy variables, by month (so effectively 12 seperate models, one for each month).  I want to start with all of the interaction terms and then use backward selection to end with only the most significant.  However, when I run the model above, I get the note 'The SLSTAY= option has no effect with the selected options.'  and all of my standard error and t-value columns for parameter estimates are empty. Is there a maximum number of interaction terms you can enter into the model (I'm at 182 total), or is there a problem with my code?

 

Thanks in advance for the help!

   

Respected Advisor
Posts: 4,606

Re: Proc GLMSelect Backward Selection With Many intereaction Terms

If you want the traditional approach for selecting which effect will leave the model based on significance, you must add SELECT=SL to the model statement. By default, SELECT=SBC which is incompatible with SLSTAY=. Check the documentation.

 

The absence of standard errors is probably due to overparameterization, i.e. some parameters cannot be estimated because there isn't enough data to support all the year*day*weekday interactions. Try grouping some of your class levels to reduce their numbers, i.e. weekday -> (workday, weekend), day -> (start, middle, end) of the month.

PG
New Contributor
Posts: 2

Re: Proc GLMSelect Backward Selection With Many intereaction Terms

Thanks!  That works perfectly when I narrow down the number or variables. 

Ask a Question
Discussion stats
  • 2 replies
  • 172 views
  • 0 likes
  • 2 in conversation