Article From: Department of Economics Subject: LGMMHET.PRC Posted by: Information Provider Phone Number: (202) 885-3770 E-Mail Address: econ@american.edu Post Date: 28 Sep 1994 Expiration Date: 28 Oct 2004 LGMMHET.PRC (Ogaki) /* FILE LGMMHET.PRC CONDITIONAL HETEROSCEDASTICITY CASE PROCEDURE LGMM: L*m*tend must be less than 8190. L>=K shoud hold to be identified. Syntax: b=lgmm(y,xp,zp,tend,k,m,l,r); y=|y(1) | y=m*tend by 1 matrix. | | | y(t) mx1 matrix, t=1,..,tend. |y(tend)| xp=|x(1)' | xp=m*tend by k matrix. |x(2)' | x(t) kxm matrix, t=1,..,tend. | | | |x(tend)'| zp=|z(1)' | zp=m*tend by L matrix. |z(2)' | z(t) Lxm matrix, t=1,..,tend. | | | |z(tend)'| tend,k,m,l,r scalars Model: y(t)=x(t)'b+u(t) E[u(t)|I(t)]=0 z(t) is in I(t). u(t) is in I(t+r+1). This Program Calculate and Iterate: initial condition w=I, 1. sigmazy=1/tend*(sum t=1,tend{z(t)y(t)}) sigmazx=1/tend*(sum t=1,tend{z(t)x(t)}) b=inv(sigmazx'*w*sigmazx)*sigmazx'w*sigmazy u(t)=y(t)-x(t)'b Appropriate elements of Rzu(j) will be replaced by zeros. Rzu(j)=1/tend*(sum t=j+1,tend{z(t)u(t)u(t-j)z(t-j)'} j=0,1,..,rm w1=Rzu(0)+{Rzu(1)+Rzu(1)'}+,..,+{Rzu(r)+Rzu(r)'} w=inv(w1) go back to 1. */ PROC LGMM(y,xp,zp,tend,k,m,L,r); local sigmazy,sigmazx,differ,iter,u,v,sd,g,prob,t,ruj,rzuj,vt,ut, zpt,zptj,w,j,i,vtj,utj,yesno,abc,prbnll,zero,df,chi,w0,b; zero=0.1; sigmazy=zp'y/tend; sigmazx=zp'xp/tend; w0=eye(l); df=L-k; differ=10;iter=1; do until differ0; chi=tend*(g'w0*g); prob=1.0-cdfchic(chi,df);endif; ? "ITERATION=" iter; ? " b=" b'; ? " s.d.=" sd'; if df>0; ? " chi square=" chi "(" prob ")"; elseif df==0;? " Just Identified"; else;? " L