Description Usage Arguments Value References Examples
creates a bbgdm
model, comprising multiple
gdms. bbgdm
models are core of bbgdm
, different parameterisation can
be achieve similar to a glm
, see bbgdm.fit
for more details.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | bbgdm(form, sp.dat, env.dat, family = "binomial", link = "logit",
dism_metric = "number_non_shared", nboot = 100, spline_type = "ispline",
spline_df = 2, spline_knots = 1, geo = FALSE, geo.type = "euclidean",
coord.names = c("X", "Y"), optim.meth = "nlmnib", est.var = FALSE,
trace = FALSE, prior = FALSE, control = bbgdm.control())
## S3 method for class 'bbgdm'
print(x, ...)
## S3 method for class 'bbgdm'
plot(x, ...)
## S3 method for class 'bbgdm'
predict(x, data, neighbourhood = NULL, outer = FALSE,
uncertainty = TRUE, ...)
|
form |
formula for bbgdm model |
sp.dat |
presence absence matrix, sp as columns sites as rows. |
env.dat |
environmental or spatial covariates at each site. |
family |
a description of the error distribution and link function to be used in the model. Currently "binomial" suppported. This can be a character string naming a family function, a family function or the result of a call to a family function. |
link |
a character string that assigns the link function to apply within the binomial model. Default is 'logit', but 'negexp' and other binomial link functions can be called. |
dism_metric |
dissimilarity metric to calculate for model. "bray_curtis" or "number_non_shared" currently avaliable. |
nboot |
number of Bayesian Bootstraps to run, this is used to estimate variance around GDM models. Default is 100 iterations. |
spline_type |
type of spline to use in GDM model. Default is monotonic isplines. Options are: "ispline" or "bspline". |
spline_df |
Number of spline degrees of freedom. |
spline_knots |
Number of spline knots. |
geo |
logical If true geographic distance is calculated if |
geo.type |
type of geographic distance to estimate, can call 'euclidean' and 'greater_circle'. |
coord.names |
character.vector names of coordinates, default is c("X","Y") |
optim.meth |
optimisation method options avaliable are 'optim' and 'nlmnib' |
est.var |
logical if true estimated parameter variance using optimiser. |
trace |
logical print extra optimisation outputs |
prior |
numeric vector of starting values for intercept and splines |
control |
control options for gdm calls bbgdm.control as default. |
x |
an object of class |
... |
for |
data |
raster stack of the same covariates used to fit model object for the region you wish to predict too. |
neighbourhood |
int default is three, number of neighbouring cells to estimate mean dissimilarity. |
outer |
logical default is FALSE, if TRUE only calculates the outer edge of neighbourhoods area. |
uncertainty |
logical if TRUE predict will return a list with two rasters the mean estimate and the uncertainty (defined as the coefficent of variation) |
a bbgdm model object
raster of mean turnover estimated based on neighbourhood distance.
Woolley, S. N., Foster, S. D., O'Hara, T. D., Wintle, B. A., & Dunstan, P. K. (2017). Characterising uncertainty in generalised dissimilarity models. Methods in Ecology and Evolution.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
sp.dat <- matrix(rbinom(2000,1,.6),200,10)# presence absence matrix
env.dat <- simulate_covariates(sp.dat,2)
form <- ~ 1 + covar_1 + covar_2
test.bbgdm <- bbgdm(form,sp.dat, env.dat,family="binomial",dism_metric="number_non_shared",
nboot=10, geo=FALSE,optim.meth='nlmnib',,control=bbgdm.control(cores=3))
## End(Not run)
#print model summary
## Not run:
print(test.bbgdm)
## End(Not run)
#plot bbgdm fit
## Not run:
plot(test.bbgdm)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.