Fit seven hierarchical logistic regression models and select the most appropriate model by information criteria and a bootstrap approach to guarantee model stability. The first five shapes are known as Huisman-Olff-Fresco (HOF) models in ecology (Huisman et al. 1993). Additionally the package provides two bimodal shapes.
# S3 method for data.frame
HOF(veg, grad, M = max(veg), freq.limit = 10, ...)HOF(...)
# S3 method for default
HOF(
occ,
grad,
M = max(occ),
y.name,
family = binomial,
lim = 100,
bootstrap = 100,
test = c("AICc", "BIC", "AIC", "Dev"),
modeltypes = eHOF.modelnames,
...
)
# S3 method for HOF
coef(object, model, ...)
# S3 method for HOF
deviance(object, model, ...)
# S3 method for HOF
fitted(object, model, ...)
# S3 method for HOF
predict(object, model, newdata, ...)
pick.model(...)
# S3 method for HOF
pick.model(
object,
level = 0.95,
test = c("AICc", "BIC", "AIC", "Dev"),
modeltypes,
penal = "df",
gam = FALSE,
selectMethod = c("bootselect.lower", "bootselect.always", "IC.weight", "pick.model"),
silent = FALSE,
...
)
# S3 method for list
pick.model.HOF(object, ...)
HOF.fit
returns an object of class "HOF"
which contains the parameters of the call,
the fitting results for every model type and a vector of chosen model types from bootstrapping.
vegetation data frame. Either as matrix with species in columns and plots in rows, or in Turboveg format.
gradient data vector.
maximum attainable value in the HOF model, similar to binomial denominator.
lowest frequency of species analysed.
further arguments passed to or from other methods
species occurrences (=response) vector.
name of the species.
error distribution. Alternatives are binomial
, poisson
and gaussian
.
limiting criterion for minimization function, see details.
number of bootstrap samplings to check model robustness, see details.
information criterion for model selection. Alternatives are "AICc"
, "BIC"
, "AIC"
or just "Dev"iance
.
vector of model types, when only a subset of the seven implemented modeltypes should be considered.
HOF model object, results from function HOF. Either for a single species or a list for several species.
You can specify the HOF model type to be used, otherwise it is selected through function [pick.model()].
vector of gradient values to use
probability for model selection (1-P) for F or Chisq tests.
penalty term for model types, default is the number of model parameter.
calculate AIC of GAM model and compare it with HOF models.
choose the model type selection method in case of divergence of the most frequent bootstrapped model or the one with highest information criterion weight from the primary chosen type.
messages about selectMethod
Florian Jansen, Jari Oksanen
The minimization function changed compared to package gravy (Oksanen 2002) from nlm to nlminb to be able to set a limit
for estimated parameters (default= -100 to 100). The old models III and V have been often too sharp,
lim=Inf
will produce results similar to gravy.
Function [pick.model()] finds the most adequate modeltype according to the chosen Information Criterion (AICc is default).
Function fitted
returns the fitted values for the used grad
ient, and predict
for any values in newdata
.
To improve and check model stability a bootstrapping mechanism is implemented in function HOF. If the initially chosen model type is different from the most frequent one, the latter will be chosen by default. Bootstrapping is done with sample(length(grad), replace = TRUE).
Jansen, F. & Oksanen, J. (2013) What shape are species responses along ecological gradients? - Huisman-Olf-Fresco models revisited. Journal of Vegetation Science, DOI: 10.1111/jvs.12050
Oksanen, J. & Minchin, P.R. (2002). Continuum theory revisited: what shape are species responses along ecological gradients? Ecological Modelling 157, 119-129.
Huisman, J., Olff, H. & Fresco, L.F.M. (1993). A hierarchical set of models for species response analysis. Journal of Vegetation Science 4, 37-46.
[plot.HOF()] provides advanced plotting schemes for HOF models. [Para()] derives model parameters like optimum, niche (width), slope etc.
data(acre)
sel <- c('MATRREC', 'RUMEACT', 'SILENOC', 'APHAARV', 'MYOSARV', 'DESUSOP', 'ARTE#VU')
mo <- HOF(acre[,match(sel, names(acre))], acre.env$PH_KCL, M=1, bootstrap=NULL)
mo
Run the code above in your browser using DataLab