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