Function estimating landscape effect (and eventual local effects) using Fsiland method, i.e. estimating simultaneously : the SIF parameter (i.e. mean distance of SIF) and the effect of each landscape variable (and the effect of each local variable).
Fsiland(formula,land,data,family ="gaussian",sif="exponential", init = 100,
border=F,wd=30)
Fsiland returns an object of type Fsiland, a list :
a vector of the estimated coefficients
a vector of the estimated parameters of SIF
an object of class formula that indicates the model
a dataframe of estimated cumulative influence of each landscape variable (in columns) on each observation (in rows).
the estimated maximum loglikelihood
the estimated maximum loglikelihood of the local model (no landscape variable)
a lm/glm/lmer object that corresponds to the model estimate knowing the estimated SIF parameters of landscape variables.
the fitted values
the family of the SIF
an object of class optim or optimize giving informations about the optimization procedure see optim() or optimize() for further details.
the akaike information criterion of the model
the akaike information criterion of the local model (no landscape variable)
the number of parameters
the p.value of the test of the landscape effect (the global effect of all spatial variables). Issued from the likelihood ratio test of the (complete) model vs the local model (complete model without landscape variables).
the family distribution for the model
the estimated standard error for gaussian family, NA in other case
the type of local model: GLM for generalised model, LMM for linear mixed model or GLMM for generalised linear mixed model
the estimated standard deviation of random effects for LMM or GLMM
the estimated residuals
a logical indicating the value used for estimation
a number indicating the size of pixels
a symbolic description (see lm() or glm()) of the model to be fitted. The details of model specification are given under 'Details'.
an object of class sf containing the landscape variables.
a dataframe containing the response variable and the local variables.
the distribution of response variable. family
can be "gaussian", "poisson" or "binomial" and the associated link function are identity, log and logit respectively.
the family of the Spatial Influence Function. sif
can be "exponential", "gaussian" or "uniform".
a vector indicating the starting values for SIF parameters in the estimation procedure. By default, starting values of SIF parameters of all landscape variable are equal to 100.
a logical indicating wether the spatial influence of the polygon where observations are located is taken into account.
If border=FALSE
, all pixels of a landscape variable have a spatial influence whether or not they belong to the polygon where the observation is located. If border=TRUE
, only pixels outside the polygon of the observation, i.e. from the border of the polygon have an influence on this observation.
a numeric, the size of pixels.
Carpentier, F. and Martin, O.
The Fsiland method is based on the model: $$ E(Y_i)= \mu + \sum_l \alpha_l x_{l,i}+ \sum_k \beta_k (\sum_r f_{\delta_k}(d_{r,i})z^k_r) $$ with
Y_i, response variable,
x_l,i, local variable l,
r, the discritzation of study site in pixels r
z^k_r, the value of the landscape variable k at the pixel r. If the landscape variable k is a presence/absence variable, z^k_r is equal to one or zero.
\(\mu\), the intercept
\(\alpha_l\) and \(\beta_k\), the effects of local and landscape variables, respectively.
\(f_{\delta_k}\),the SIF associated with the landscape variable k with parameter \(\delta_k\) (the mean distance of the SIF, see detail further)
d_r,i the distance between the center of pixel r and the observation at site i.
All parameters, \(\mu\), \( {\alpha_1,\dots,\alpha_L}\), \( {\beta_1,\dots,\beta_K}\) but also \( {\delta_1,\dots,\delta_K}\) SIF parameters of the landscape variables are simultaneously estimated by likelihood maximization.
Models for Fsiland have the form response ~ terms
where response
is the columns name of the response variable in data
and terms
is a series of terms which specifies the names of landscape and local explanatory variables. The explanatory variables described in data
are considered as local in the model, those described in the sf object land
are considered as landscape variables.
For local variables, random effects can be considered using the syntax (1|x)
similar to package lme4 (see lmer() function in package lme4). Interaction terms are not yet implemented in Fsiland
contrary to Bsiland
.
The explanatory variables are added using the symbol "+"
. Interaction terms can be considered using the usual symbols "*"
or ":"
. Notice that only interactions between local x local and local x landscape variables are considered.
Two families of SIF are currently implemented in the siland package, exponential and Gaussian families defined as \(f_\delta(d)=2/(\pi\delta^2)exp(-2d/\delta)\) and \(f\delta(d)=1/(2\delta \sqrt \pi)exp(-d\pi/(2\delta))^2\), respectively. By definition, \(\delta\) represents the mean distance of these SIF.
The computation of the spatial influence of landscape variables is based on an approximation through the description of landscape variables distribution along a regular grid (modelisation of spatial influence of each pixel of landscape variable). The choice of wd
, the size of pixels can have an impact on the estimation. The smaller the pixels, the more accurate the approximation, but also the longer the computation time. In our experience, we recommend using a pixel size at most three times smaller than the smallest estimated mean distance among the landscape variables SIF.
Carpentier, F., & Martin, O. (2019). SILand: an R package for estimating the spatial influence of landscape. bioRxiv, 692566.
# \donttest{
data(dataSiland)
data(landSiland)
resF=Fsiland(obs~x1+L1+L2,land=landSiland,data=dataSiland,sif="exponential")
resF
resF$AIC
# }
Run the code above in your browser using DataLab