Programming the statistical procedures from SAS

State Fixed effects

Accepted Solution Solved
Reply
Contributor
Posts: 27
Accepted Solution

State Fixed effects

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

 


Accepted Solutions
Solution
‎07-10-2017 04:08 PM
PROC Star
Posts: 7,363

Re: State Fixed effects

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

View solution in original post


All Replies
Solution
‎07-10-2017 04:08 PM
PROC Star
Posts: 7,363

Re: State Fixed effects

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

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 111 views
  • 2 likes
  • 2 in conversation