Hey, Try the AIC function for your model object. ?AIC Check package fitAR, there are criterion options for BIC. Why use BIC over AIC? I am not sure if it is clear that one is better. Also, if your model is small it shouldn't really make a difference. RegaRds, Ken Hutchison
On Wed, Oct 19, 2011 at 7:22 PM, J Toll <jct...@gmail.com> wrote: > Hi, > > I'm slowly working through Tsay's "Analysis of Financial Time Series" > 3rd ed. I'm trying to replicate Table 2.1 on p.47, which gives PACF, > AIC, and BIC for the monthly simple returns of the CRSP value-weighted > index. > > The data: > http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-ibm3dx2608.txt > > > da <- read.table(" > http://faculty.chicagobooth.edu/ruey.tsay/teaching/fts3/m-ibm3dx2608.txt", > header = TRUE) > > vw <- da[, 3] > > I can replicate the PACF calculations. > > x <- pacf(vw) > > x > Partial autocorrelations of series vw, by lag > > 1 2 3 4 5 6 7 8 9 10 > 0.115 -0.030 -0.102 0.033 0.062 -0.050 0.031 0.052 0.063 0.005 > 11 12 13 14 15 16 17 18 19 20 > -0.005 0.011 -0.048 -0.084 0.012 -0.055 0.078 0.021 -0.048 -0.062 > 21 22 23 24 25 26 27 28 29 > -0.060 0.003 -0.025 0.024 -0.041 0.016 -0.023 0.023 0.029 > > The ar() function returns the same order as indicated in the > book(based on AIC), but the AIC values appear to be adjusted so that > the minimum AIC value is 0. > > > m1 <- ar(vw, method = "mle") > > m1$order > [1] 9 > > m1$aic > 0 1 2 3 4 5 6 > 22.329967 10.990260 12.066700 3.350972 4.365413 2.462650 1.960128 > 7 8 9 10 11 12 > 3.041666 2.243258 0.000000 1.966641 3.942486 5.811573 > > According to the book the AIC values are: > 0 1 2 3 4 5 6 > NA -5.838 -5.837 -5.846 -5.845 -5.847 -5.847 > 7 8 9 10 11 12 > -5.846 -5.847 -5.849 -5.847 -5.845 -5.843 > > Is there a way to get "unadjusted" AIC values(i.e. values that match > the text)? Additionally, is there a way to force ar() to use BIC and > return those values? > > Thank you. > > James > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]]
______________________________________________ R-help@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.