RMSE_range: Calculate Overall or Binned RMSE of Trait Scores

View source: R/RMSE_range.R

RMSE_rangeR Documentation

Calculate Overall or Binned RMSE of Trait Scores

Description

A diagnostic function to examine measurement accuracy. It calculates the Root Mean Square Error (RMSE) either overall, or within specific intervals on the latent trait continuum.

Usage

RMSE_range(true_scores, estimated_scores, range_breaks = NULL)

Arguments

true_scores

Numeric vector. Actual/known trait scores.

estimated_scores

Numeric vector. Estimated trait scores from the model.

range_breaks

Numeric vector. Optional. Specifies the cut points for the trait score bins (e.g., c(-3, -1, 1, 3)). If NULL, calculates overall RMSE.

Value

If range_breaks is NULL, returns a single numeric RMSE value. If range_breaks is specified, returns a named numeric vector showing the RMSE within each score bin.

Examples

true <- rnorm(100)
est <- true + rnorm(100, 0, 0.3)

# Overall RMSE
RMSE_range(true, est)

# Binned RMSE
RMSE_range(true, est, range_breaks = c(-3, -1, 1, 3))


autoFC documentation built on July 14, 2026, 5:07 p.m.