Re: [R] AIC questions

2007-09-27 Thread Joe Yarmus
Digging into the R-code behind AIC for gaussian family models, I see: AIC = nobs * (log(dev/nobs * 2 * pi) + 1) + 2 - sum(log(wt)) + 2 * p dev = sum(wt * (y - mean(y))^2 For the unweighted case, this translates directly to -2LL with the penalty number of parameters including both intercept and err

Re: [R] AIC questions

2007-09-26 Thread Wensui Liu
joe, some procs in SAs calculates log likelihood differently than what it is supposed to be. try using proc nlmixed and specifying the LL explicitly. in your case, I has stronger faith in R result instead of SAS result. On 9/26/07, Joe Yarmus <[EMAIL PROTECTED]> wrote: > In accordance with Venable

[R] AIC questions

2007-09-26 Thread Joe Yarmus
In accordance with Venables and Ripley, SAS documentation and other sources AIC with sigma^2 unknown is calculated as: AIC = -2LL + 2* #parameters = n log(RSS/n) + 2p For the fitness data: (http://support.sas.com/ctx/samples/index.jsp?sid=927), SAS gets an AIC of 64.534 with model oxygen = runt