gmGeostats (version 0.10-6)

fit_lmc.logratioVariogramAnisotropy: Fit an LMC to an empirical variogram

Description

Fit a linear model of coregionalisation to an empirical variogram

Usage

# S3 method for logratioVariogramAnisotropy
fit_lmc(v, model, ...)

fit_lmc(v, ...)

# S3 method for gstatVariogram fit_lmc(v, g, model, ...)

# S3 method for default fit_lmc(v, g, model, ...)

# S3 method for logratioVariogram fit_lmc(v, g, model, ...)

Arguments

v

empirical variogram

model

LMC or variogram model to fit

...

further parameters

g

spatial data object, containing the original data

Value

Method fit_lmc.gstatVariogram is a wrapper around gstat::fit.lmc(), that calls this function and gives the resulting model its appropriate class (c("variogramModelList", "list")). Method fit_lmc.default returns the fitted lmc (this function currently uses gstat as a calculation machine, but this behavior can change in the future)

Methods (by class)

  • logratioVariogramAnisotropy: method for logratioVariogram with anisotropry

  • gstatVariogram: wrapper around gstat::fit.lmc method

  • default: flexible wrapper method for any class for which methods for as.gstatVariogram(), as.gstat() and as.variogramModel() exist. In the future there may be direct specialised implementations not depending on package gstat.

  • logratioVariogram: method for compositions::fit.lmc. In the future there may be direct specialised implementations, including anisotropy (not yet possible).

Examples

Run this code
# NOT RUN {
data("jura", package = "gstat")
X = jura.pred[,1:2]
Zc = jura.pred[,7:13]
gg = make.gmCompositionalGaussianSpatialModel(Zc, X, V="alr", formula = ~1)
vg = variogram(gg)
md = gstat::vgm(model="Sph", psill=1, nugget=1, range=1.5)
gg = fit_lmc(v=vg, g=gg, model=md)
variogramModelPlot(vg, model=gg)
# }

Run the code above in your browser using DataLab