* * Martin, Hurn, Harris, "Econometric Modelling with Time Series" * Application 19.9.1, from pp 744-5 * LSTAR Model of U.S. Unemployment * open data usunemp.dat calendar(m) 1948:1 data(format=prn,nolabels,org=columns) 1948:01 2010:03 ur * set dur = ur-ur{1} * linreg(define=ureqn) dur # constant ur{1} * set thresh = ur{1}-ur{13} stats(fract) thresh * * Start with a guess of gamma=2, c=mean * nonlin(parmset=starparms) gamma c compute gamma=2.0,c=%mean,s=sqrt(%variance) * frml glstar = %logistic(gamma*(thresh-c)/s,1) * * Convert the linear equations into FRML's with b1 and b2 as the * coefficient vectors. Put them together with the transition function to * make the STAR formula. * frml(equation=ureqn,vector=b1) b1f frml(equation=ureqn,vector=b2) b2f frml star dur = g=glstar,b1f+g*b2f * nonlin(parmset=regparms) b1 b2 nonlin(parmset=starparms) gamma c * * Estimate the model with the STARPARMS left out. * nlls(parmset=regparms,frml=star) dur * * Now use all the parameters. * nlls(parmset=regparms+starparms,frml=star) dur * summarize(parmset=regparms+starparms,title="Low equilibrium") -b1(1)/b1(2) summarize(parmset=regparms+starparms,title="High equilibrium") -(b1(1)+b2(1))/(b1(2)+b2(2))