Learn R Programming

GeoModels (version 2.2.5)

GeoDoScores: Computation of drop-one predictive scores

Description

The function computes RMSE, MAE, LSCORE, CRPS predictive scores based on drop-one prediction for a spatial, spatiotemporal and bivariate Gaussian random fields

Usage

GeoDoScores(data, method="cholesky", matrix)

Value

Returns a list containing the following information:

RMSE

Root-mean-square error predictive score

MAE

Mean absolute error predictive score

LSCORE

Logarithmic predictive score

CRPS

Continuous ranked probability predictive score

Arguments

data

A \(d\)-dimensional vector (a single spatial realisation) or a a(\(t \times d\))-matrix (a single spatio-temporal realisation). or a a(\(2 \times d\))-matrix (a single bivariate realisation).

method

String; the type of matrix decomposition used in the computation of the predictive scores. Default is cholesky. The other possible choices is svd.

matrix

An object returned by GeoCovmatrix.

Details

For a given covariance matrix object (GeoCovmatrix) and a given spatial, spatiotemporal or bivariare realization from a Gaussian random field, the function computes four predictive scores based on drop-one prediction.

References

Zhang H. and Wang Y. (2010). Kriging and cross-validation for massive spatial data. Environmetrics, 21, 290--304. Gneiting T. and Raftery A. Strictly Proper Scoring Rules, Prediction, and Estimation. Journal of the American Statistical Association, 102

See Also

GeoCovmatrix

Examples

Run this code

library(GeoModels)

################################################################
######### Examples of predictive score computation ############
################################################################
set.seed(8)
 # Define the spatial-coordinates of the points:
x <- runif(500, 0, 2)
y <- runif(500, 0, 2)
coords=cbind(x,y)
matrix1 <- GeoCovmatrix(coordx=coords, corrmodel="Matern", param=list(smooth=0.5,
 sill=1,scale=0.2,nugget=0))
 
data <- GeoSim(coordx=coords, corrmodel="Matern", param=list(mean=0,smooth=0.5,
 sill=1,scale=0.2,nugget=0))$data

Pr_scores <- GeoDoScores(data,matrix=matrix1)

Pr_scores

Run the code above in your browser using DataLab