This function fit a geostatistical model using composite likelihood to spatial data that have positional error due to geoamsking.
fit_geoadj(data, locations, displacement = "gaussian", delta, kappa, n_sequence = 10, approx = F, thresh = 5e-06, ini, method = "BFGS")
data | A numeric vector of spatial data. |
---|---|
locations | A two column matrix containing the locations (coordinates x and y). |
displacement | The type of geomasking to be applied: either "gaussian" or "uniform". |
delta | A number that specify the standard deviation of the positional error in the case of Gaussian geomasking or the maximum displacement distance in the case of Uniform geomasking. |
kappa | Numerical value for the additional smoothness parameter of the matern correlation function. |
n_sequence | A numeric value. It will define the lenght of the halton sequence for the quasi monte carlo integration. A longer sequence requires more computational time but provides more accurate results. Defaul to 10. |
approx | If TRUE (defautl is FALSE) it will use an approximation to calculate the composite likelihood. If set to TRUE a threshold value in the argument thresh needs to be provided. |
thresh | If approx is TRUE this defines the level of the approximation. By default is 0.000005 and garuantess a good comprise between speed and accuracy. Bigger values will make the computation faster but less accurate. |
ini | Initial values for the parameters to be passed to the optimisation algorithm. |
method | The optimisation method to be used. Default is "BFGS". |
A list containing the set of estimated parameters. The likelihood evaluated at the estimated parameters and a code to asses convergence of the algorithm.