Computes RMSE as the square root of MSE and propagates uncertainty via a first-order delta-method approximation.
Arguments
- y
A numeric vector of observed outcomes.
- mupred
A numeric matrix of posterior expected predictions with dimensions draws x observations. A length-
nvector is also accepted.- log_weights
Optional numeric matrix of unnormalized log-importance weights with dimensions \(S \times n\). Weights are column-normalized before computing each per-observation contribution.
- pointwise
Optional numeric vector of precomputed pointwise squared errors. If provided,
y,mupred, andlog_weightsare ignored.
Value
An object of class "measure": a list with:
estimatesA 1 \(\times\) 2 matrix. The row is named after the measure, the columns are
EstimateandSE(standard error).pointwiseAn \(n \times 1\) matrix of per-observation values. The column is named after the measure.
extraOptional. Auxiliary data for the standard error of a difference. Most measures do not set it.
Attributes measure (i.e., measure name) and dims (draws \(\times\)
observations) are also set. Use print() for a readable summary.