* * Example 3.2 from pp 81-83 * open data table3_2.xls data(format=xls,org=columns) 1 14 y f * dlm(y=y,c=f,a=1.0,sw=.01,sv=1.00,x0=2.0,sx0=.81) / xstates vstates * set dynfit = xstates(t)(1) set dynvar = vstates(t)(1,1)*100.0 * * This is fancier than it needs to be in practice, but shows how to use the * REPORT instruction to generate a table like 3.5. * report(action=define) report(fillby=rows,atrow=1,atcol=1) "t" %seq(1,7) report(fillby=rows,atrow=2,atcol=1) "F_t" (%xsubvec(f,1,7)) report(fillby=rows,atrow=3,atcol=1) "Y_t" (%xsubvec(y,1,7)) report(fillby=rows,atrow=4,atcol=1) "m_t" (%xsubvec(dynfit,1,7)) report(fillby=rows,atrow=5,atcol=1) "100C_t" (%xsubvec(dynvar,1,7)) report(action=format,atrow=2,torow=3,picture="###") report(action=format,atrow=4,torow=5,picture="*.##") * report(fillby=rows,atrow=7,atcol=1) "t" %seq(8,14) report(fillby=rows,atrow=8,atcol=1) "F_t" (%xsubvec(f,8,14)) report(fillby=rows,atrow=9,atcol=1) "Y_t" (%xsubvec(y,8,14)) report(fillby=rows,atrow=10,atcol=1) "m_t" (%xsubvec(dynfit,8,14)) report(fillby=rows,atrow=11,atcol=1) "100C_t" (%xsubvec(dynvar,8,14)) report(action=format,atrow=8,torow=9,picture="###") report(action=format,atrow=10,torow=11,picture="*.##") report(action=show)