[Gretl-users] arima forecasting
Allin Cottrell
cottrell at wfu.edu
Wed Jun 20 21:53:13 EDT 2007
On Wed, 20 Jun 2007, walgula at wp.pl wrote:
> Hello, I'm trying to use an a raima model to forecasting. How to
> write a script that forecasts forwards some variable? I've
> dataset/file that includes "X" observations in time and i want
> to forecast this observation in time hour+1 or hour+2 forewards.
> How to do it? I know that I should to use "fcast" or "fcasterr"
> functions, but i don't know how to get time parameters.
Example:
# open Ramanathan hourly data set
open data10-2.gdt
# arma (1,1) for electricity usage
arima 1 0 1 ; 2
# add 3 observations for out of sample forecast
addobs 3
# display out-of-sample forecast
fcasterr 32:01 32:03
The "32:01" and "32:03" above are the starting and ending
observations for the forecast. If the hourly data were not
notated as "day:hour" you might do something like
fcasterr 101 103
(assuming the original data went to obs 100, and you want an
out-of-sample forecast).
Allin Cottrell
More information about the Gretl-users
mailing list