Hi,
I am running a regression model that has 12 variables, and one state variable. For the State variable (numeric), I want to create a Fixed Effect for each State. Thus, I want to include in the model 49 new variables and leave one out as the reference State. How can I create these 49 variables so that I can include them in the model, please? Each oservation should have only one indicator for State. For example, Observation 1 from NY should have all 48 variables equal 0, and equals one for the NY indicator.
I am using SAS Enterprise guide, but can write the code and run it in SAS Base.
Thanks,
Altijani
Easiest method is probably the one described by Rick at: http://blogs.sas.com/content/iml/2016/02/22/create-dummy-variables-in-sas.html
Art, CEO, AnalystFinder.com
Easiest method is probably the one described by Rick at: http://blogs.sas.com/content/iml/2016/02/22/create-dummy-variables-in-sas.html
Art, CEO, AnalystFinder.com
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.