trap quasi-complete separation

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt

geyer
Posts: 11
Joined: Sun Mar 16, 2014 2:46 am

trap quasi-complete separation

Postby geyer » Sun Mar 16, 2014 4:24 am

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

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13323
Joined: Tue Sep 16, 2008 5:38 pm

Re: trap quasi-complete separation

Postby EViews Gareth » Sun Mar 16, 2014 1:33 pm

Use @lasterrstr to get the text of the error.
Follow us on Twitter @IHSEViews

geyer
Posts: 11
Joined: Sun Mar 16, 2014 2:46 am

Re: trap quasi-complete separation

Postby geyer » Wed Mar 19, 2014 7:20 am

EViews Gareth wrote: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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 34 guests