FittingEvaluationIndex: Calculate Fitting Evaluation Indices

FittingEvaluationIndexR Documentation

Calculate Fitting Evaluation Indices

Description

This function calculates several fitting evaluation indices based on estimated and observed values.

Usage

FittingEvaluationIndex(EstiH, ObsH)

Arguments

EstiH

A numeric vector of estimated values.

ObsH

A numeric vector of observed values.

Details

EstiH and ObsH must have the same length. Non-finite pairs are removed, and at least two finite pairs are required. R2 is NA when all observed values are equal, and TRE is NA when all estimated values are zero.

Value

A named numeric vector with evaluation indices:

pe

Mean error

RMSE

Root Mean Squared Error

R2

Coefficient of determination

Var

Variance of the error

TRE

Total Relative Error (percentage)

Examples

FittingEvaluationIndex(c(1, 2, 4), c(1, 3, 5))

forestat documentation built on Oct. 9, 2026, 9:06 a.m.