Skip to content
Prev 5297 / 7420 Next

Calculating Mean Absolute Error and Mean Squared Error for Ordinary Kriging

Dear Nina,

you should make prediction on the evaluation dataset (Note that since 
kriging is an exact interpolation method, predicting on the original 
dataset does not make sense):
prediction <- krige(dependent_variable ~ predictor, locations = 
original_dataset, newdata = evaluation_dataset)
Then you can calculate the difference of the predicted and observed values:
difference <- evaluation_dataset$dependent_variable - 
prediction at data$var1.pred
MAE <- mean(abs(difference))
MSE <- mean(difference ^ 2)

HTH,
?kos Bede-Fazekas
Hungarian Academy of Sciences

2016.03.08. 11:09 keltez?ssel, Philipova ?rta: