Learn R Programming

convoSPAT (version 1.2.7)

predict.NSconvo: Obtain predictions at unobserved locations for the nonstationary spatial model.

Description

predict.NSconvo calculates the kriging predictor and corresponding standard errors at unmonitored sites.

Usage

# S3 method for NSconvo
predict(
  object,
  pred.coords,
  pred.covariates = NULL,
  pred.fixed.nugg2.var = NULL,
  ...
)

Arguments

object

A "NSconvo" object, from NSconvo_fit.

pred.coords

Matrix of locations where predictions are required.

pred.covariates

Matrix of covariates for the prediction locations, NOT including an intercept. The number of columns for this matrix must match the design matrix from mean.model in NSconvo_fit. Defaults to an intercept only.

pred.fixed.nugg2.var

An optional vector or matrix describing the the variance/covariance a fixed second nugget term (corresponds to fixed.nugg2.var in NSconvo_fit; often useful if conducting prediction for held-out data). Defaults to zero.

...

additional arguments affecting the predictions produced.

Value

A list with the following components:

pred.means

Vector of the kriging predictor, for each location in pred.coords.

pred.SDs

Vector of the kriging standard errors, for each location in pred.coords.

Examples

Run this code
# NOT RUN {
pred.NS <- predict( NSconvo.obj,
pred.coords = matrix(c(1,1), ncol=2),
pred.covariates = matrix(c(1,1), ncol=2) )
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab