[Vegan-commits] r1107 - in pkg/vegan: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Jan 7 12:27:21 CET 2010
Author: jarioksa
Date: 2010-01-07 12:27:20 +0100 (Thu, 07 Jan 2010)
New Revision: 1107
Modified:
pkg/vegan/R/fieller.MOStest.R
pkg/vegan/inst/ChangeLog
pkg/vegan/man/MOStest.Rd
Log:
removed doubled adjustment for overdispersion in fieller.MOStest
Modified: pkg/vegan/R/fieller.MOStest.R
===================================================================
--- pkg/vegan/R/fieller.MOStest.R 2010-01-07 09:16:30 UTC (rev 1106)
+++ pkg/vegan/R/fieller.MOStest.R 2010-01-07 11:27:20 UTC (rev 1107)
@@ -2,18 +2,18 @@
function (object, level = 0.95)
{
smodel <- summary(object$mod)
+ ## overdispersion included in cov.scaled
var <- smodel$cov.scaled
fam <- family(object$mod)
- od <- smodel$dispersion
k <- coef(object$mod)
b2 <- -2 * k[3]
u <- -k[2]/2/k[3]
alpha <- (1-level)/2
limits <- numeric(2)
names(limits) <- paste(round(100*(c(alpha, 1-alpha)), 1), "%")
- wvar <- var[2,2] * od
- uvar <- 4 * var[3,3] * od
- vvar <- -2 * var[2,3] * od
+ wvar <- var[2,2]
+ uvar <- 4 * var[3,3]
+ vvar <- -2 * var[2,3]
z <- qnorm(1 - alpha)
g <- z^2 * uvar/b2^2
if (g >= 1) {
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-01-07 09:16:30 UTC (rev 1106)
+++ pkg/vegan/inst/ChangeLog 2010-01-07 11:27:20 UTC (rev 1107)
@@ -12,6 +12,11 @@
* betadisper: 'type = "median"' is now the default type of
analysis.
+ * fieller.MOStest: removed erroneous multiplication of variances
+ by overdispersion, because this was already done in cov.scaled,
+ and therefore was doubled and gave much too wide (up to Infinite)
+ limits.
+
Version 1.16-34 (closed January 2, 2009) -- (codename: Lucia)
* twostagechao: deleted, because question regarding the
Modified: pkg/vegan/man/MOStest.Rd
===================================================================
--- pkg/vegan/man/MOStest.Rd 2010-01-07 09:16:30 UTC (rev 1106)
+++ pkg/vegan/man/MOStest.Rd 2010-01-07 11:27:20 UTC (rev 1107)
@@ -163,9 +163,8 @@
mod
plot(mod)
par(op)
-## Infinite confidence limits (NA)
+## Confidence Limits
fieller.MOStest(mod)
-## Finite limits with the profile
confint(mod)
plot(profile(mod))
}
More information about the Vegan-commits
mailing list