Learn R Programming

gstat (version 1.0-2)

fit.StVariogram: Fit a spatio-temporal sample variogram to a sample variogram

Description

Fits a spatio-temporal variogram of a given type to spatio-temporal sample variogram.

Usage

fit.StVariogram(object, model, ..., fit.method = 6, stAni=NA, wles)

Arguments

object
The spatio-temporal sample variogram. Typically output from variogramST
model
The desired spatio-temporal model defined through vgmST.
...
arguments passed to optim. extractParNames provides the parameter structure of spatio-temporal variogram models that must for example be followed by th
fit.method
an integer between 0 and 13 determine the fitting routine (i.e. weighting of the squared residuals in the LSE). Values 0 to 6 correspond with the pure spatial version (see fit.variogram). See the deta
stAni
The spatio-temporal anisotropy that is used in the weighting. Might be missing if the desired spatio-temporal variogram model does contain a spatio-temporal anisotropy parameter (this might cause bad convergence behaviour). The default is NA
wles
Should be missing; only for backwards compatibility, wles = TRUE corresponds to fit.method = 1 and wles = FALSE corresponds to fit.method = 6.

Value

  • Returns a spatio-temporal variogram model, as S3 class StVariogramModel. It carries the temporal and spatial unit as attributes "temporal unit" and "spatial unit" in order to allow krigeST to adjust for different units. The units are obtained from the provided empirical variogram. Further attributes are the optim output "optim.output" and the always not weighted mean squared error "MSE".

Details

The following list summarizes the meaning of the fit.method argument which is essential a weighting of the squared residuals in the least-squares estimation. Please note, that weights based on the models gamma value might fail to converge properly due to the dependence of weights on the variogram estimate: [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] See also Table 4.2 in the gstat manual for the original spatial version.

See Also

fit.variogram for the pure spatial case. extractParNames helps to understand the parameter structure of spatio-temporal variogram models.

Examples

Run this code
# separable model: spatial and temporal sill will be ignored
# and kept constant at 1-nugget respectively. A joint sill is used.
separableModel <- vgmST("separable",
                        space=vgm(0.9,"Exp", 123, 0.1),
                        time =vgm(0.9,"Exp", 2.9, 0.1),
                        sill=100)

data(vv)
separableModel <- fit.StVariogram(vv, separableModel,
                                  method="L-BFGS-B",
                                  lower=c(10,0,0.01,0,1),
                                  upper=c(500,1,20,1,200))
plot(vv, separableModel)

Run the code above in your browser using DataLab