[Mattice-commits] r103 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Dec 22 18:05:29 CET 2008


Author: andrew_hipp
Date: 2008-12-22 18:05:29 +0100 (Mon, 22 Dec 2008)
New Revision: 103

Modified:
   pkg/R/informationCriterion.R
Log:
changed default sample size to 1 so that it won't return an error, but a warning is returned

Modified: pkg/R/informationCriterion.R
===================================================================
--- pkg/R/informationCriterion.R	2008-12-22 17:01:17 UTC (rev 102)
+++ pkg/R/informationCriterion.R	2008-12-22 17:05:29 UTC (rev 103)
@@ -1,4 +1,4 @@
-informationCriterion <- function(u = NULL, lnL = NULL, K, n = 0, names = NULL) {
+informationCriterion <- function(u = NULL, lnL = NULL, K, n = 1, names = NULL) {
 ## Returns information criterion values + weights for a vector of u or lnL, a vector of K (= df), and a single n (sample size); names for analyses are optional
   if(identical(u,NULL)) u <- -2 * lnL # deviance (u) needed; take from lnL if not provided, ignore lnL if provided
   AIC <- vector("numeric", length(u))



More information about the Mattice-commits mailing list