Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[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 <>
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)


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?



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:

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index