[R] Meaning of Error Message from decompose
Prof Brian Ripley
ripley at stats.ox.ac.uk
Sat Feb 2 18:56:53 CET 2008
Please note the request for a reproucible example at the foot of this (and
every) message. Your 'x' looks like a data frame, double-spaced by your
mailer (and your sent HTML when asked not to, probably the cause).
However,
> x <- ts(c(36,44,45,106,38,46,47,112,42,49,48,118,42,50,51,118),
+ freq=4)
> decompose(x)
works, so my guess is that you did not set up a quarterly time series.
On Sat, 2 Feb 2008, Tom La Bone wrote:
> Greetings,
>
>
>
> For the following quarterly data I did a classical decomposition by hand in
> a spreadsheet and got reasonably similar results using Minitab 15.
>
>
>
> x
>
> 1 36
>
> 2 44
>
> 3 45
>
> 4 106
>
> 5 38
>
> 6 46
>
> 7 47
>
> 8 112
>
> 9 42
>
> 10 49
>
> 11 48
>
> 12 118
>
> 13 42
>
> 14 50
>
> 15 51
>
> 16 118
>
>
>
> Trying my luck with R, I tried to use the decompose function but it gives me
> the following:
>
>
>
> Error in decompose(data.t) : time series has no or less than 3 periods
>
>
>
> data.t is indeed a time series (is.ts returns true) and when I plot data.t
> it looks like a times series. Any suggestions on how to use decompose here
> (if it is the right function)? Thanks.
>
>
>
> Tom
>
>
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list