How to calculate skill scores between observe and model data by R software?

As a new user, I would like to learn how can calculate "skill scores" between observed and model data by R software.
My data is in an excel sheet which is attached to the following link.

https://docs.google.com/spreadsheets/d/1YhTh9cW007ntTdT1TiQYE1JBudOp-kSX/edit?usp=sharing&ouid=100460117339618894023&rtpof=true&sd=true

Hopefully, I will get a positive response from the R community.
Skill score formula

Please define Z_m and Z_o.

I guess Z_{m} is just the model score and Z_{o} is the observed score?

If so, you can do the following:

Data <- data.frame(observed = sample(0:10,1000,TRUE),
                   model    = sample(0:10,1000,TRUE))
head(Data)

  observed model
1        6     6
2        3     1
3        2     8
4        1     0
5        9     0
6        2     6

sum(pmin(Data$observed,Data$model))
[1] 3315

Here, pmin() compares pairwise values from your two columns and takes the minimum. sum() just sums them up, which results in \sum_{i = 1}^{n} \min\{{Z_{i,m}, Z_{i,o}}\}

Kind regards

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.