[R] ts or xts with high-frequency data within a year
Joshua Ulrich
josh.m.ulrich at gmail.com
Wed Mar 30 17:37:47 CEST 2016
On Wed, Mar 30, 2016 at 10:29 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
> 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.
>
Another guess is that you're running into issues with converting xts
to/from ts. That currently doesn't work well, so you should convert
to zoo and make sure your frequency attribute makes sense before
attempting to decompose.
> 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.
>
> ______________________________________________
> 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.
--
Joshua Ulrich | about.me/joshuaulrich
FOSS Trading | www.fosstrading.com
R/Finance 2016 | www.rinfinance.com
More information about the R-help
mailing list