Quantcast

i am not getting time series prediction results?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

i am not getting time series prediction results?

sagarnikam123
i have attached file,
1BHP_A.txt
i just want to validate predicting results, i give less 10 digits for prediction & compare results it with previous input data(input file)

> i<-read.table(file.choose())  #attached file taking
> i<-i$V1
> length(i)
[1] 44
> j<-i[1:34]
> pre<-predict(ar(i),n.ahead=10)
> ts.plot(ts(j),pre$pred,col=c(1,5))
> pre$pred
Time Series:
Start = 45
End = 54
Frequency = 1
 [1] -0.01136364 -0.01136364 -0.01136364 -0.01136364 -0.01136364
 [6] -0.01136364 -0.01136364 -0.01136364 -0.01136364 -0.01136364

prediction gives similar values,i.e. straight line.
why this so?
Sagar Nikam
B.Pharm, M.Sc(Bioinformatics)
Software Engineer (Data Research Analyst )
Trendwise Analytics,Bangalore
India
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: i am not getting time series prediction results?

Uwe Ligges-3


On 09.04.2012 13:27, sagarnikam123 wrote:

> i have attached file,
> http://r.789695.n4.nabble.com/file/n4542543/1BHP_A.txt 1BHP_A.txt
> i just want to validate predicting results, i give less 10 digits for
> prediction&  compare results it with previous input data(input file)
>
>> i<-read.table(file.choose())  #attached file taking
>> i<-i$V1
>> length(i)
> [1] 44
>> j<-i[1:34]
>> pre<-predict(ar(i),n.ahead=10)
>> ts.plot(ts(j),pre$pred,col=c(1,5))
>> pre$pred
> Time Series:
> Start = 45
> End = 54
> Frequency = 1
>   [1] -0.01136364 -0.01136364 -0.01136364 -0.01136364 -0.01136364
>   [6] -0.01136364 -0.01136364 -0.01136364 -0.01136364 -0.01136364
>
> prediction gives similar values,i.e. straight line.
> why this so?

  ar(i)

gives:

Call:
ar(x = i)


Order selected 0  sigma^2 estimated as  0.01111

hence an AR 0 process was fitted, i.e. no ar component, just th mean is
used for prediction (and is the only estimated parameter).

  mean(i)
  -0.01136364

Uwe Ligges






>
> --
> View this message in context: http://r.789695.n4.nabble.com/i-am-not-getting-time-series-prediction-results-tp4542543p4542543.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.
Loading...