np.fitgeo | R Documentation |
Fits a nonparametric (isotropic) geostatistical model
(jointly estimates the trend and the variogram) by calling
locpol
, np.svariso.corr
(or np.svariso
) and
fitsvar.sb.iso
iteratively.
At each iteration, the trend estimation bandwith is updated
by a call to h.cv
.
np.fitgeo(x, ...)
## Default S3 method:
np.fitgeo(
x,
y,
nbin = NULL,
iter = 2,
h = NULL,
tol = 0.05,
set.NA = FALSE,
h.svar = NULL,
corr.svar = iter > 0,
maxlag = NULL,
nlags = NULL,
dk = 0,
svm.resid = FALSE,
hat.bin = corr.svar,
warn = FALSE,
plot = FALSE,
window = NULL,
...
)
## S3 method for class 'locpol.bin'
np.fitgeo(
x,
svm,
iter = 1,
tol = 0.05,
h.svar = svm$esv$locpol$h,
dk = 0,
corr.svar = TRUE,
svm.resid = FALSE,
hat.bin = corr.svar,
warn = FALSE,
plot = FALSE,
...
)
## S3 method for class 'fitgeo'
np.fitgeo(
x,
iter = 1,
tol = 0.05,
h.svar = x$svm$esv$locpol$h,
dk = x$svm$par$dk,
corr.svar = TRUE,
svm.resid = FALSE,
hat.bin = corr.svar,
warn = FALSE,
plot = FALSE,
...
)
x |
a (data) object used to select a method. |
... |
further arguments passed to |
y |
vector of data (response variable). |
nbin |
vector with the number of bins on each dimension. |
iter |
maximum number of iterations (of the whole algorithm). |
h |
initial bandwidth matrix for trend estimation
(final bandwidth if |
tol |
relative convergence tolerance (semivariogram). |
set.NA |
logical. If |
h.svar |
bandwidth matrix for variogram estimation. |
corr.svar |
logical; if |
maxlag |
maximum lag. Defaults to 55% of largest lag. |
nlags |
number of lags. Defaults to 101. |
dk |
dimension of the Shapiro-Botha variogram model (see |
svm.resid |
logical; if |
hat.bin |
logical; if |
warn |
logical; sets the handling of warning messages in bandwidth selection ( |
plot |
logical; if |
window |
spatial window (values outside this window will be masked), currently an sp-object of class
extending |
svm |
(fitted) variogram model (object of class
|
Currently, only isotropic semivariogram estimation is supported.
If parameter h
is not specified,
h.cv
is called with the default values (modified CV) to set it.
If parameter h.svar
is not specified,
is set to 1.5*h.cv.svar.bin()$h
.
Setting corr.svar = TRUE
may be very slow (and memory demanding) when the number of data is large
(note also that the bias in the residual variogram decreases when the sample size increases).
Returns an object of class
fitgeo
(extends
np.geo
). A locpol.bin
object with the additional
(some optional) 3 components:
svm |
fitted variogram model (object of class
|
svm0 |
(if requested) fitted residual variogram model (object of class
|
residuals |
model residuals. |
locpol
, fitsvar.sb.iso
, np.svar
,
np.svariso.corr
, np.geo
.
geomod <- np.fitgeo(aquifer[,1:2], aquifer$head, svm.resid = TRUE)
plot(geomod)
# Uncorrected variogram estimator
geomod0 <- np.fitgeo(aquifer[,1:2], aquifer$head, iter = 0, corr.svar = FALSE)
plot(geomod0)
# Additional iteration with bias-corrected variogram estimator
geomod1 <- np.fitgeo(geomod0, corr.svar = TRUE, svm.resid = TRUE)
plot(geomod1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.