Miguel Angel Rodríguez-Gironés Arbolí
2010-Mar-09 10:07 UTC
[R] Computation of AIC for gls models
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. Available at [http://cran.r-project.org/web/packages/PHYLOGR/index.html]) to correct for lack of independence between data points. (In our particular case, the lack of independence is due to common ancestry, hence the choice of PHYLOGR package.) The output provides P values for the variables included in the model, but according to Diaz-Uriarte and Garland (2007) the total F is unreliable. Because there are a number of variables that we could potentially include in the analysis, 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? 2. Is the logLik extracted from phylog.gls suitable for a type-III log-likelhood ratio test? Thanks so much, Miguel Rodriguez-Girones Estación Experimental de Zonas Aridas, CSIC [[alternative HTML version deleted]]
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.[snip]> ... 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 sometimes.