Learn R Programming

gear (version 0.1.5)

eval.cmod: Evaluate covariance or semivariance model.

Description

eval.cmod evaluates the covariance or semivariance of a model based on the provided arguments. See Details for what the function returns, as it changes depending on the class of mod.

Usage

eval.cmod(mod, d = NULL, coords = NULL)

# S3 method for cmodStd eval.cmod(mod, d, coords = NULL)

Arguments

mod

A covariance or semivariance model.

d

An \(n \times m\) matrix of distances.

coords

An numeric object with two columns.

Value

Returns the evaluated model with necessary components needed for mlefit, predict, or loglik functions.

Details

If mod is of class cmodStd (from the cmod.std function), then the function returns an \(n \times m\) matrix with the evaluated standard covariance function.

Examples

Run this code
# NOT RUN {
n = 10
coords = matrix(runif(2*n), nrow = n, ncol = 2)
d = as.matrix(dist(coords))
cmod = cmod.std(model = "exponential", psill = 1, r = 1)
eval.cmod(cmod, d)
# }

Run the code above in your browser using DataLab