% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/winkler.R
\name{winkler_cs}
\alias{winkler_cs}
\title{One-sided empirical Bernstein CS for Winkler scores (Proposition 4)}
\usage{
winkler_cs(
  p,
  q,
  y,
  alpha = 0.05,
  base_score = log_score,
  v_opt = 10,
  lower_bound = NULL
)
}
\arguments{
\item{p}{Numeric vector in (0,1). Forecasts from model 1.}

\item{q}{Numeric vector in (0,1). Forecasts from model 2.}

\item{y}{Numeric vector containing only 0 and 1. Binary outcomes.}

\item{alpha}{Numeric in (0,1). Significance level. Default: 0.05.}

\item{base_score}{Function. Underlying scoring rule. Default: log_score.}

\item{v_opt}{Numeric > 0. Optimal intrinsic time. Default: 10.}

\item{lower_bound}{Numeric or NULL. Analytical lower bound on w_i for
two-sided CS via Corollary 2. If NULL (default), returns
one-sided CS only. If supplied, must satisfy w_i >= lower_bound
for all i almost surely.}
}
\value{
data.frame with columns t, estimate, lower, upper.
lower = -Inf always (one-sided) unless lower_bound is supplied.
}
\description{
Applies the Winkler normalisation and constructs a one-sided upper
confidence sequence for the mean Winkler score W_t = (1/t)*sum w_i.
The CS takes the form \verb{(-Inf, U_t]}, valid uniformly over all t >= 1.
}
\details{
Scale convention: Winkler score bounded above by 1, so c/2 = 1, c = 2.
This is hardcoded — do not change c without re-deriving the bound.
}
\section{Interpretation}{

If \code{U_t < 0} for some \code{t}, this is time-uniform evidence that forecaster 1
(\code{p}) is worse than forecaster 2 (\code{q}) on average — i.e. a rejection is
evidence against \code{p}, not for it. More generally, \code{W_t > 0} suggests \code{p}
outperforms \code{q}; \code{W_t < 0} suggests \code{q} outperforms \code{p}.
}

\examples{
p <- c(0.7, 0.6, 0.8, 0.65)
q <- c(0.5, 0.7, 0.6, 0.55)
y <- c(1, 1, 0, 1)
winkler_cs(p, q, y, alpha = 0.05)

}
