computing residuals
computing residuals
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
Economic Research Dept.
Federal Reserve Bank of Cleveland
Re: computing residuals
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.
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.
Re: computing residuals
Great, Tom. Thanks much.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Economic Research Dept.
Federal Reserve Bank of Cleveland