% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scores.R
\name{crps_empirical}
\alias{crps_empirical}
\title{Negated CRPS for empirical predictive distributions}
\usage{
crps_empirical(ensemble, y)
}
\arguments{
\item{ensemble}{Matrix. T x n matrix of forecast draws. Each row
corresponds to one observation in y and comprises
n simulation draws from the predictive distribution.
For Historical Simulation: each row is the past
WINDOW returns.}

\item{y}{Numeric vector of length T. Realised observations.}
}
\value{
Numeric vector of length T of CRPS values in \verb{(-Inf, 0]}
(negated loss).
}
\description{
Wrapper over \code{scoringRules::crps_sample} using method = "edf"
(empirical distribution function, O(n log n) via quantile decomposition
of Laio & Tamea, 2007). Positively oriented: higher = better.
}
\details{
Requires \code{nrow(ensemble) == length(y)}. Passes
\code{dat = ensemble} directly to \code{crps_sample} which handles
vectorisation over rows natively. \code{show_messages} is suppressed
as the "edf" method requires no bandwidth selection messages.
}
\examples{
if (requireNamespace("scoringRules", quietly = TRUE)) {
  ensemble <- matrix(c(0.1, 0.2, 0.3, 1.0, 1.1, 1.2), nrow = 2, byrow = TRUE)
  crps_empirical(ensemble, y = c(0.25, 1.05))
}

}
