Here we present a basic vignette that runs through taking a species by sites matrix and performs a Bayesian Bootstrap Generalised Dissimilarity Model. Our vignette will run through the following steps:

Install bbgdm from github, this requires devtools to be installed

# install.packages(c('devtools','vegan'))
# devtools::install_github('skiptoniam/bbgdm')

Load the required libaries, we need vegan for the dune dataset.

library(bbgdm)
library(vegan)

Run bbgdm on the famous dune meadow data

The dune meadow vegetation data, dune, has cover class values of 30 species on 20 sites. Make the abundance data presence/absence.

data(dune)
data(dune.env)
dune_pa <- ifelse(dune>0,1,0)

Fit a bbgdm

Now we have a species by sites matrix of simulated data and a set data for a one dimensional gradient.

form <- ~1+A1
fm1 <- bbgdm(form,dune_pa, dune.env,family="binomial",dism_metric="number_shared",
             nboot=100, scale_covar=F,geo=F,optim.meth='nlmnib')

Plot response curves

plotResponse(fm1,plotdim = c(1,1))

Plot diagnostics

bbgdm.check(fm1)

Run 'Wald-like' test on parameters

bbgdm.wald.test(fm1)

References

Jongman, R.H.G, ter Braak, C.J.F & van Tongeren, O.F.R. (1987). Data Analysis in Community and Landscape Ecology. Pudoc, Wageningen.



skiptoniam/bbgdm documentation built on May 30, 2019, 1:05 a.m.