how calculate seasonal component & cyclic component of time series?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

how calculate seasonal component & cyclic component of time series?

sagarnikam123
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 ?

tinku.txt
Sagar Nikam
B.Pharm, M.Sc(Bioinformatics)
Software Engineer (Data Research Analyst )
Trendwise Analytics,Bangalore
India
Reply | Threaded
Open this post in threaded view
|

Re: how calculate seasonal component & cyclic component of time series?

Arun.stat
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: No its not working,how to calculate best p order value for arma process

sagarnikam123
> 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
Sagar Nikam
B.Pharm, M.Sc(Bioinformatics)
Software Engineer (Data Research Analyst )
Trendwise Analytics,Bangalore
India
Reply | Threaded
Open this post in threaded view
|

Re: how calculate seasonal component & cyclic component of time series?

Berend Hasselman
In reply to this post by sagarnikam123

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 file

It'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

______________________________________________
[hidden email] 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.