[R] Degrees of freedom for lm in logLik and AIC
peter dalgaard
pdalgd at gmail.com
Wed Mar 30 17:40:32 CEST 2011
On Mar 28, 2011, at 16:53 , Ben Bolker wrote:
> Rubén Roa <rroa <at> azti.es> writes:
>
>>
>>
>> However, shouldn't _free parameters_ only be counted for degrees of
>> freedom and for calculation of AIC?
>> The sigma parameter is profiled out in a least-squares
>> linear regression, so it's not free, it's not a
>> dimension of the likelihood.
>> Just wondering ...
>>
>
> For AIC I think this distinction should only matter for the purposes
> of consistency between computations in different packages/languages/contexts.
> Only the differences between AIC values matter for inference. (If you were
> talking about AICc then I would tend to agree with you -- nuisance
> parameters should not affect 'residual degrees of freedom'/finite-size
> corrections.)
>
You're having me confused... AIC and friends are not within my "core competences" (i.e., I know what they are about, but I don't use them intensively on a daily basis), so I may be completely off base, but AFAICS _residual_ degrees of freedom never enters in the logLik computations. Also, I don't get the point about profiling -- you're just maximizing in two steps: first over sigma then over everything else, how is that different from just maximizing?
On the other hand, I suppose it might be argued that the REML variant really only makes sense as a likelihood for sigma, so should have df=1. After all, it is by definition based on a transformation which makes the mean value parameters disappear.
--
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
More information about the R-help
mailing list