sagarnikam123
2012-Mar-31 12:17 UTC
[R] Is this is correct way to calculate AIC value for time series ?
i have attached time series file http://r.789695.n4.nabble.com/file/n4521545/1A1I_A_phi_psi_pot_r_k.txt 1A1I_A_phi_psi_pot_r_k.txt i am not understanding formula() function,but what i read,from that 1 st method:-> t<-read.table(file.choose()) #choosing attached file > lm<-lm(t$V1~ 1) # i used Tilde sign > loglik<-logLik(lm) > AIC(loglik)----------------------------------------------------------------------------------------------------------------------------------- 2 nd method:->arr<-ar(t$V1) > str(arr) > arr$aic0 1 2 3 4 5 6 4.273791 4.397484 2.258405 3.008703 1.884487 0.000000 1.476055 7 8 9 10 11 12 13 3.204865 3.544783 5.474194 3.787079 3.873081 5.872812 7.085577 14 15 16 17 18 19 8.762945 10.758352 11.484045 12.837440 7.465485 8.729661 but which is perfect aic value to take ? ? ? ? ? ---------------------------------------------------------------------------------------------------------------------------------- which method correct to calculate classical/general AIC value or my both method are wrong,if yes,then how should i proceed? -- View this message in context: http://r.789695.n4.nabble.com/Is-this-is-correct-way-to-calculate-AIC-value-for-time-series-tp4521545p4521545.html Sent from the R help mailing list archive at Nabble.com.
sagarnikam123
2012-Mar-31 12:23 UTC
[R] Is this is correct way to calculate AIC value for time series ?
i want aic value to find best model from AR & ARMA model i calculate ARMA model via autofit() function from "itsmr" package when i get aic of AR model,then i will compare with ARMA's aicc value is my way logically correct? -- View this message in context: http://r.789695.n4.nabble.com/Is-this-is-correct-way-to-calculate-AIC-value-for-time-series-tp4521545p4521550.html Sent from the R help mailing list archive at Nabble.com.