[R-sig-eco] Calculating Mean Absolute Error and Mean Squared Error for Ordinary Kriging

Bede-Fazekas Ákos bfalevlist at gmail.com
Tue Mar 8 12:12:44 CET 2016


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


	[[alternative HTML version deleted]]



More information about the R-sig-ecology mailing list