Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Constructing confidence intervals for a sum of forecasts
From
Ian Sue Wing <[email protected]>
To
[email protected]
Subject
st: Constructing confidence intervals for a sum of forecasts
Date
Mon, 26 Jul 2010 13:00:36 -0400
Dear StataListers,
I am generating a dynamic forecast of two variables, x and y, after
running a vector autoregression, and I want to construct the forecast
confidence interval for the sum of their first differences, D.x + D.y.
My question is what is the correct way to do this.
I can easily generate the se's of the first differences of individual
variables using -fcast compute, diff-. Let's call these se_Dx_hat and
se_Dy_hat. It is simple to compute the se of their sum if I assume
independence:
se(Dx_hat+Dy_hat) = sqrt( se_Dx_hat^2 + se_Dy_hat^2 )
However, I am not clear about how to correctly handle potential
correlation in the first-differences, which this expression omits.
From first principles,
D.x + D.y = x(t) - x(t-1) + y(t) - y(t-1)
var(D.x + D.y) = var(D.x) + var(D.y) + 2 cov(D.x, D.y)
Now,
var(D.x) = var(x(t)) + var(x(t-1)) - 2 cov(x(t), x(t-1)) = se_Dx_hat^2,
with a similar expression for y. What I don't have is the covariance term:
2 * [ cov(x(t),y(t)) - cov(x(t),y(t-1)) - cov(x(t-1),y(t)) +
cov(x(t-1),y(t-1)) ] = 2 * [ 2 * cov(x(t),y(t)) - cov(x(t),y(t-1)) -
cov(x(t-1),y(t)) ]
Should I just assume that each of the terms in square brackets is a
constant, given by, first, the data, and second, the appropriate
elements in e(V) generated by my var? If not, can anyone recommend an
alternative way of doing this calculation?
Thanks,
-i
--
Ian Sue Wing 675 Commonwealth Ave., Boston MA 02215
Associate Professor Tel: (617) 353-5741
Dept. of Geography& Environment Fax: (617) 353-5986
Boston University Web: http://people.bu.edu/isw
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/