Hello Everyone 🙂 ,
I run a logistic regression on my data and I have come across a quasi complete separation error...(understandable because there are no "gravite = 1 or 2" in the response =0 (see proc freq below)
So, I tried Firth logistic option that fixed the separation issue ...but I still get extrem odd ratio.
am I missing something and.. can I fix it?
Thank you very much😊
here is my data set :
outcome "decision" : 0 or 1
var "gravite" categorical : 1,2,3,4,5
var "formation' categorical : 0, EM1, EM2, EM3
proc logistic data = work2 descending;
class gravite (ref='5')/param =ref;
class formation (ref='0')/param=ref;
model decision = gravite formation/ firth ;
run;
The zero counts make some model parameters infinite, so the odds ratios are too. You could merge those two categories with the third one. Or, you could try using the EXACT statement, but the data set is probably too large for exact analysis. You might be able to do it if you use the Monte Carlo method by specifying METHOD=NETWORKMC and N= with a value that isn't too large in the EXACTOPTIONS statement.
Thanks for your answer !
I tried the exact logistic regression with Monte Carlo method but I get an error message for invalid character while I haven't change my data.
I've never done an exact logistic with MC method so maybe something's wrong with my statement..
also I tried différent values for n ... same result
proc logistic data = work2 descending;
class gravite (ref='5')/param =ref;
class formation (ref='0')/param=ref;
model decision = gravite formation;
exact gravite formation/estimate = both;
exactoptions method=networkmc n=100;
run;
Hello,
While I cannot help with the error message (I don't grasp why you would have 'invalid characters'), I can suggest you to read these articles. I'm sure you are interested, given your original question:
Paper 3018-2019 (SAS Global Forum 2019)
Predicting Inside the Dead Zone of Complete Separation in Logistic Regression
Robert Derr, SAS Institute Inc., Cary, NC
https://www.sas.com/content/dam/SAS/support/en/sas-global-forum-proceedings/2019/3018-2019.pdf
Odds ratio plots with a logarithmic scale in SAS
By Rick Wicklin on The DO Loop
July 29, 2015
https://blogs.sas.com/content/iml/2015/07/29/or-plots-log-scale.html
Cheers,
Koen
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.