[Vegan-commits] r1348 - in pkg/vegan: inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Nov 4 10:35:16 CET 2010
Author: jarioksa
Date: 2010-11-04 10:35:16 +0100 (Thu, 04 Nov 2010)
New Revision: 1348
Modified:
pkg/vegan/inst/ChangeLog
pkg/vegan/man/SSarrhenius.Rd
Log:
finish commit of SS-species-area models
Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog 2010-11-03 16:37:03 UTC (rev 1347)
+++ pkg/vegan/inst/ChangeLog 2010-11-04 09:35:16 UTC (rev 1348)
@@ -4,14 +4,21 @@
Version 1.18-15 (opened November 1, 2010)
+ * Self-starting nls() models for species-area relationship: added
+ Gitay and Lomolino models from Dengler 2009 (J Biogeog 36,
+ 728-744). Some more should be added, but these were among the best
+ in Dengler's simulation. The starting values of the Lomolino model
+ (SSlomolino) need work, as do several other candidate models. The
+ purpose is to use these also in fitspecaccum().
+
* rda: the scaling 'const' can now be a vector of two items: the
first is used for species and the second for sites. This allows
compatibility with Canoco 3.x (but Canoco 4 changed scaling): if
'mod' is an rda() result, and 'nr' is the number of rows in data,
then "scaling = -2, const = c(sqrt(nr-1), sqrt(nr))" in scores(),
summary() or plot() will use default scaling of Canoco 3.x. Help
- page now points to decision decision vignette explaining scaling
- and 'const'.
+ page now points to decision vignette explaining scaling and
+ 'const' (and the vignette needs updating).
* prc: coefficients folded in a wrong way. Diagnosed, reported and
fixed by Cajo ter Braak. CtB also fixed the scaling of species
Modified: pkg/vegan/man/SSarrhenius.Rd
===================================================================
--- pkg/vegan/man/SSarrhenius.Rd 2010-11-03 16:37:03 UTC (rev 1347)
+++ pkg/vegan/man/SSarrhenius.Rd 2010-11-04 09:35:16 UTC (rev 1348)
@@ -32,7 +32,9 @@
\details{
All these functions are assumed to be used for species richness
(number of species) as the independent variable, and area or sample
- size as the independent variable.
+ size as the independent variable. Basically, these define least
+ squares models of untransformed data, and will differ from models
+ for transformed species richness or models with non-Gaussian error.
The Arrhenius model (\code{SSarrhenius}) is the expression
\code{k*area^z}. This is the most classical model that can be found in
@@ -100,7 +102,32 @@
## draw a line
xtmp <- seq(min(sipoo.area), max(sipoo.area), len=51)
lines(xtmp, predict(marr, newdata=data.frame(sipoo.area = xtmp)), lwd=2)
-## The normal way is to use linear regression on double log data.
+## The normal way is to use linear regression on log-log data,
+## but this will be different from the previous:
+mloglog <- lm(log(S) ~ log(sipoo.area))
+mloglog
+lines(xtmp, exp(predict(mloglog, newdata=data.frame(sipoo.area=xtmp))),
+ lty=2)
+## Gitay: quadratic of log-linear
+mgit <- nls(S ~ SSgitay(sipoo.area, k, slope))
+lines(xtmp, predict(mgit, newdata=data.frame(sipoo.area=xtmp)),
+ lwd=2, col = 2)
+## Lomolino: using original names of the parameters (Lomolino 2000):
+mlom <- nls(S ~ SSlomolino(sipoo.area, Smax, A50, Hill))
+mlom
+lines(xtmp, predict(mlom, newdata=data.frame(sipoo.area=xtmp)),
+ lwd=2, col = 3)
+## One canned model of standard R:
+mmic <- nls(S ~ SSmicmen(sipoo.area, slope, Asym))
+lines(xtmp, predict(mmic, newdata = data.frame(sipoo.area=xtmp)),
+ lwd =2, col = 4)
+legend("bottomright", c("Arrhenius", "log-log linear", "Gitay",
+ "Lomolino", "Michaelis-Menten"), col=c(1,1,2,3,4), lwd=c(2,1,2,2,2),
+ lty=c(1,2,1,1,1))
+## compare models (AIC)
+allmods <- list(Arrhenius = marr, Gitay = mgit, Lomolino = mlom,
+ MicMen= mmic)
+sapply(allmods, AIC)
}
\keyword{ models }
More information about the Vegan-commits
mailing list