* * Example 11.3.1, pp 510-512 * open data m-fac9003.txt calendar(m) 1990 data(format=free,org=columns) 1990:1 2003:12 aa age cat f fdx gm hpq kmb mel nyt pg trb txn sp * compute sv=0.1**2,seta=0.02**2,seps=0.04**2 * * Note that the above values are quite far from the ones which maximize the * likelihood. Note that the "C" matrix is actually a time-dependent formula, since * it includes a reference to the series "sp" * dlm(y=gm,c=||1.0,sp||,sv=sv,sw=%diag(||seta,seps||),exact,type=smoothed) / xstates vstates * linreg gm # constant sp * set tvbeta = xstates(t)(2) graph(vgrid=%beta(2),footer="Smoothed estimates of time-varying betas") # tvbeta