Prediction standard factorial error estimated using standard regression methods (see Herschy, 1978).
Usage
sfe(data, ...)
# S3 method for class 'data.frame'
sfe(data, truth, estimate, na_rm = TRUE, ...)
sfe_vec(truth, estimate, na_rm = TRUE, ...)Arguments
- data
A
data.framecontaining the columns specified by thetruthandestimatearguments.- ...
Not currently used.
- truth
The column identifier for the true results (that is
numeric). This should be an unquoted column name although this argument is passed by expression and supports quasiquotation (you can unquote column names). For_vec()functions, anumericvector.- estimate
The column identifier for the predicted results (that is also
numeric). As withtruththis can be specified different ways but the primary method is to use an unquoted variable name. For_vec()functions, anumericvector.- na_rm
A
logicalvalue indicating whetherNAvalues should be stripped before the computation proceeds.
Value
A tibble with columns .metric, .estimator,
and .estimate and 1 row of values.
For grouped data frames, the number of rows returned will be the same as the number of groups.
For sfe_vec(), a single numeric value (or NA).
Details
The metric is widely used for assessing Sediment Rating Curves (e.g., Hicks et al. 2020). The model is usually considered 'unacceptable' if the \(SFE > 2\), see Hicks et al. (2011).
It is estimated as follows: $$SFE = \exp\left(\sqrt{\frac{1}{n} \sum_{i=1}^{n} \left( \log\left(\frac{obs_i}{sim_i} \right) \right)^2 }\right)$$ where:
\(sim\) defines model simulations at time step \(i\)
\(obs\) defines model observations at time step \(i\)
References
Herschy, R.W. 1978: Accuracy. Chapter 10 In: Herschy, R.W. (ed.) Hydrometry - principles and practices. John Wiley and Sons, Chichester, 511 p.
Hicks, D. M., Shankar, U., McKerchar, A. I., Basher, L., Lynn, I., Page, M., & Jessen, M. (2011). Suspended Sediment Yields from New Zealand Rivers. Journal of Hydrology (New Zealand), 50(1), 81–142. doi:10.3316/informit.315190637227597
Hicks, M., Doyle, M., Watson, J., Holwerda, N., Lynch, B., Wyatt, J., Jones, H., & Hill, R. (2020). Measurement of Fluvial Suspended Sediment Load and its Composition (No. 1.0.0; National Environmental Monitoring Standards, p. 138). https://www.nems.org.nz/documents/suspended-sediment
See also
Other regression metrics:
press()