Programming the statistical procedures from SAS

Dummy variable

Accepted Solution Solved
Reply
Contributor
Posts: 69
Accepted Solution

Dummy variable

Hello

 

I am asking for your advice,

 

I have 3 dummy variables with 1/0. These are called :Afirm ,Bfirm ,Cfirm.

I also have a variable called FIRMS that have 3 options:1,2,3. When Afirm=1 than FIRMS=1, When bfirm=1 than FIRMS=2, When cfirm=1 than FIRMS=3.

 

If I run a regression, I understand the meaning of the coeffient of Afirm ,Bfirm ,Cfirm. But is it any meaning for the variable FIRMS?

What is preferable to add in the regression in order to get the difference between the firms?

 

Thanks for your help!

 

 


Accepted Solutions
Solution
‎04-20-2017 01:25 PM
SAS Super FREQ
Posts: 3,556

Re: Dummy variable

It sounds like FIRMS tells you all you need to know. Just use a CLASS statement in a regression procedure, like this:

CLASS FIRMS;

MODEL Y = FIRMS ...;

 

It is not necessary to use the dummy variables in regression. If you are using a SAS procedure (such as PROC REG) that does not support the CLASS statement, you can generate a design matrix (which will have either 3 or 4 columns) by following the advice in the article "Four ways to create a design matrix in SAS."

 

View solution in original post


All Replies
Solution
‎04-20-2017 01:25 PM
SAS Super FREQ
Posts: 3,556

Re: Dummy variable

It sounds like FIRMS tells you all you need to know. Just use a CLASS statement in a regression procedure, like this:

CLASS FIRMS;

MODEL Y = FIRMS ...;

 

It is not necessary to use the dummy variables in regression. If you are using a SAS procedure (such as PROC REG) that does not support the CLASS statement, you can generate a design matrix (which will have either 3 or 4 columns) by following the advice in the article "Four ways to create a design matrix in SAS."

 

☑ This topic is solved.

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

Discussion stats
  • 1 reply
  • 126 views
  • 1 like
  • 2 in conversation