gmSpatialModel-class: Conditional spatial model data container

gmSpatialModel-classR Documentation

Conditional spatial model data container

Description

This class is devised to contain a conditional spatial model, with: some conditioning data (a sp::SpatialPointsDataFrame()), an unconditional geospatial model (a structure with e.g. a training image; or the information defining a Gaussian random field); and eventually some extra method parameters. The class extends sp::SpatialPointsDataFrame() and has therefore its slots, plus model (for the unconditional model) and parameters (for the extra method information)

Usage

## S4 method for signature 'gmSpatialModel'
variogram(object, methodPars = NULL, ...)

## S4 method for signature 'gmSpatialModel'
logratioVariogram(data, ..., azimuth = 0, azimuth.tol = 180/length(azimuth))

## S4 method for signature 'gmSpatialModel'
as.gstat(object, ...)

Arguments

object

a gmSpatialModel object containing spatial data.

methodPars

(currently ignored)

...

further parameters to gstat::variogram()

data

the data container (see gmSpatialModel for details)

azimuth

which direction, or directions, are desired (in case of directional variogram)

azimuth.tol

which tolerance sould be used for directional variograms?

Value

You will seldom create the spatial model directly. Use instead the creators ⁠make.gm*⁠ linked below

Methods (by generic)

  • variogram: Compute a variogram, see variogram_gmSpatialModel() for details

  • logratioVariogram: S4 wrapper method around logratioVariogram() for gmSpatialModel objects

  • as.gstat: convert from gmSpatialModel to gstat; see as.gstat() for details

Slots

data

a data.frame (or class extending it) containing the conditional data

coords

a matrix or dataframe of 2-3 columns containing the sampling locations of the conditional data

coords.nrs

see sp::SpatialPointsDataFrame()

bbox

see sp::SpatialPointsDataFrame()

proj4string

see sp::SpatialPointsDataFrame()

model

gmUnconditionalSpatialModel. Some unconditional geospatial model. It can be NULL.

parameters

gmSpatialMethodParameters. Some method parameters. It can be NULL

See Also

Other gmSpatialModel: Predict(), as.gmSpatialModel(), make.gmCompositionalGaussianSpatialModel(), make.gmCompositionalMPSSpatialModel(), make.gmMultivariateGaussianSpatialModel()

Examples

data("jura", package="gstat")
library(sp)
X = jura.pred[,1:2]
Zc = jura.pred[,7:13]
spdf = sp::SpatialPointsDataFrame(coords=X, data=Zc)
new("gmSpatialModel", spdf)
make.gmCompositionalGaussianSpatialModel(data=Zc, coords=X, V="alr")

gmGeostats documentation built on April 18, 2023, 5:08 p.m.