What's the easiest way to create monthly dummy variables in SAS Enterprise Guide? I already have a monthly variable 1-12. Thanks!
Ah, with your clarification it's even a bit easier than my original. You have a "Month" var that is set to 1 thru 12 already?
You want to create "monthly dummy variables" but then you say "I already have monthly dummy variables".
I don't understand the request.
Sorry, I just corrected. I have a monthly variable.
I know how to do it using query builder to recode the monthly variable column 11 different times. Surely there is something easier.
Something like this?
claireluen wrote:
I know how to do it using query builder to recode the monthly variable column 11 different times. Surely there is something easier.
I don't know if this is available through Enterprise Guide, but the easiest way I know of the create dummy variables is PROC GLMMOD.
Ah, with your clarification it's even a bit easier than my original. You have a "Month" var that is set to 1 thru 12 already?
And if you want a more "query-friendly" method, create a 12-row reference table (one for each month value). Example DATA step:
Perfect, thanks.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.