calculateMukv: MUKV computation

calculateMukvR Documentation

MUKV computation

Description

Computes mean universal kriging variance (MUKV) for given geostatistical parameters

Usage

calculateMukv(observations, predGrid, model, formulaString, fun, ...)

Arguments

observations

SpatialPoints or SpatialPointsDataFrame with observation locations and possible covariates

predGrid

Spatial object with coordinates of prediction locations (usually SpatialGrid or SpatialGridDataFrame when independent covariate predictor variables are used)

model

Variogram model:object of class variogramModel, of the form created by vgm

formulaString

formula that defines the dependent variable as a linear model of independent variables; suppose the dependent variable has name z, for ordinary and simple kriging use the formula z~1; for universal kriging, suppose z is linearly dependent on x and y, use the formula z~x+y. The formulaString defaults to "value~1" if value is a part of the data set. If not, the first column of the data set is used.

fun

alternative penalty function, needs to be a function which can take the same arguments as calculateMukv

...

other arguments to be passed on at lower level functions

Details

This function computes kriging on the predGrid with krige function, and averages the kriging variance (MUKV). With covariates, the function takes a universal kriging model into account.

Value

MUKV value

Author(s)

S.J. Melles, O. Baume, J. Skoien

Examples


# load data:
library(gstat)
data(meuse)
coordinates(meuse) = ~x+y
data(meuse.grid)
coordinates(meuse.grid) = ~x+y
gridded(meuse.grid) = TRUE
meuse.grid$soil = factor(meuse.grid$soil)

# estimate variogram:
smplvarUK = variogram(zinc~dist+ffreq+soil, meuse)
plot(smplvarUK)
vfitUK = fit.variogram(variogram(zinc~dist+ffreq+soil, meuse), vgm(1, "Exp", 300, 1))
plot(smplvarUK, vfitUK)

calculateMukv(meuse, meuse.grid, vfitUK, zinc~dist+ffreq+soil)



intamapInteractive documentation built on Nov. 2, 2023, 5:45 p.m.