Dear,

I am trying to estimate how well the U.S. yield spread predicts future inflation.

The regression I am estimating is known as inflation-change forecasting equation and is as follows:

πt+h-12,t+h=α+βspreadt+δπt-12,tt where:

t+h-12,t+h is price inflation over the 12 months beginning in month t+h-12 and ending in month t+h
- spreadt is the yield spread in month t
- πt-12,t is price inflation over the 12 months beginning in month t-12 and ending in month t
- h is the forecast horizon in months

The data I am using for inflation is CPI for All Urban Consumers: All Items for the US and for the spread it is the 1 to 5-years constant yield to maturity rates.

For example say I want to estimate how well the yield spread between a 2-year and a 1-year bond observed at time t predicts the change in inflation 2 years from t.

My regression then becomes: πt+12,t+24=α+βspreadt+δπt-12,tt

The dependent variable is constructed as the twelwth difference of lncpi (i.e. gen cpi12= d12.lncpi). However, the inflation variable on the right hand side is also the twelwth difference of lncpi but is observed at different points in time.

What code should I use to tell Stata that I want the same variable but observed at different points in time for each observation?

Thank you,

Aleksandar Vignjevic