Description Usage Arguments Value
fit.glm.env
fits a plateau envelope via a (non-spatial) GLM and
non-linear optimisation. This function exists to provide scope for a quick,
exploratory analysis and for obtaining starting values for a Bayesian
implementation of the plateau envelope fitted via MCMC.
1 2 3 |
data |
The data frame (with n rows) containing all the variables for analysis. |
y |
A string denoting the binary response variable (taking values 0 or 1 for absence and
presence respectively); must correspond to a column name in the data frame
specied at |
x.clim |
A vector (length p) of strings denoting which columns in the supplied data
frame correspond to the climate covariates; must correspond to column names in the data frame
specied at |
x.nonclim |
A vector (length p2) of strings denoting which columns in the supplied data
frame correspond to the non-climate covariates; must correspond to column names in the data frame
specied at |
x.factor |
A vector (length p3) of strings denoting which columns in the supplied data
frame correspond to the non-climate factors; must correspond to column names in the data frame
specied at |
initial.pars.input |
A vector of length 2p+p+2+p(p-1)/2 containing
starting values for each parameter; if missing, the code will suggest
starting values. If |
random.search |
A logical variable, which when set to |
n.iter |
If |
constrain.beta |
A p by 2 matrix of logicals in order to indicate
which beta parameters should be constrained to not vary too
much from its pair - set at most only one of these to |
slope.limit |
Scalar putting an upper bound on the envelope slopes;
limit is approximately |
silent |
Logical flag denoting whether the function runs silently or
not. Default is |
A list containing the following elements:
par
Vector of estimates of the parameters in the order: (2*p) *log* of slopes beta_11,beta_12,beta21,beta22,...; (p) apex coordinates of the climate variables ax; (1) *log* distance beneath the y apex of the "slice" parameter; (1) the apex coordinate in the y direction; and if p>1, (p*(p-1)/2) pairwise interaction terms.
value
The (scalar) value of the "optimised" parameters.
counts
The number of glm.env.fn
function calls
(NA
for gradient).
convergence
Report from optim()
as to convergence
status; beware that 0 does not reliably mean "good" convergence.
message
Any message from optim()
.
y
The response data, returned mainly to aid the plotting functions.
x.clim
The climate data, also for the plotting functions.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.