Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Out-of-sample prediction: Time dummy problem

From   "Niko Wrede" <>
To   <>
Subject   st: Out-of-sample prediction: Time dummy problem
Date   Wed, 14 Sep 2005 11:07:51 +0200

Dear all,
I estimate a model using an in-sample-dataset (e.g. 1989-1999)and the
xtabond2 command with time dummies. Then I want to predict and calculate
residuals using an out-of-sample-dataset (e.g. 2000-2004) for another time

My problem: Using predict and the out-of-sample-dataset, STATA complains,
that some variables are missing in the dataset, since it cannot find the
time dummies.

Question: How can I predict using only the estimates of the main model
variables without the estimates for the time dummies?

My idea was:
1. Estimate:
Use insample.dta
Xi: xtabond2 depvar var1 var2 i.year (endogvar, lag(2 .)) ivstyle(var1 var2
i.year) rob twostep

2. Predict:
Use outsample.dta
... and then some kind of adjust or xpredict ... But it is not working so
far and I am not sure, if this is the right way. 
Has anybody made a similar out-of-sample prediction and can help me out?

Thanks in advance 

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index