BookmarkSubscribeRSS Feed
TD
Calcite | Level 5 TD
Calcite | Level 5

I have a macro which is used to do produce a number of Odds ratios for different datasets/subsets etc.. However, some comparisons produce warnings in the SAS log that I want to get rid of properly. The warning I refer is:

WARNING: There is possibly a quasi-complete separation of data points. The maximum likelihood estimate may not exist.

I can't change the model or anything proc logistic. The requirement is to not perform logistic analysis for such data. Is there a way in SAS I could reliably check data if proc logistic will through this warning or not (without producing errors or warnings in the log?). My theoretical solution is a little bit complicated (produce temp dataset to feed into proc logistic, run another SAS session (child process) with %sysexec that will only do proc logistic and check the log/lst/RC for abnormalities after child process finished running). So, I'd like to hear simpler/better approach to this problem.

p.s. NOWARN options is not a solution, because I need to see warnings for other cases and to skip data for logistic regression.

Thanks and happy around exp(7.6078780732785....) !

Kind regards,

Tomas

2 REPLIES 2
ballardw
Super User

Is it practical to use the Firth option with your data?

SteveDenham
Jade | Level 19

I like the Firth penalized ML method, but if that is not available due to prior decisions, I would try something like:

proc means data=yourdata nway noprint;

class iv1--iv<how many independent variables you have>

var dependent;

output out=datachek sum=sum;

run;

I would then look at any situations where the sum was zero for one of the combinations of the independent variables.  By including appropriate ID variables, you could then exclude these cases from the dataset.  This assumes that the quasi-separability arises from categorical predictors which have only zeroes (or ones, but it is easier to find the zeroes) for some combination of the predictors.

Steve Denham

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 2 replies
  • 3152 views
  • 0 likes
  • 3 in conversation