Re: [R] Calculating AIC for the whole model in VAR

2013-05-21 Thread Prof Brian Ripley
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

Re: [R] Calculating AIC for the whole model in VAR

2013-05-21 Thread Dimitri Liakhovitski
Sorry, I am using package vars On Tue, May 21, 2013 at 11:09 AM, Prof Brian Ripley rip...@stats.ox.ac.ukwrote: 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:

Re: [R] Calculating AIC for the whole model in VAR

2013-05-21 Thread Prof Brian Ripley
On 21/05/2013 16:11, Dimitri Liakhovitski wrote: Sorry, I am using package vars So you need to report the bug in that package to its maintainer. ?logLik says Value: Returns an object of class ‘logLik’. This is a number with at least one attribute, ‘df’ (*d*egrees of *f*reedom),

Re: [R] Calculating AIC for the whole model in VAR

2013-05-21 Thread Dimitri Liakhovitski
Here is a reproducible example: library(vars) data(Canada) mymodel - VAR(Canada, p = 2, type = const) myLL-logLik(mymodel) AIC(myLL) Why does logLik(mymodel) say that df=NULL? Might this be the reason for AIC(myLL) being numeric(0)? Dimitri On Tue, May 21, 2013 at 11:17 AM, Prof Brian Ripley

Re: [R] Calculating AIC for the whole model in VAR

2013-05-21 Thread Bernhard Pfaff
Am Dienstag, den 21.05.2013, 16:17 +0100 schrieb Prof Brian Ripley: On 21/05/2013 16:11, Dimitri Liakhovitski wrote: Sorry, I am using package vars So you need to report the bug in that package to its maintainer. ?logLik says Value: Returns an object of class ‘logLik’. This