computing residuals

Questions and discussions on Vector Autoregressions
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

computing residuals

Unread post by tclark »

Suppose I have a VAR in y that includes a set of deterministic terms contained in x, of a form such as y(t) = A(L) y(t-1) + B*x(t) + e(t), and I need to perform computations with not the actual residual e(t) but instead with the component y(t) - A(L) y(t-1) = B*x(t) + e(t). The coefficients of A and B are simulated and assigned to the model (i.e., I don't simply get e(t) from the residuals option of ESTIMATE). There are various approaches I might use to computing either y(t) - A(L) y(t-1) or B*x(t) + e(t): using STEPS to get the residuals e(t) and then adding in B*x(t), or by computing y(t) - A(L) y(t-1). Is there an obviously most efficient way of computing either y(t) - A(L) y(t-1) or B*x(t) + e(t)? Many thanks.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: computing residuals

Unread post by TomDoan »

I would probably do %MODELSETCOEFFS(mymodel,A~~%zeros(ndeterm,nvar)) followed by FORECAST(MODEL=MYMODEL,STEPS,ERRORS=halfresids,FROM=start,TO=end)

where ndeterm is the number of deterministic variables, nvar is the number of equations, start and end is the sample range---basically, just recompute the system residuals but with the deterministic coefficients zeroed out.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Re: computing residuals

Unread post by tclark »

Great, Tom. Thanks much.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Post Reply