/* ** Lesson 13.1: Klein's Model I ** Simultaneous Equation System of Klein's Model I */ use gpe2; output file = gpe\output13.1 reset; load data[23,10] = gpe\klein.txt; a=data[2:23,1]-1931; @ time trend: 1931 = 0 @ c=data[2:23,2]; @ consumption @ p=data[2:23,3]; @ profit income @ w1=data[2:23,4]; @ private wage income @ i=data[2:23,5]; @ investment @ k1=data[2:23,6]; @ lagged capital stock @ x=data[2:23,7]; @ private total income @ w2=data[2:23,8]; @ public wage income @ g=data[2:23,9]; @ government spending @ t=data[2:23,10]; @ tax @ k=k1[2:22]|209.4; @ capital stock @ w=w1+w2; @ total wage income @ yvar=c~i~w1~x~p~k~w; xvar=lag1(x~p~k)~w2~a~g~t; call reset; _names={"c","i","w1","x","p","k","w", "x-1","p-1","k-1","w2","a","g","t"}; _vcov=1; @ C I W1 X P K W XL PL KL W2 A G T 1 @ _eq = {-1 0 0 0 1 0 1 0 1 0 0 0 0 0, 0 -1 0 0 1 0 0 0 1 1 0 0 0 0, 0 0 -1 1 0 0 0 1 0 0 0 1 0 0}; _id = { 1 1 0 -1 0 0 0 0 0 0 0 0 1 0, 0 0 -1 1 -1 0 0 0 0 0 0 0 0 -1, 0 1 0 0 0 -1 0 0 0 1 0 0 0 0, 0 0 1 0 0 0 -1 0 0 0 1 0 0 0}; _begin=2; _method=0; @ OLS estimation @ call estimate(yvar,xvar); _method=1; @ LIML estimation @ call estimate(yvar,xvar); _method=2; @ 2SLS estimation @ call estimate(yvar,xvar); _iter=100; _method=3; @ 3SLS estimation (iterative) @ call estimate(yvar,xvar); _method=4; @ FIML estimation @ call estimate(yvar,xvar); end;