[R] Calculating AIC for the whole model in VAR

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue May 21 17:09:55 CEST 2013


On 21/05/2013 16:00, Dimitri Liakhovitski wrote:
> Hello!
>
> I am using package "VAR".

What is that?  There is no such package on CRAN nor BioC.

> I've fitted my model:
> mymodel<-VAR(mydata,myp,type="const")
>
> I can extract the Log Liklihood for THE WHOLE MODEL:
>
> logLik(mymodel)
>
> How could I calculate (other than manually) the corresponding Akaike
> Information Criterion (AIC)?
>
> I tried AIC - but it does not take mymodel:
> AIC(mymodel)
> # numeric(0)
>
> Thank you!
>

This is not reproducible, pace the posting guide.  The default method 
for AIC() should work if the logLik() method is written correctly, so I 
guess it was not.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list