## How to use fixed effects for logit?

Solved
Highlighted
Occasional Contributor
Posts: 10

# How to use fixed effects for logit?

Is the proper way to do fixed effects for logit this...

``````proc surveylogistic data=table;
strata year industry;
model y = x1 x2 x3 /rsquare link=logit;
run;``````

...Or this...

``````proc surveylogistic data=table;
class year industry;
model y = x1 x2 x3 year industry /rsquare link=logit;
run;``````

Thanks!

Accepted Solutions
Solution
‎03-24-2017 02:16 PM
SAS Employee
Posts: 281

## Re: How to use fixed effects for logit?

The fixed effects model is done using the STRATA statement so that a conditional model is implemented. Fixed effects modeling is well discussed and illustrated in the book "Fixed Effects Regression Methods for Longitudinal Data Using SAS"  (Allison, P., SAS Institute, 2005)

All Replies
Solution
‎03-24-2017 02:16 PM
SAS Employee
Posts: 281

## Re: How to use fixed effects for logit?

The fixed effects model is done using the STRATA statement so that a conditional model is implemented. Fixed effects modeling is well discussed and illustrated in the book "Fixed Effects Regression Methods for Longitudinal Data Using SAS"  (Allison, P., SAS Institute, 2005)

Occasional Contributor
Posts: 10

## Re: How to use fixed effects for logit?

Dave,

Thanks for the reply. I've seen that and associated books. I get that doing one-way fixed effects can be done using the STRATA command. However, how about two-way fixed effects? My understanding is, doing STRATA var1 var2 would not necessarily two-way fixed effects.

Thanks!

SAS Employee
Posts: 281

## Re: How to use fixed effects for logit?

I'm not aware of a 1-way, 2-way, n-way distinction for the stratified conditional model.  The only purpose of the STRATA statement is to specify the variable (or variables) needed to distinguish those observations that are in the same stratum from those that are not. You would only need to specify more than one variable if all of the observations in a level of a variable are from more than one stratum. If the unique combinations of two (or more) variables are needed to correctly define the strata, then you would specify two (or more) variables in the STRATA statement.

Occasional Contributor
Posts: 10