as.variogramModel {gmGeostats}R Documentation

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, ...)

## Default S3 method:
as.variogramModel(m, ...)

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

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

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

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

Value

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

Methods (by class)

Examples

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")

[Package gmGeostats version 0.11.3 Index]