tovecv: Convert error measures to vecv In spm: Spatial Predictive Modeling

 tovecv R Documentation

Convert error measures to vecv

Description

tovecv can be used to convert existing predictive error measures to vecv. For the definition of vecv, please see function vecv in library (spm). The error measures considered are mean square error (mse), root mse (rmse), relative rmse (rrmse), standardised rmse (srmse) and mean square reduced error (msre).

Usage

```tovecv(n, mu, s, m, measure = c("mse", "rmse", "rrmse", "srmse", "msre"))
```

Arguments

 `n` sample number of validation samples. `mu` mean of validation samples. `s` standard deviation of validation samples. `m` value of an error measure. `measure` a type of error measure (i.e. "mse", "rmse", "rrmse", "srmse" or "msre").

Value

a numeric number.

Jin Li

References

Li, J., 2016. Assessing spatial predictive models in the environmental sciences: accuracy. measures, data variation and variance explained. Environmental Modelling & Software 80 1-8.

Li, J., 2017. Assessing the accuracy of predictive models for numerical data: Not r nor r2, why not? Then what? PLOS ONE 12 (8): e0183250.

Examples

```n <- 300
mu <- 15.5
sd <- 8.80
mse <- 50.43
rmse <- sqrt(mse)
rrmse <- rmse / mu * 100
srmse <- rmse / sd
msre <- mse / sd ^ 2
tovecv(n=n, mu=mu, s=sd, m=mse, measure="mse")

tovecv(n=n, mu=mu, s=sd, m=rmse, measure="rmse")

tovecv(n=n, mu=mu, s=sd, m=rrmse, measure="rrmse")

tovecv(n=n, mu=mu, s=sd, m=srmse, measure="srmse")

tovecv(n=n, mu=mu, s=sd, m=msre, measure="msre")

```

spm documentation built on May 6, 2022, 9:06 a.m.