BookmarkSubscribeRSS Feed
DrBee
Calcite | Level 5

Hi,

This is my first time posting.

 

I got a request from a journal reviewer to use a two-way clustering fixed effect model.

I tried a few methods by searching the SAS community and various documents, but I could not find a clear solution.

 

The dependent variable of my data is "firm insolvency(FI, 1 or 0)".

The independent variables are financial variables.

The fixed effects are year(YEAR) and industry(IND).

The cluster is year(YEAR) and firms(FIRM).

 

I tried the SURVEYLOGISTIC code as follows.

 

 PROC SURVEYLOGISTIC DATA = data;
CLUSTER YEAR FIRM;
CLASS YEAR IND ;
MODEL FI(EVENT='1') = SIZE MTB LEV LOSS OCF    YEAR IND;
RUN;

 

The results are the same whether or not the CLUSTER statement is applied. So I guess I am doing it wrong.

Can anyone help me do a two-way clustering in fixed-effect logistic regression? 

Moreover, "PROC LOGISTIC" results shows "Wald Chi-sqaure". But, "PROC SURVEYLOGISTIC" only shows "t-values".

How can I get the "Wald Chi-sqaure" from "PROC SURVEYLOGISTIC"?

 

Also, how does the code change when it is a two-way clustering in fixed-effect OLS regression?

 

Thanks,

5 REPLIES 5
StatDave
SAS Super FREQ
In my experience, when someone says they want to fit a "fixed effects" logistic model to a binary response, they are referring to a conditional logistic model in which the fixed effects are treated as strata. The fixed effects are conditioned out of the model, meaning that the model does not need to estimate the (possibly large number of) individual parameters for the effects - for instance, the parameters for each subject when there is a large number of subjects. That is the advantage of the conditional model - it allows you to estimate the parameters of the other predictors without the need to estimate the many fixed effect parameters which are not of interest and are really just nuisance parameters. Note that another approach with this same benefit is the Generalized Estimating Equations (GEE) model which can be fit in PROC GEE (and GENMOD) but is an entirely different type of model. The conditional logistic model can be fit in PROC LOGISTIC using the STRATA statement. For your situation, you would presumably include FIRM and YEAR in the STRATA statement. An example of a conditional model appears in the PROC LOGISTIC documentation. Note that a possible downside of the conditional model is that strata that contain no response variation are uninformative to the model and are ignored. So, it is possible that a large proportion of the strata could be ignored if that situation is common. Such data are not ignored in the GEE model. A thorough and very readable discussion of fixed effects models and implementing them in SAS can be seen in Paul Allison's book, "Fixed Effects Regression Methods for Longitudinal Data Using SAS."
sbxkoenk
SAS Super FREQ

Hello @DrBee ,

 

SAS has three dedicated procedures for panel data regression (time series cross sectional data regression), being :

  • SAS/ETS PROC PANEL
  • SAS/ETS PROC HPPANEL
  • SAS Econometrics PROC CPANEL

Unfortunately, neither of them support binary dependent variables.

 

On top of what @StatDave writes, you can also look into :

  • PROC NLMIXED (but you should feel confident in programming likelihood functions)
  • PROC GLIMMIX

I think your reviewer wants you to use "clustered (robust) standard errors".
That can be done with all three panel procedures, but, as said before, not for a binary outcome.

Good luck,

Koen

StatDave
SAS Super FREQ
I should note that the default variance estimator used in the GEE model in PROC GEE is a robust estimator.
DrBee
Calcite | Level 5
Dear, Koen

Thank you for the reply.
"Unfortunately, neither of them support binary dependent variables."
That was the same conclusion that I made after looking into many references.
I guess I should contact the editor and reviewer for further details.
Anyway, I will update the progress.
DrBee
Calcite | Level 5

Dear, StatDave_sas

 

Thanks for your kind reply.

I will try the STRATA statement and look into Paul Allison's book that you recommended.

 

Thank you very much!

 

 

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is ANOVA?

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.

Discussion stats
  • 5 replies
  • 1549 views
  • 4 likes
  • 3 in conversation