-(Loglikelihood) as a function of buffer sizes.
Function investigating eventual optimization problems during numerical optimization of function Bsiland by plotting the -(loglikelihhod) against buffer sizes of each landscape variable.
Bsiland.lik(res, land,data, varnames = NULL, seqd = seq(2, 2000, length = 10))
res |
an object resulting from |
land |
the object of class sf describing the landscape variable, i.e. the |
data |
the dataframe describing response variable and the local variables, i.e. the |
varnames |
a vector containing the names (characters) of studied landscape variables. If varnames is |
seqd |
a vector of buffer sizes (positive values) for which the -loglikelihood is computed. |
As with all numerical maximisation procedures, optimization problems may arise. The function Bsiland.lik allows to point out possible problems of optimization.
Bsiland.lik plots the -Loglikelihood against buffers sizes. During the Bsiland procedure, the estimation of buffer sizes is made by maximazing the likelihood i.e. by minimizing the -Loglikelihood. The orange horizontal line indicates the minimal value of -Loglikelihood obtained during the estimation (res result).
The other continous curves represent the -loglikehood as a function of buffer sizes for each studied landscape variable (considering the other parameters of the model at their estimated value in res). The dotted lines indicate the values of buffer size estimated (res result).
When the minization correctly occurs, the minimal values of the -loglikelihoods for each landscape variable are equal to the value of the estimated minimal -Loglikelihood. This means that the value of each continuous curves is minimal at its intersection with the orange horizontal line. This also means that dotted lines intersect their associated continuous lines at their minimum.
If it is not the case, the minimizing procedure has failed and it is necessary to proceed again with an estimation with different initialisation values. This is possible with the argument init in function Bsiland.
a ggplot of the -(loglikelihhod) against buffer sizes of each landscape variables.
O. Martin and F. Carpentier
data(dataSiland)
data(landSiland)
resB=Bsiland(obs~x1+L1+L2,land=landSiland,data=dataSiland)
Bsiland.lik(resB,dataSiland,land=landSiland,varnames=c("L1","L2"),seqd=seq(5,500,length=20))
# Illustration of failed estimation caused by wrong initial values.
# In a such case, the estimation should be done again ,
# by calling Bsiland with init=c(250,250) for instance.
resB_fail=Bsiland(obs~x1+L1+L2,land=landSiland,data=dataSiland,init=c(2000,2000))
Bsiland.lik(resB_fail,dataSiland,land=landSiland,varnames=c("L1","L2"),seqd=seq(5,3000,length=20))Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.