Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rmse_per

RMSE of an estimator in percentage


Description

Function for calculating the Root-Mean-Square-Error of an estimator.

Usage

rmse_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

Details

Function for calculating the Root-Mean-Square-Error of an estimator, given the observed values, and the estimated values.

Value

Numeric vector with the RMSE value, in percentage.

Author(s)

Sollano Rabelo Braga sollanorb@gmail.com

See Also

other statistics to evaluate estimators: bias_per for the bias of an estimator

Examples

library(forestmangr)
data("exfm11")
exfm11

# RMSE of an estimator, given the data frame and quoted variable names:
rmse_per(exfm11, "TH", "TH_EST3")

# RMSE of an estimator, given the vectors for observed and estimated values:
rmse_per(y = exfm11$TH, yhat = exfm11$TH_EST3)

forestmangr

Forest Mensuration and Management

v0.9.3
MIT + file LICENSE
Authors
Sollano Rabelo Braga [aut, cre, cph], Marcio Leles Romarco de Oliveira [aut], Eric Bastos Gorgens [aut]
Initial release
2021-01-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.