gmGeostats (version 0.11.3)

as.variogramModel: Convert an LMC variogram model to gstat format

Description

Convert a linear model of coregionalisation to the format of package gstat. See gstat::vgm() for details.

Usage

as.variogramModel(m, ...)

# S3 method for default as.variogramModel(m, ...)

# S3 method for gmCgram as.variogramModel(m, ...)

# S3 method for LMCAnisCompo as.variogramModel(m, V = NULL, prefix = NULL, ensurePSD = TRUE, ...)

# S3 method for CompLinModCoReg as.variogramModel(m, V = "alr", prefix = NULL, ensurePSD = TRUE, ...)

Value

The LMC model specified in the format of package gstat, i.e. as the result of using gstat::vgm()

Arguments

m

variogram model

...

further arguments for generic functionality

V

eventually, specification of the logratio representation to use for compositional data (one of: a matrix of log-contrasts to use, or else one of the strings "alr", "clr" or "ilr")

prefix

optional, name prefix for the generated variables if a transformation is used

ensurePSD

logical, should positive-definiteness be enforced? defaults to TRUE, which may produce several scary looking but mostly danger-free warnings

Methods (by class)

  • default: Convert an LMC variogram model to gstat format

  • gmCgram: Convert an LMC variogram model to gstat format

  • LMCAnisCompo: Convert an LMC variogram model to gstat format

  • CompLinModCoReg: Convert an LMC variogram model to gstat format

Examples

Run this code
data("jura", package = "gstat")
X = jura.pred[,1:2]
Zc = compositions::acomp(jura.pred[,7:13])
lrmd = compositions::CompLinModCoReg(formula=~nugget()+sph(1.5), comp=Zc)
as.variogramModel(lrmd, V="alr")

Run the code above in your browser using DataLab