gmGeostats (version 0.10-6)

gmSpatialModel-class: 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 gmSpatialModel
variogram(object, methodPars = NULL, ...)

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

# S4 method for 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)

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: as.gmSpatialModel(), make.gmCompositionalGaussianSpatialModel(), make.gmCompositionalMPSSpatialModel(), make.gmMultivariateGaussianSpatialModel(), predict.gmSpatialModel()

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataCamp Workspace