[R] Computation of AIC for gls models

Ben Bolker bolker at ufl.edu
Tue Mar 9 15:10:32 CET 2010

Miguel Angel Rodríguez-Gironés Arbolí <rgirones <at> eeza.csic.es> writes:

> Dear Colleagues,
> We are using the phylog.gls.fit() function from the R package 
> "PHYLOGR" (Diaz-Uriarte R, Garland T:
> PHYLOGR: Functions for phylogenetically based statistical
> analyses. 2007. 

> ... we would want to
> use AIC values for model selection. We can obtain
> these values directly with the function AIC(), or from
> the log-likelihood obtained with the logLik() function.
> (The two methods give the same results.)
> We have two questions concerning this procedure:
> 1. Does anybody know whether the output we
>  obtain from the AIC() and logLik() functions is reliable? Does
> the algorithm used for calculating the model
>  likelihood and AIC take into account the non-independence
> of data points? Or are the log-likelihood and 
> AIC calculated using some standard R algorithm that is not
> valid for phylog.gls models or gls?

  Looking at the guts of phylog.gls.fit, I see that it
is using lm() on transformed data (haven't read the paper
referenced in the documentation, or at least not recently),
so I doubt it is OK.
> 2. Is the logLik extracted from phylog.gls 
> suitable for a type-III log-likelhood ratio test?

  What is a type III log-likelihood ratio test?

  I suggest that you send this query to r-sig-phylo at r-project.org
instead; that is the special-interest list for phylogenetic
and comparative methods ... Ted Garland even reads that list

More information about the R-help mailing list