Hello, I have a time series that represents data sampled every 15-minutes. The data currently run from November through February, 8623 total readings. There are definitely daily periodic trends and non-stationary long-term trends. I would love to decompose this using basic time series analysis. However, every time I attempt decomposition, I get the Error in decompose( ) : time series has no or less than 2 periods Is it only possible to do basic time-series analysis if you have a year or more worth of data? That seems absurd to me, since there is definite periodicity and the data are a time series. I have tried every manner of specifying frequency= with no luck (96 does not work). All manner of searching for help has turned up fruitless. Can I only do this after I wait another year or two? Thanks, Ryan -- Ryan Utz, Ph.D. Assistant professor of water resources *chatham**UNIVERSITY* Home/Cell: (724) 272-7769 [[alternative HTML version deleted]]
Code please. Reproducible example?(e.g. 1st 100 values) "PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code." Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Mar 30, 2016 at 8:03 AM, Ryan Utz <utz.ryan at gmail.com> wrote:> Hello, > > I have a time series that represents data sampled every 15-minutes. The > data currently run from November through February, 8623 total readings. > There are definitely daily periodic trends and non-stationary long-term > trends. I would love to decompose this using basic time series analysis. > > However, every time I attempt decomposition, I get the > > Error in decompose( ) : time series has no or less than 2 periods > > Is it only possible to do basic time-series analysis if you have a year or > more worth of data? That seems absurd to me, since there is definite > periodicity and the data are a time series. I have tried every manner of > specifying frequency= with no luck (96 does not work). All manner of > searching for help has turned up fruitless. > > Can I only do this after I wait another year or two? > > Thanks, > Ryan > > -- > > Ryan Utz, Ph.D. > Assistant professor of water resources > *chatham**UNIVERSITY* > Home/Cell: (724) 272-7769 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.
I "think" the problem is that you failed to set the "frequency" attribute of your time series, so it defaults to 1. A time series with one observation per period cannot be decomposed, since the error term is confounded with the "seasonality", which is essentially your error message. Again, a guess, as you provided no code. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Mar 30, 2016 at 8:18 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:> Code please. > > Reproducible example?(e.g. 1st 100 values) > > "PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code." > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Wed, Mar 30, 2016 at 8:03 AM, Ryan Utz <utz.ryan at gmail.com> wrote: >> Hello, >> >> I have a time series that represents data sampled every 15-minutes. The >> data currently run from November through February, 8623 total readings. >> There are definitely daily periodic trends and non-stationary long-term >> trends. I would love to decompose this using basic time series analysis. >> >> However, every time I attempt decomposition, I get the >> >> Error in decompose( ) : time series has no or less than 2 periods >> >> Is it only possible to do basic time-series analysis if you have a year or >> more worth of data? That seems absurd to me, since there is definite >> periodicity and the data are a time series. I have tried every manner of >> specifying frequency= with no luck (96 does not work). All manner of >> searching for help has turned up fruitless. >> >> Can I only do this after I wait another year or two? >> >> Thanks, >> Ryan >> >> -- >> >> Ryan Utz, Ph.D. >> Assistant professor of water resources >> *chatham**UNIVERSITY* >> Home/Cell: (724) 272-7769 >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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.
You said you specified frequency=96 when you constructed the time series, but when I do that the decomposition looks reasonable:> time <- seq(0,9,by=1/96) # 15-minute intervals, assuming time unit is day > measurement <- sqrt(time) + 1/(1.2+sin(time*2*pi)) +rnorm(length(time),0,.3)> plot(decompose(ts(measurement, frequency=96)))How is your code different from the above? Bill Dunlap TIBCO Software wdunlap tibco.com On Wed, Mar 30, 2016 at 8:03 AM, Ryan Utz <utz.ryan at gmail.com> wrote:> Hello, > > I have a time series that represents data sampled every 15-minutes. The > data currently run from November through February, 8623 total readings. > There are definitely daily periodic trends and non-stationary long-term > trends. I would love to decompose this using basic time series analysis. > > However, every time I attempt decomposition, I get the > > Error in decompose( ) : time series has no or less than 2 periods > > Is it only possible to do basic time-series analysis if you have a year or > more worth of data? That seems absurd to me, since there is definite > periodicity and the data are a time series. I have tried every manner of > specifying frequency= with no luck (96 does not work). All manner of > searching for help has turned up fruitless. > > Can I only do this after I wait another year or two? > > Thanks, > Ryan > > -- > > Ryan Utz, Ph.D. > Assistant professor of water resources > *chatham**UNIVERSITY* > Home/Cell: (724) 272-7769 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]