That is exactly what I needed! I dunno why I did not think about it earlier.... duuhhh!!!
thanks very much!!! sapply(modelos, AIC) did the job! more specifically, (I wanted a dataframe to make comparaisons easy) k=as.data.frame(sapply(modelos,AIC)) df_results=cbind(k,modelo=rownames(k)) So, very much appreciated! This is a great list! H On Tue, Aug 4, 2009 at 4:54 PM, Jean V Adams <jvad...@usgs.gov> wrote: > > Your object models is a list of lm() fits. > So, you could use sapply() to calculate the AIC of each model, and save the > results in a vector: > > sapply(modelos, AIC) > > Hope this helps. > > Jean [[alternative HTML version deleted]] ______________________________________________ R-help@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.