siland.lik {siland} | R Documentation |
-(Loglikelihood) as a function of SIF parameters.
Description
Function investigating eventual optimization problems during numerical optimization of function siland by plotting the -(loglikelihhod) against parameters of Spatial Influence Functions (SIF) of each landscape variable. The parameter of a SIF is defined as the mean distance of SIF.
Usage
siland.lik(res, land,data, varnames = NULL, seqd = seq(2, 2000, length = 10))
Arguments
res |
an object resulting from siland |
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 SIF parameters (positive values) for which the -loglikelihood is computed. |
Details
As with all numerical maximisation procedures, optimization problems may arise. The function siland.lik
allows to point out possible problems of optimization.
siland.lik
plots the -Loglikelihood against SIF parameters. During the siland procedure, the estimation of SIF parameters 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 SIF parameters 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 SIF parameter 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 siland
.
Value
a ggplot of the -(loglikelihhod) against SIF parameters of each landscape variables.
Author(s)
O. Martin and F. Carpentier
Examples
data(dataSiland)
data(landSiland)
res=siland(obs~x1+L1+L2,data=dataSiland,land=landSiland)
siland.lik(res,dataSiland,land=landSiland,varnames=c("L1","L2"),seqd=seq(5,500,length=20))
# Illustration of failed estimation caused by wrong initial
# values (chosen initial values that are deliberately and obviously far too high)
# In a such case, the estimation should be done again ,
# by calling siland with init=c(250,250) for instance.
res2=siland(obs~x1+L1+L2,data=dataSiland,land=landSiland,init=c(20000,20000))
siland.lik(res2,dataSiland,land=landSiland,varnames=c("L1","L2"),seqd=seq(1e9,1e10,length=20))