Naive forecasting problem
Naive forecasting problem
Hi all,
I'm trying to build some simple forecasting models but I don't know how to do that with Rats. What I'm supposed to is to build two naive models and have tests for the out-of sample forecast:
model 1: No-change model. The forecast for period t+1 will simply be the observation at time t.
model 2: Historical mean model. The forecast for period t+1 will simpley be the historical mean of the data computed up to period t.
Does anyone know how to bulid these two sample model with Rats? I do need to get the root mean squared error for the out of sample part. Thanks
I'm trying to build some simple forecasting models but I don't know how to do that with Rats. What I'm supposed to is to build two naive models and have tests for the out-of sample forecast:
model 1: No-change model. The forecast for period t+1 will simply be the observation at time t.
model 2: Historical mean model. The forecast for period t+1 will simpley be the historical mean of the data computed up to period t.
Does anyone know how to bulid these two sample model with Rats? I do need to get the root mean squared error for the out of sample part. Thanks
Re: Naive forecasting problem
Model 1 has x=x{1} with no estimated parameters. The equation to represent that isSnow wrote:Hi all,
I'm trying to build some simple forecasting models but I don't know how to do that with Rats. What I'm supposed to is to build two naive models and have tests for the out-of sample forecast:
model 1: No-change model. The forecast for period t+1 will simply be the observation at time t.
model 2: Historical mean model. The forecast for period t+1 will simpley be the historical mean of the data computed up to period t.
Does anyone know how to bulid these two sample model with Rats? I do need to get the root mean squared error for the out of sample part. Thanks
equation(coeffs=1.0) eqn1 x
# x{1}
though if all you need is the one-step-ahead-forecasts, you can do
set naive1 = x{1}
Model 2 has x=mu x CONSTANT (that is, CONSTANT is the only explanatory variable). The simplest way to estimate the rolling values for that is with recursive least squares:
rls(cohistory=mu) x
# constant
The one-step-forecasts would be the lagged value of the mu(1) series:
set naive2 = mu(1){1}
You can use the @UFORERRORS procedure to analyze the forecast errors. That's described in the RATS User's Guide and also at http://www.estima.com/forum/viewtopic.php?f=7&t=1489.
Re: Naive forecasting problem
Thanks Tom. That's what I've done for model 1:TomDoan wrote:Model 1 has x=x{1} with no estimated parameters. The equation to represent that isSnow wrote:Hi all,
I'm trying to build some simple forecasting models but I don't know how to do that with Rats. What I'm supposed to is to build two naive models and have tests for the out-of sample forecast:
model 1: No-change model. The forecast for period t+1 will simply be the observation at time t.
model 2: Historical mean model. The forecast for period t+1 will simpley be the historical mean of the data computed up to period t.
Does anyone know how to bulid these two sample model with Rats? I do need to get the root mean squared error for the out of sample part. Thanks
equation(coeffs=1.0) eqn1 x
# x{1}
though if all you need is the one-step-ahead-forecasts, you can do
set naive1 = x{1}
Model 2 has x=mu x CONSTANT (that is, CONSTANT is the only explanatory variable). The simplest way to estimate the rolling values for that is with recursive least squares:
rls(cohistory=mu) x
# constant
The one-step-forecasts would be the lagged value of the mu(1) series:
set naive2 = mu(1){1}
You can use the @UFORERRORS procedure to analyze the forecast errors. That's described in the RATS User's Guide and also at http://www.estima.com/forum/viewtopic.php?f=7&t=1489.
set fqgdp 2000:1 2011:1 = qgdp{1}
uforecast fqgdp 2000:1 2011:1
@uforeerrors fqgdp qgdp
qgdp is the original data I got. Am I right? your equation for model 1 is not right. When I print out your equation, the forcast resulet is unchanged and I want the forecast result be the last period observation value.
Re: Naive forecasting problem
The default behavior of UFORECAST is "dynamic" forecasts, which would (for model 1) give you the last observed value before the forecast period for all entries. If you're looking for one-step forecasts, you would need UFORECAST(STATIC) ...