pred_krige_batch: Kriging predictions and errors

View source: R/pred_krige_batch.R

pred_krige_batchR Documentation

Kriging predictions and errors

Description

Function that makes krigging predictions using a fitted spatial linear model and an external prediction data set.

Usage

pred_krige_batch(object, obsv_coord, pred_coord, Xp = NULL,
  row_names = NULL, computeSE = TRUE, scale = 1)

Arguments

object

object of class 'splm'

obsv_coord

Data frame or matrix with Alber's x,y coordinates for observations.

pred_coord

Data frame or matrix with Alber's x,y coordinates for prediction.

Xp

matrix of covariates at prediction sites for universal kriging. Make sure that the first column of this matrix contains 1's for the intercept. The default is NULL, which assumes a spatial model with no predictors (the function will generate a matrix with a column of 1's for the intercept).

row_names

character or numeric vector specify row names for the predictions

computeSE

logical; whether to compute standard errors, default is TRUE

scale

scaling factor for distance matrix. The distance matrix will be divided by this number. Dafault is 1 for no scaling. Useful when converting Alber's coordinates from meters to kilometers; in this case, set scale to 1000.

Value

Matrix with kriging predictions and standard errors.

Author(s)

Jay Ver Hoef (edited by Eric Fox)


ericwfox/slmrf documentation built on Feb. 24, 2024, 11:02 p.m.