predicted = c(21.5, 22.2, 19.1)
observed = c(20, 20, 20)
# The Willmott index "fails" in this case, as the variance in the
# observation is 0.
willmott(predicted, observed)
# Try with more realistic observations
observed = c(20.5, 19.5, 20.0)
willmott(predicted, observed)
Run the code above in your browser using DataLab