Dear Minda

I don't think that you need any special package in R.  You can calculate AIC
scores and weights just using some basic functions.  Here is an example:


##these are some models you might want to evaluate
a<-glm(rtsizeB~rtsizeA)
b<-glm(rtsizeB~rtsizeA+mBIO1)
c<-glm(rtsizeB~rtsizeA+mBIO18)
d<-glm(rtsizeB~rtsizeA+mBIO12)
e<-glm(rtsizeB~rtsizeA+mBIO16)


##calculate AIC values and weights for growth models
A<-AIC(a,b,c,d,e)
dA<- -min(A[2])+A[2]
rL<-exp(-0.5*dA)  ##this is the relative likelihood
wAIC<- rL/sum(rL)
wAIC  #this is the weighted AIC score


If however, you need AICc scores, you can just take advantage of the
definitions given by:

AIC<- -2*LL + 2*K
AICc<-AIC + 2*K*(K+1)/(n-K-1)

where LL is the logLik(), K is the the number of parameters in the
fitted model,
and n is the number of observation, so if you know AIC then it is easy to
calculate AICc.

Good Luck!
Kerry Cutler
University of Wyoming


On Wed, Oct 26, 2011 at 9:32 AM, Minda Berbeco <[email protected]> wrote:

> Hello,
>
> I am looking for recommendations for programs to use for calculating AIC
> scores.  I've looked into the AICcmodavg package with R, but the associated
> instructional material is not clear and I have not been able to get it to
> work.  I hear that SAS is good as well, but have not found a good book that
> tells me how to create AIC scores (recommendations would be appreciated).
> I've also looked into SPSS, which according to IBM can create AIC scores,
> but have had no success.
>
> Any recommendations for programs and clear associated instructional
> material
> with information on how to run the program, write the code etc. would be
> greatly appreciated.
>
> Thanks,
>
> Minda Berbeco
> Viticulture and Enology, UC Davis
> [email protected]
>

Reply via email to