[R-SIG-Finance] Frequency too high for ets?

Eric Zivot ezivot at u.washington.edu
Tue Sep 23 00:06:45 CEST 2008


This problem is just a limitation of representing your data as a ts object,
not a problem with any exponential smoothing algorithm. The ts class in R is
severely limited in the types of regularly spaced time series data that can
be represented (annual, quaterly or monthly). A simple fix is to redefine
your weekly time series so that it has a frequency of 1 instead of 52; that
is, disregard the fact that you have weekly data and just treat each week as
one observation. 

-----Original Message-----
From: r-sig-finance-bounces at stat.math.ethz.ch
[mailto:r-sig-finance-bounces at stat.math.ethz.ch] On Behalf Of
rkevinburton at charter.net
Sent: Monday, September 22, 2008 11:38 AM
To: Josh Ulrich
Cc: r-sig-finance at stat.math.ethz.ch
Subject: Re: [R-SIG-Finance] Frequency too high for ets?

Thank you. I did get a valiuable technique for debugging that I didn't know
before from your comments.

So from your comments I gather the limit for exponential smoothing is 24.
Not having much experience with exponential smoothing is it unreasonable to
expect an algorithm to handle frequencies > 24? I started out with daily
data (365 observations per year). I quickly realized that there were not any
available fitting algorithms that could handle that degree of resolution. I
tried splitting the year in half and splitting the year into quarters (91
observations per quarter). I finally found that if I have 52 observations
per year I can use arima to fit and ARIMA model to my data. That seemed like
a compromise that I could live with but it was still a compromise. Now if I
want to fit an exponential smoothing model I need to further reduce the
frequency by more than a half. Are there other packages that can handle
this? I would like to be able to forecast down to any given week in the year
if possible. In other words if I feed in something like week 48 I would like
to be able to !
 handle this. Reommendations?

Thank you.

Kevin

---- Josh Ulrich <josh.m.ulrich at gmail.com> wrote: 
> Look at the source:
> 
> > x <- ts(rnorm(52*100),frequency=52)
> > debug(ets)
> > e <- ets(x)
> <snip>
> debug: m <- frequency(y)
> Browse[1]>
> debug: if (m > 24) stop("Frequency too high") Browse[1]> Error in 
> ets(x) : Frequency too high
> 
> --
> http://quantemplation.blogspot.com
> 
> 
> On Mon, Sep 22, 2008 at 12:15 PM,  <rkevinburton at charter.net> wrote:
> > I have a time series that is basically weekly data for a year. So the
frequency on the time-series is 52 (52 weeks (obeservations)/year). I have
3+ years of data. I am trying to fit a model to this data using ets in the
forecast package (exponential smoothing) but I get:
> >
> > Error in ets(.sublist$TimeSeries) : Frequency too high
> >
> > I was looking in the documentation for 'ets' and there was no mention of
the limits but apparently 52 is "too high".  Any suggestions?
> >
> > Thank you.
> >
> > Kevin
> >
> > _______________________________________________
> > R-SIG-Finance at stat.math.ethz.ch mailing list 
> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> > -- Subscriber-posting only.
> > -- If you want to post, subscribe first.
> >

_______________________________________________
R-SIG-Finance at stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.



More information about the R-SIG-Finance mailing list