Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[R] Setting deltat parameter in Time Series for forecasting

1 view
Skip to first unread message

AntonioTirri

unread,
Jan 8, 2012, 4:23:37 AM1/8/12
to
I have to forecast a time series of a Internet network traffic
bitrate.
The data are in file http://www.forumaltavilla.it/joomla/datitesi/dati.dat
and the sampling time is every 0.05 seconds.
Now, i want to use HoltWinters forecasting. My problem is setting the
parameter deltat. On the Internet i saw deltat is the number of
samples in a year but in this case deltat=1.58443823e-9 (0.05 seconds
in years). Is it true or should I set deltat=0.05?

Thank you

This is my script.

deltat=0.05
dati.ts=ts(scan("dati.dat", deltat),
start=0,deltat=dt)
model=HoltWinters(dati.ts)
dati.forecast=forecast(model,h=100)
plot(dati.forecast)

PS
If i set deltat=1.58443823e-9 (0.05 seconds in years)
When I type the command

model=HoltWinters(dati.ts)

R gives me the error
"Error in NextMethod("[") : cannot allocate vector of length
1262277040"

even if I take a shorter dati.dat (50 samples) i get the same error.

If i set deltat=1, the error after HoltWinters command is:
"Error in decompose(ts(x[1L:wind], start = start(x), frequency = f),
seasonal) :
time series has no or less than 2 periods"

How can I solve my problem?
Thanks

Rich Ulrich

unread,
Jan 8, 2012, 3:05:55 PM1/8/12
to
On Sun, 8 Jan 2012 01:23:37 -0800 (PST), AntonioTirri
<antoni...@gmail.com> wrote:

>I have to forecast a time series of a Internet network traffic
>bitrate.
>The data are in file http://www.forumaltavilla.it/joomla/datitesi/dati.dat
>and the sampling time is every 0.05 seconds.
>Now, i want to use HoltWinters forecasting. My problem is setting the
>parameter deltat. On the Internet i saw deltat is the number of
>samples in a year but in this case deltat=1.58443823e-9 (0.05 seconds
>in years). Is it true or should I set deltat=0.05?

I don't know about forecasting, or that forecasting in
particular, but I do know something about reading
setup instructions.

First, if "HoltWinters forecasting" wants a parameter in
years, it clearly is oriented to Years -- which is thoroughly
inappropriate (I'm pretty sure) for your model of Internet
traffic. So that says to me that you need to translate
something. Adapt the units.

Second, "number of samples in a year" is a phrase that
I would read as implying an answer that is the reciprocal
of what you took. Many millions, not millionths.

That's my quick reaction.

--
Rich Ulrich
0 new messages