Skip to content
Prev 312894 / 398502 Next

partial analisys of a time series

HI,
I am getting an error message:
l.blist<-lapply(blist,HoltWinters)
#Error in decompose(ts(x[1L:wind], start = start(x), frequency = f), seasonal) : 
?# time series has no or less than 2 periods
A.K.



----- Original Message -----
From: PIKAL Petr <petr.pikal at precheza.cz>
To: Antonio Silva <aolinto.lst at gmail.com>; "R-help at r-project.org" <R-help at r-project.org>
Cc: 
Sent: Tuesday, December 4, 2012 5:07 AM
Subject: Re: [R] partial analisys of a time series

Hi
Split your data by months to a list, use lapply.

using zoo package

blist <-split(birthstimeseries, months(as.Date(birthstimeseries)))
l.blist <- lapply(blist, HoltWinters)

Regards
Petr
______________________________________________
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.