Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-17 Thread Prof Brian Ripley
On 30/04/2012 12:37, Jouni Helske wrote: Dear all, I'd like to discuss about a possible bug in function StructTS of stats package. It seems that the function returns wrong value of the log-likelihood, as the added constant to the relevant part of the log-likelihood is misspecified. Here is an

Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-03 Thread Thomas Lumley
On Thu, May 3, 2012 at 3:36 AM, Mark Leeds marklee...@gmail.com wrote: Hi Ravi: As far as I know ( well , really read ) and Bert et al can say more , the AIC is not dependent on the models being nested as long as the sample sizes used are the same when comparing. In some cases, say comparing

Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-03 Thread Ravi Varadhan
Thanks, Tom, for the reply as well as to the reference to Claeskens Hjort. Ravi From: Thomas Lumley [tlum...@uw.edu] Sent: Thursday, May 03, 2012 4:41 PM To: Mark Leeds Cc: Ravi Varadhan; r-devel@r-project.org Subject: Re: [Rd] The constant part of the

Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-02 Thread Ravi Varadhan
Comparing such disparate, non-nested models can be quite problematic. I am not sure what AIC/BIC comparisons mean in such cases. The issue of different constants should be the least of your worries. Ravi -Original Message- From: r-devel-boun...@r-project.org

Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-02 Thread Mark Leeds
Hi Ravi: As far as I know ( well , really read ) and Bert et al can say more , the AIC is not dependent on the models being nested as long as the sample sizes used are the same when comparing. In some cases, say comparing MA(2), AR(1), you have to be careful with sample size usage but there is no

Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-01 Thread Ravi Varadhan
This is not a problem at all. The log likelihood function is a function of the model parameters and the data, but it is defined up to an additive arbitrary constant, i.e. L(\theta) and L(\theta) + k are completely equivalent, for any k. This does not affect model comparisons or hypothesis

Re: [Rd] The constant part of the log-likelihood in StructTS

2012-05-01 Thread Jouni Helske
Ok, it seems that R's AIC and BIC functions warn about different constants, so that's probably enough. The constants are not irrelevant though, if you compute the log-likelihood of one model using StructTS, and then fit alternative model using other functions such as arima(), which do take account