sagarnikam123
2012-Mar-21 07:10 UTC
[R] how calculate seasonal component & cyclic component of time series?
i am new to time series,whatever i know up till now,from that i have uploaded time series file & what to build arma model,but for that i want p & q values(orders) tell me how to calculate best p & q values to find best AIC values for model i am doing but giving error>bhavar<-read.table(file.choose()) #taking time series file > decompose(bhavar$V1)Error in decompose(bhavar$V1) : time series has no or less than 2 periods what this error is telling ? http://r.789695.n4.nabble.com/file/n4491470/tinku.txt tinku.txt -- View this message in context: http://r.789695.n4.nabble.com/how-calculate-seasonal-component-cyclic-component-of-time-series-tp4491470p4491470.html Sent from the R help mailing list archive at Nabble.com.
Arun Kumar Saha
2012-Mar-21 08:38 UTC
[R] how calculate seasonal component & cyclic component of time series?
I think you need to pass a time series object, as given in the help page of decompose() function. From your text file it seems that you are passing a numerical vector which is missing the key element of Index as date for any legitimate time series data. _____________________________________________________ Arun Kumar Saha, FRM QUANTITATIVE RISK AND HEDGE CONSULTING SPECIALIST Visit me at: http://in.linkedin.com/in/ArunFRM
sagarnikam123
2012-Mar-21 09:15 UTC
[R] No its not working, how to calculate best p order value for arma process
> ts<-ts(bhavar$V1) > decompose(ts)Error in decompose(ts) : time series has no or less than 2 periods> HoltWinters(ts)Error in decompose(ts(x[1L:wind], start = start(x), frequency = f), seasonal) : time series has no or less than 2 periods is it true that order of ar(ts) function is p-value used for arma(p,q) calculation> ar(ts)Call: ar(x = ts) Coefficients: 1 2 3 4 5 6 7 8 9 10 11 -0.0979 -0.0380 -0.1823 -0.1096 0.1806 0.0414 -0.1439 0.1093 0.0348 -0.1580 0.2900 Order selected 11 sigma^2 estimated as 0.4339 -- View this message in context: http://r.789695.n4.nabble.com/how-calculate-seasonal-component-cyclic-component-of-time-series-tp4491470p4491673.html Sent from the R help mailing list archive at Nabble.com.
Berend Hasselman
2012-Mar-21 10:25 UTC
[R] how calculate seasonal component & cyclic component of time series?
On 21-03-2012, at 08:10, sagarnikam123 wrote:> i am new to time series,whatever i know up till now,from that > i have uploaded time series file & what to build arma model,but for that i > want p & q values(orders) > tell me how to calculate best p & q values to find best AIC values for model > > i am doing but giving error >> bhavar<-read.table(file.choose()) #taking time series fileIt's a file of numbers.>> decompose(bhavar$V1) > Error in decompose(bhavar$V1) : time series has no or less than 2 periods > > what this error is telling ?You asked a very similar question 8 days ago. You were given answers. If you want to use HoltWinters or decompose you will have to set the frequency of your time series to something > 1. You were told how to do that. You were also told to have a look at the forecast package. Berend
Possibly Parallel Threads
- Estimation and Forecast of Seasonal Component
- stats::decompose - Problem finding seasonal component without trend
- strength of seasonal component
- Decompose function : calculation of each component
- package mgcv inconsistency in help files? cyclic P-spline "cs" not cyclic?