Description Usage Arguments Details Value See Also Examples
Generalized Additive Model (GAM) to regress one or many environmental variables on NMDS ordination scores.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | gamfit(ord, env, ...)
## S3 method for class 'gamfit'
print(x, ...)
## S3 method for class 'gamfit'
summary(object, ...)
## S3 method for class 'gamfit'
fitted(object, ...)
## S3 method for class 'gamfit'
plot(x, pick = 1, pcol, lcol, pcex, lwd, labcex,
title = TRUE, nlevels = 10, levels, xlab, ylab, ...)
gamfit_sens(x, env, nrep = 99, perc = 5, ...)
## S3 method for class 'gamfit_sens'
plot(r, stat = "r2", pltype = "joy", ...)
## S3 method for class 'gamfit_sens'
summary(r, x, ...)
|
ord |
ordination model from |
env |
environmental matrix with variables to evaluate |
... |
additional arguments passed to
|
x, object |
object of class |
pick |
numeric, the column number of environmental variable to plot as a nonlinear regression surface in the ordination space |
pcol, lcol |
point and line colors |
pcex, lwd |
point size and line width |
title |
logical, add variable name as title? (default=TRUE) |
nrep |
number of repetitions for sensitivity analysis (default=99) |
perc |
numeric, percent noise to add to env variables for sensitivity analysis |
r |
object of class |
stat |
one of |
pltype |
one of |
Nonlinear regression of each environmental variable in turn on the site scores resulting from NMDS ordination. Returns p-values for the joint smooth term, and adjusted-R2 expressing the strength of (nonlinear) relationship between each environmental variable and the ordination. Print, summary and plot methods exist. Sensitivity analysis currently exists but needs refinement.
Object of class gamfit
or gamfit_sens
for those
functions respectively, or plots to device.
gam
for the internal fitting function,
ordisurf
for a similar procedure that only
admits variables one-at-a-time, and envfit
for a linear alternative. Plotting methods for sensitivity
analysis follow plot_joy
and
plot_heatmap
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | data(veg)
spe <- veg$spe
env <- veg$env
m <- vegan::metaMDS(vegan::vegdist(spe), trace=0)
g <- gamfit(m, env)
g
plot(g, pick=10)
# sensitivity analysis
r <- gamfit_sens(g, env)
plot(r, pltype='heat')
plot(r, pltype='joy')
(MAE <- summary(r, g))
plot(MAE, xaxt='n', las=1)
axis(1, 1:NCOL(env), names(env), cex.axis=0.7)
sapply(data.frame(r[,,1]<0.05),sum) / 99 # proportion 'significant'
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.