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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.