* * QPROG.RPF * RATS Version 8, User's Guide, from Section 13.2 * open data haversample.rat calendar(m) 1947 data(format=rats) 1947:1 2007:4 fltg ftb3 set shortrate = ftb3 set longrate = fltg * cmom # shortrate{0 to 12} longrate linreg longrate # shortrate{0 to 12} * compute [symmetric] q = %xsubmat(%cmom,1,13,1,13) compute [vector] c = -1.0*%xsubmat(%cmom,14,14,1,13) * compute a=%fill(1,13,1.0) lqprog(c=c,q=q,a=a,b=1.0) x * report(action=define,hlabels=||"Label","OLS","Constrained"||) report(fillby=cols,atrow=1,atcol=1) %eqnreglabels(0) report(fillby=cols,atrow=1,atcol=2) %beta report(fillby=cols,atrow=1,atcol=3) x report(action=show)