bias_per function

Bias of an estimator in percentage

Bias of an estimator in percentage

Function for calculating the bias of an estimator.

bias_per(df, y, yhat, na.rm = TRUE)

Arguments

  • df: a data frame.
  • y: Quoted name of the variable representing the observed values in the data frame. If a data frame is not provided, y can also be a numeric vector.
  • yhat: Quoted name of the variable representing the estimated values in the data frame. If a data frame is not provided, yhat can also be a numeric vector.
  • na.rm: a logical value indicating whether NA values should be stripped before the computation proceeds. default: TRUE

Returns

Numeric vector with the bias value, in percentage.

Details

Function for calculating the bias of an estimator, given the observed values, and the estimated values.

Examples

library(forestmangr) data("exfm11") head(exfm11) # Bias of an estimator, given the data frame and quoted variable names: bias_per(exfm11, "TH", "TH_EST3") # Bias of an estimator, given the vectors for observed and estimated values: bias_per(y = exfm11$TH, yhat = exfm11$TH_EST3)

See Also

other statistics to evaluate estimators: rmse_per for the Root mean square error of an estimator

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

  • Maintainer: Sollano Rabelo Braga
  • License: MIT + file LICENSE
  • Last published: 2024-12-01