* * AKAIKE.RPF * RATS Version 8, User's Guide, Example 2.5 * open data haversample.rat calendar(m) 1947 data(format=rats) 1947:1 2007:4 fltg ftb3 set shortrate = ftb3 set longrate = fltg * cmom # constant shortrate{0 to 24} longrate report(action=define,hlabels=||"Lags","Akaike","Schwarz"||,title="Distributed Lag IC") do maxlag=0,24 linreg(cmom,noprint) longrate # constant shortrate{0 to maxlag} compute akaike =log(%rss/%nobs)+%nreg*2.0/%nobs compute schwarz=log(%rss/%nobs)+%nreg*log(%nobs)/%nobs report(row=new,atcol=1) maxlag akaike schwarz end do * * Tag with a * the minimum in the 2nd and in the 3rd columns. * report(action=format,tag=minimum,special=onestar,atcol=2,tocol=2) report(action=format,tag=minimum,special=onestar,atcol=3,tocol=3) * * Use a common format of three decimals to the right. Force the numbers * to align on the decimal point for easy reading. * report(action=format,picture="*.###",align=decimal) report(action=show)