An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120213/cde75b2f/attachment.pl>
R's AIC values differ from published values
3 messages · david hamer, Bert Gunter, Mark Leeds
This is answered in ?AIC. Have you read it? -- Bert
On Mon, Feb 13, 2012 at 10:22 AM, david hamer <j.david.hamer at gmail.com> wrote:
Using the Cement hardening data in Anderson (2008) Model Based Inference in
the Life Sciences. A Primer on Evidence, and working with the best model
which is
? ?lm ?( ?y ?~ ? x1 ? + ? x2, ? ?data = cement ?)
the AIC value from R is
? ?model ? ?<- ? ?lm ?( formula ? = ? y ? ~ ? x1 ? + ?x2 ?, ? data =
cement ?)
? ?AIC ( model )
64.312
which can be converted to AICc by adding the bias correction factor
2*K*(K+1)/(n-K-1) to give the AICc value of
69.312
(addition of 5, where n=13 and K=4).
This same value, 69.31, can be obtained using R package
AICcmodavg
? library ?( ?AICcmodavg ?)
? data (cement)
? cement
? Cand.models ? <- ? list( )
? Cand.models[[1]] ? <- ? lm ?( ?y ?~ ? x1 ? + ? x2, ? ?data = cement ?)
? Cand.models[[2]] ? <- ? lm ?( ?y ? ?~ ? x3 ? + ? x4, ? ? data = cement ?)
? Cand.models[[3]] ? <- ? lm ?( ?y ? ~ ? x1 + x2 + x1 * x2, ? data =
cement ?)
? Cand.models[[4]] ? <- ? lm ?( ?y ? ~ ? x3 ?+ ?x4 ?+ ?x3 * x4, ? data =
cement ?)
? ? ## ? vector of model names
? Modnames ? <- ? paste("MODEL", 1:4, sep=" ? ? ")
? ? ## ? AICc
? aictab ? ( ?cand.set ? = ? Cand.models, ? modnames ?= ?Modnames ?)
However, the AICc value reported by Anderson (2008) is
32.41.
The AICc value obtained using RSS value (i.e., calculating AICc "manually"
from the output of linear regression) is
32.41.
Thanks for any help.
David
New R user, minimal familiarity with statistics.
? ? ? ?[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120213/f44ae0d2/attachment.pl>