Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- sas fixed effect in logistic regression

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-22-2020 03:45 AM
(1639 views)

I tried to run fixed effect in logistic regression, fixed effects are industry and year.

code are as following, I think there is some syntax error for model.

/////

PROC LOGISTIC DATA=ipo;

strata industry year;

model y = x1 x2 industry year / rsquare link=logit;

run;

quit;

/////

Is there any way to solve this?

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hard to say without seeing the log. Are you intentionally trying to perform stratified (conditional) regression? If not, use the CLASS statement instead. The doc says "The STRATA statement in PROC LOGISTIC is used to define variables that identify matched sets of observations so that these matched sets can be analyzed using conditional logistic regression, not the usual unconditional logistic regression."

If you have many years and many industries, the stratified regression is probably taking a long time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I see. Thanks a lot!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

sorry if we use CLASS, is it takes a long time and output a long list of result?

what if we only care about the coefficients of x1 and x2 ?

what if we only care about the coefficients of x1 and x2 ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

**model y = x1 x2;**

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

but what if I want to control the fixed effect ,like industry (format is char) and year (format is numerical), as well as cluster the standard error? can you give a complete code for me? thanks a lot

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

thanks i got it

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

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.