BookmarkSubscribeRSS Feed
s_nagelhout
Calcite | Level 5

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!

   

2 REPLIES 2
PGStats
Opal | Level 21

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
s_nagelhout
Calcite | Level 5

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1475 views
  • 0 likes
  • 2 in conversation