Page 1 of 1

trap quasi-complete separation

Posted: Sun Mar 16, 2014 4:24 am
by geyer
Hi!
I wonder whether it is possible to trap the quasi-complete separation problem in a program which includes estimating a binary response model. In other words, before the program stops and shows the error message "Quasi-complete separation ...", I'd rather be informed about that case and skip the estimation and/or switch to (sub-optimal) LS (but better than nothing). Ideally, I'd like to gain access to the string in the error message which states which variable perfectly predicts the binary response. In that case I'd be able to drop that variable from the model and re-estimate it (automatically).

Thanks a lot!

~~Alois

Re: trap quasi-complete separation

Posted: Sun Mar 16, 2014 1:33 pm
by EViews Gareth
Use @lasterrstr to get the text of the error.

Re: trap quasi-complete separation

Posted: Wed Mar 19, 2014 7:20 am
by geyer
Use @lasterrstr to get the text of the error.
thanks a lot! just in case anyone is interested, here's my code (though there may be more efficient ways to get the job done):

EQUATION eqHIT.LOGIT {varlist}
STRING les=@LASTERRSTR
IF les<>"" THEN
STRING hs=@WDROP(les,"Quasi-complete separation: ")
SCALAR hpos=@INSTR(hs,">0 perfectly predicts")
hs=@LEFT(hs,hpos-1)
varlist=@WDROP(varlist,hs)
ENDIF

~~Alois