Programming the statistical procedures from SAS

Fixed effects dummy variables industry and time

Reply
Occasional Contributor
Posts: 7

Fixed effects dummy variables industry and time

 

Hello, 

 

I have the following code for my logistic regression.  However, I need to add industry fixed effects, year fixed effects with  dummy variables.  Could someone help me with this? I am trying to build a longitudinal data for 4 years.  I used strata statement but all the dummy variables are dropped because of redundancy.  Is that correct? Some of two dummy variables do not change over time whereas one does. 

 

Thank you very much in advance.

 

Proc logistic data=Exam.Alltables
plots(only)=(effect oddsratio);

Strata Year Hight_sensitive EPA Emissions_trading;
class High_sensitive (param= ref ref=' No ') EPA (param=ref ref='No ') Emissions_trading (param=ref ref='No ') ;
model disclosure (event= '1 ')= High_sensitive Div_emissions EPA Emissions_trading Assets_LN /
selection=backward;
run;

SAS Employee
Posts: 2

Re: Fixed effects dummy variables industry and time

Hi,

 

without some sample data, it is difficult to tell for sure if the variables should be dropping out, however I did notice one thing in the code that I wanted to ask about.

 

In the "strata" statement you have the following:

 

   Strata Year Hight_sensitive EPA Emissions_trading;

 

but in the class and model statements you have:

 

   class High_sensitive ...

 

is it possible that a simple typo of "Hight_sensitive" rather than "High_sensitive" may be the source of your issues?

 

best of luck!

 

Ryan

 

 

Occasional Contributor
Posts: 7

Re: Fixed effects dummy variables industry and time

Hello Ryan,

 

Thanks for your answer.  Yes, I mistyped here the variable high_sensitive but not in the SAS program.

 

In fact, I tried with this code for year fixed effect after reviewing the book Fixed Effects Regression Methods for Longitudinal data with SAS.

 

Proc logistic data=Exam.Alltables Desc;
class Year /PARAM=REF ;
model disclosure = Year Div_emissions Emissions_trading_num Assets_LN High_sensitive_num EPA_num;
STRATA Year;
run;

 

However, my concern is about Firm fixed effect.  There are around 600 companies for each year (4 years). The results are truly different.  All the variables are dropped out. 

 

Proc logistic data=Exam.Alltables Desc;
class Company_ID /PARAM=REF ;
model disclosure = Company_ID Div_emissions Emissions_trading_num Assets_LN High_sensitive_num EPA_num;
STRATA Company_ID;
run;

 

Please find enclosed sample data 

 

 

 

 

 

Ask a Question
Discussion stats
  • 2 replies
  • 264 views
  • 0 likes
  • 2 in conversation