Re: [R] Meaning of Error Message from decompose

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat, 2 Feb 2008 17:56:53 +0000 (GMT)

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

______________________________________________
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.
Received on Sat 02 Feb 2008 - 18:14:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 02 Feb 2008 - 19:30:25 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive