how to find best model of time series?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

how to find best model of time series?

sagarnikam123
i have data in one file below like  & (i have such type of file =200,each file have below type of data)
>t
-0.15264004
0.056076439
-0.07276116
-0.00917326
-0.02069089
-0.00416232
-0.07225855
-0.02654577
-0.06131410
-0.09380202
0.057414014
-0.05239976
0.014397612
0.016145161
-0.00670587
0.018696335
0.036943654
-0.02450233
0.031161705
0.006513503
-0.02892329
-0.00831519
-0.00877744
-0.00634399
-0.02612019
-0.02531800
-0.01435533
0.011148840
-0.01893775
0.029859128
0.029878797
-0.00125987
0.031404385
0.035127606
-0.00191775
0.059797202
-0.03268047
-0.06026960
-0.02216465
-0.08145612
-0.02772806
-0.03171683
-0.02842562
-0.11807898
-0.01457311
-0.12612482
0.409631265
-0.06375234

>plot.ts(t)

i am new to time series,i get plot,but don't know which pattern this is?
tell me how to determine type of time series(seasonal,trend,irregular,etc)
& from 200 such file/plot ,which model should i select as best model for forecasting future events


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 to find best model of time series?

Michael Weylandt
Take a look at

example(HoltWinters)

Michael

On Tue, Mar 13, 2012 at 11:06 AM, sagarnikam123 <[hidden email]> wrote:

> i have data in one file below like  & (i have such type of file =200,each
> file have below type of data)
>>t
> -0.15264004
> 0.056076439
> -0.07276116
> -0.00917326
> -0.02069089
> -0.00416232
> -0.07225855
> -0.02654577
> -0.06131410
> -0.09380202
> 0.057414014
> -0.05239976
> 0.014397612
> 0.016145161
> -0.00670587
> 0.018696335
> 0.036943654
> -0.02450233
> 0.031161705
> 0.006513503
> -0.02892329
> -0.00831519
> -0.00877744
> -0.00634399
> -0.02612019
> -0.02531800
> -0.01435533
> 0.011148840
> -0.01893775
> 0.029859128
> 0.029878797
> -0.00125987
> 0.031404385
> 0.035127606
> -0.00191775
> 0.059797202
> -0.03268047
> -0.06026960
> -0.02216465
> -0.08145612
> -0.02772806
> -0.03171683
> -0.02842562
> -0.11807898
> -0.01457311
> -0.12612482
> 0.409631265
> -0.06375234
>
>>plot.ts(t)
>
> i am new to time series,i get plot,but don't know which pattern this is?
> tell me how to determine type of time series(seasonal,trend,irregular,etc)
> & from 200 such file/plot ,which model should i select as best model for
> forecasting future events
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/how-to-find-best-model-of-time-series-tp4469296p4469296.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [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.

______________________________________________
[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: how to find best model of time series?giving error

sagarnikam123
yes but giving error
> t<-read.table(file.choose())
> t<-ts(t)
> plot(t)
Hit <Return> to see next plot:
> ht<-HoltWinters(t)
Error in decompose(ts(x[1L:wind], start = start(x), frequency = f), seasonal) :
  time series has no or less than 2 periods

what should i do?
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 to find best model of time series?giving error

Berend Hasselman

On 14-03-2012, at 07:22, sagarnikam123 wrote:

> yes but giving error
>> t<-read.table(file.choose())
>> t<-ts(t)
>> plot(t)
> Hit <Return> to see next plot:
>> ht<-HoltWinters(t)
> Error in decompose(ts(x[1L:wind], start = start(x), frequency = f),
> seasonal) :
>  time series has no or less than 2 periods
>
> what should i do?

Read HoltWinters help thoroughly.
Your timeseries should have a frequency > 1.

So how about t <- ts(t, start=??, frequency=4)

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.
Reply | Threaded
Open this post in threaded view
|

Re: how to find best model of time series?& calculate aic value,if i have

sagarnikam123
yes,but i want AIC value to calculate for below value, using frequency =1 in ts() function
>t
-0.15264004
0.056076439
-0.07276116
-0.00917326
-0.02069089
-0.00416232
-0.07225855
-0.02654577
-0.06131410
-0.09380202
0.057414014
-0.05239976
0.014397612
0.016145161
-0.00670587
0.018696335
0.036943654
-0.02450233
0.031161705
0.006513503
-0.02892329
-0.00831519
-0.00877744
-0.00634399
-0.02612019
-0.02531800
-0.01435533
0.011148840
-0.01893775
0.029859128
0.029878797
-0.00125987
0.031404385
0.035127606
-0.00191775
0.059797202
-0.03268047
-0.06026960
-0.02216465
-0.08145612
-0.02772806
-0.03171683
-0.02842562
-0.11807898
-0.01457311
-0.12612482
0.409631265
-0.06375234


in short, i want to know which is best model if i have this type of vectors(t) 200,each having 400 observations at respective time i.e. 1,2,3,4.....400
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 to find best model of time series?& calculate aic value, if i have

Berend Hasselman

On 14-03-2012, at 13:00, sagarnikam123 wrote:

> yes,but i want AIC value to calculate for below value, using frequency =1 in
> ts() function
>> t
> -0.15264004
> 0.056076439
> -0.07276116
> -0.00917326
> -0.02069089
> -0.00416232
> -0.07225855
> -0.02654577
> -0.06131410
> -0.09380202
> 0.057414014
> -0.05239976
> 0.014397612
> 0.016145161
> -0.00670587
> 0.018696335
> 0.036943654
> -0.02450233
> 0.031161705
> 0.006513503
> -0.02892329
> -0.00831519
> -0.00877744
> -0.00634399
> -0.02612019
> -0.02531800
> -0.01435533
> 0.011148840
> -0.01893775
> 0.029859128
> 0.029878797
> -0.00125987
> 0.031404385
> 0.035127606
> -0.00191775
> 0.059797202
> -0.03268047
> -0.06026960
> -0.02216465
> -0.08145612
> -0.02772806
> -0.03171683
> -0.02842562
> -0.11807898
> -0.01457311
> -0.12612482
> 0.409631265
> -0.06375234
>
>
> in short, i want to know which is best model if i have this type of
> vectors(t) 200,each having 400 observations at respective time i.e.
> 1,2,3,4.....400
>
You seem to be changing what you want.
First you wanted seasonal decomposition, you got answers and now you've changed the goal(post).

Well my final answer is look at the forecast package. Maybe auto.arima is what you want.

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.