?===================================================================== ? Simultaneous confidence ellipse and confidence regions for two = ? least squares regression slopes. This does not require that the = ? model be a classical regression model. It may be used with any = ? model estimated by the program. For theoretical reasons, if the = ? model is not a classical regression model, a large sample appeal = ? to the Wald statistic and asymptotic normality of the estimates = ? is needed. = ? = ? User must define = ? NAMELIST ; X = ... the RHS list $ = ? CREATE ; Y = ... the dependent variable $ = ? CALC ; J = the first variable whose coefficient is plotted = ? ; K = the second variable whose coefficient is plotted $ = ?===================================================================== PROCEDURE CALC ; nolist ; sjj=varb(j,j) ; skk=varb(k,k) ; sjk=varb(j,k) ; u = sqr(skk - sjk*sjk/sjj) ; F=ftb(.95,2,(n-kreg)) ; g = sqr(2*F*sjj) ; min= -.995*g ; max= -min ; delta=(max-min)/1000 $ SAMPLE ; 1 - 999 $ CREATE ; nolist ;bj=trn(min,delta) ; q=u*sqr(2*F-bj*bj/sjj) ; t=rnn(0,1) ; if(t>0)bk=b(k) + bj*sjk/sjj+q ; (else)bk=b(k) + bj*sjk/sjj-q ; bj=bj+b(j) $ SAMPLE ; 1000$ CREATE ; bj=b(j) ; bk=b(k) $ SAMPLE ; 1-1000$ CALC ; nolist;ucbk=b(k)+1.96*sqr(skk) ; lcbk=b(k)-1.96*sqr(skk) ; ucbj=b(j)+1.96*sqr(sjj) ; lcbj=b(j)-1.96*sqr(sjj) ; top = 1.1 * max(bk) ; bot = .9 * min(bk) ; lft = .9 * min(bj) ; rt = 1.1 * max(bj) $ PLOT ; lhs=bj;rhs=bk ; bars=ucbk,lcbk ; spikes=ucbj,lcbj ; limits = bot,top ; endpoints = lft,rt $ ENDPROC ROWS ; 1000 $ REGRESS ; Lhs = y ; rhs = X $ EXECUTE