Hello Tom
I revised the examples about @seasonaldlm, but, I couldn´t run the code because I don´t have the data sets. You known where I can find those data sets for these examples.
Thanks for your help
Best regards
@SeasonalDLM(type=fourier,a=as,c=cs,f=fs,SPAN=12)
@LocalDLM(a=al,c=cl,f=fl)
dec symm sigmav(2,2) sigmal(2,2) sigmas(2,2)
dec symm sw
compute a=(al~\as)~\(al~\as)
compute f=(fl~\fs)~\(fl~\fs)
compute c=(cl~~cs)~\(cl~~cs)
dec packed pl(2,2) ps(2,2)
compute sw=%zeros(%rows(a),%rows(a))
function %%DLMSetupSW
local integer i
compute sigmal=%ltouterxx(pl),sigmas=%ltouterxx(ps)
compute sw(1,1)=sigmal(1,1),sw(1,13)=sigmal(1,2),sw(13,13)=sigmal(2,2)
do i=1,11
compute sw(i+1,i+1)=sigmas(1,1)
compute sw(i+1,i+13)=sigmas(1,2)
compute sw(i+13,i+13)=sigmas(2,2)
end do i
end %%DLMSetupSW
compute sigmav=%mscalar(.005),pl=%mscalar(.0003),ps=%mscalar(0.0)
nonlin sigmav pl ps
dlm(start=%%DLMSetupSW(),sw=sw,a=a,c=c,f=f,sv=sigmav,yhat=ysim,type=simulate) 1 500
set y1 = ysim(t)(1)
print / y1 y2
graph 1
# y1
mcorozcos wrote:Hello Tom,
I am writing because, I need estimate a regression with two variables dependents and two variables independents and calculate the residuals, i.e. I need estimate a multivariate regression. And, I don´t know, which is the instruction for I do it.
Can I use “linreg”? but I think this instruction is only for univariate regresion ¿how do I use it? ¿Do I need another instruction? ¿which is new instruction?
I hope you can help me
Thanks
Return to State Space Models/DSGE
Users browsing this forum: No registered users and 0 guests