Learn R Programming

gstat (version 1.0-21)

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, ..., wles = FALSE)

Arguments

object
The spatio-temporal sample variogram. Typically output from variogramST
model
The desired spatio-temporal model defined through vgmST.
...
arguments passed to optim
wles
Resiudals are weighted by the number of points in each lag class.

Value

  • Returns a spatio-temporal variogram model, as S3 class StVariogramModel. It carries the temporal and spatial unit as attributes in order to allow krigeST to adjust for different units. The units are obtained from the provided empirical variogram.

See Also

fit.variogram

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