[Vegan-commits] r1299 - in pkg/gravy: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Sep 8 12:13:55 CEST 2010


Author: jarioksa
Date: 2010-09-08 12:13:55 +0200 (Wed, 08 Sep 2010)
New Revision: 1299

Modified:
   pkg/gravy/R/pick.model.R
   pkg/gravy/inst/ChangeLog
   pkg/gravy/man/HOF.Rd
   pkg/gravy/man/gravy-internal.Rd
Log:
HOF can use AICc in model picking

Modified: pkg/gravy/R/pick.model.R
===================================================================
--- pkg/gravy/R/pick.model.R	2010-09-03 06:47:15 UTC (rev 1298)
+++ pkg/gravy/R/pick.model.R	2010-09-08 10:13:55 UTC (rev 1299)
@@ -1,5 +1,5 @@
 "pick.model" <-
-    function (obj, level = 0.95, test = c("F", "Chisq", "AIC", "BIC"), 
+    function (obj, level = 0.95, test = c("F", "Chisq", "AIC", "AICc", "BIC"), 
               ...) 
 {
     test <- match.arg(test)
@@ -29,6 +29,8 @@
             log(obj$nobs)
         else 2
         ic <- 2*logLik(obj) + k * sapply(obj$models, function(x) length(x$estimate))
+        if (test == "AICc")
+            ic <- ic + 2*k*(k + 1)/(obj$nobs - k - 1)
         model <- (names(ic))[which.min(ic)]
     }
     model

Modified: pkg/gravy/inst/ChangeLog
===================================================================
--- pkg/gravy/inst/ChangeLog	2010-09-03 06:47:15 UTC (rev 1298)
+++ pkg/gravy/inst/ChangeLog	2010-09-08 10:13:55 UTC (rev 1299)
@@ -1,7 +1,8 @@
-Version 0.1-3 September 2, 2010
+Version 0.1-3 September 8, 2010
 	* HOF: gained residuals() method with (useful) 'type's "deviance",
 	"response" and "pearson" plus (useless) 'type = "working"'.
 	* HOF: returns 'family' object.
+	* HOF: added AICc as a criterion of model picking.
 Version 0.1-2 March 18, 2010
 	* ssHOF: HOF gave unnecesarry warnings when used with non-integer
 	data. 
@@ -10,6 +11,7 @@
 	species (on Rob Marrs's request).  
 	* plotGrad: a new name of plot.grad to avoid warnings in R CMD
 	check.
+	* Moved to vegan.r-forge.r-project.org on Nov 24, 2008.
 Version 0.1-0 March 28, 2008
 	* Moved the package to a local svn repository in my PC.
 	* Minimal changes to pass R CMD check with only one warning (about
@@ -17,7 +19,7 @@
 	* DESCRIPTION: updated, Depends lattice
 	* PACKAGE: removed files unnecessary in current R.
 	* hillscale.Rd: broken links corrected.
-	* gravy-internal: canonical etnries for method functions.
+	* gravy-internal: canonical entries for method functions.
 	* nichelap.Rd: canonical links to method functions.
 	* mtf01.Rd: correct chapter heading for \examples{}.
 	* as.matrix.nichelap: added canonical "..."

Modified: pkg/gravy/man/HOF.Rd
===================================================================
--- pkg/gravy/man/HOF.Rd	2010-09-03 06:47:15 UTC (rev 1298)
+++ pkg/gravy/man/HOF.Rd	2010-09-08 10:13:55 UTC (rev 1299)
@@ -46,7 +46,7 @@
   \item{freq.limit}{Lowest frequency of species analysed.}
   \item{level}{Probability for model selection (1-P).}
   \item{test}{Test for model selection. Alternatives are \code{"F"},
-    \code{"Chisq"}, \code{"AIC"}, \code{"BIC"}. }
+    \code{"Chisq"}, \code{"AIC"}, \code{"AICc"} and \code{"BIC"}. }
   \item{type}{the type of residuals which should be returned (see
     \code{\link{residuals.glm}}).}
   \item{species}{Names of the species displayed in graphs.}

Modified: pkg/gravy/man/gravy-internal.Rd
===================================================================
--- pkg/gravy/man/gravy-internal.Rd	2010-09-03 06:47:15 UTC (rev 1298)
+++ pkg/gravy/man/gravy-internal.Rd	2010-09-08 10:13:55 UTC (rev 1299)
@@ -21,7 +21,8 @@
 \method{deviance}{HOF}(object, model, ...)
 \method{logLik}{HOF}(object, ...)
 \method{df.residual}{HOF}(object, model, ...)
-pick.model(obj, level = 0.95,  test = c("F", "Chisq", "AIC", "BIC"), ...)
+pick.model(obj, level = 0.95,  test = c("F", "Chisq", "AIC", "AICc", "BIC"), 
+    ...)
 scale01(x, xrange)
 ssHOF(x,y,M,model=5)
 }



More information about the Vegan-commits mailing list