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:
Hello everyone, Can someone give sugestions how to compare map interpolations produced by Ordinary Kriging or Inverse Distance Weigthed, how to calculate Mean Absolute Error and Mean Squared Error in R? Thank you so much in advance! Wish successes in your undertakings to all of you! Nina Philipova --- ???? ????? ? ???????? ?? ?????? ?? Avast. https://www.avast.com/antivirus [[alternative HTML version deleted]]
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology