% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/frequentist_test.R
\name{frequentist_test}
\alias{frequentist_test}
\title{Frequentist Test from Parast et al. (2024)}
\usage{
frequentist_test(P_observed, Z, alpha = 0.05, beta = 0.2, delta_true = NULL)
}
\arguments{
\item{P_observed}{Observed outcomes \eqn{(Y, S)} corresponding to the assigned treatment \eqn{Z}.}

\item{Z}{Treatment assignment vector.}

\item{alpha}{Numeric. Significance level for the confidence interval (default is 0.05).}

\item{beta}{Numeric. Type II error rate (default is 0.2).}

\item{delta_true}{Numeric (optional). The true value of \eqn{\delta}, used to calculate 
frequentist coverage during simulations.}
}
\value{
A list containing:
\itemize{
  \item \code{CI}: The calculated confidence interval for \eqn{\delta}.
  \item \code{threshold}: The \eqn{\varepsilon} threshold value used in the test.
  \item \code{coverage}: Logical indicating if \code{delta_true} falls within the \code{CI}
    (if \code{delta_true} is provided).
  \item \code{power}: Logical indicating if the upper bound of \code{CI} is below \code{threshold}, which indicates that the test identifies the surrogate as valid.
}
}
\description{
This function performs a frequentist test for surrogate evaluation based on 
the rank-based methodology of \insertCite{parast2024rank;textual}{BSET}. It calculates confidence
intervals, the \eqn{\varepsilon} threshold used, and determines if the surrogate is
valid.
This function is generally not intended to be called directly by the user
and is instead used internally within \code{BSET_no_X} and \code{BSET_X}.
}
\references{
\insertRef{parast2024rank}{BSET}
}
