This method uses algebraic method assuming normal distribution of the residuals.
This is done by using sd
rather than RSE from
lm
model.
cost_MBE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MAE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MSE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_RMSE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_SSE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MinErr( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MaxErr( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MaxAbsErr( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MaxSqErr( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_R_squared( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_SESOItoRMSE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_PPER( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_MHE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE ) cost_RMHE( observed, predicted, SESOI_lower = 0, SESOI_upper = 0, negative_weight = 1, positive_weight = 1, na.rm = FALSE )
observed | Numeric vector |
---|---|
predicted | Numeric vector |
SESOI_lower | Lower smallest effect size of interest threshold |
SESOI_upper | Upper smallest effect size of interest threshold |
negative_weight | How should negative residuals be weighted? Default is 1 |
positive_weight | How should positive residuals be weighted? Default is 1 |
na.rm | Should NAs be removed? Default is |
data("yoyo_mas_data") model <- lm(MAS ~ YoYoIR1, yoyo_mas_data) observed <- yoyo_mas_data$MAS predicted <- predict(model) SESOI_lower <- -0.5 SESOI_upper <- 0.5 # Mean Squared Error cost_MSE( observed = observed, predicted = predicted, SESOI_lower = SESOI_lower, SESOI_upper = SESOI_upper )#> [1] 0.04465622# Mean Absolute Error cost_MAE( observed = observed, predicted = predicted, SESOI_lower = SESOI_lower, SESOI_upper = SESOI_upper )#> [1] 0.1749008# Root Mean Squared Error cost_RMSE( observed = observed, predicted = predicted, SESOI_lower = SESOI_lower, SESOI_upper = SESOI_upper )#> [1] 0.2113202# Bias cost_MBE( observed = observed, predicted = predicted, SESOI_lower = SESOI_lower, SESOI_upper = SESOI_upper )#> [1] -5.921193e-15# Sum of Squared Errors cost_SSE( observed = observed, predicted = predicted, SESOI_lower = SESOI_lower, SESOI_upper = SESOI_upper )#> [1] 1.339687# Proportion of Practically Equivalent Residuals cost_PPER( observed = observed, predicted = predicted, SESOI_lower = SESOI_lower, SESOI_upper = SESOI_upper )#> [1] 0.9728044