% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/penalty.R
\name{pk.beta}
\alias{pk.beta}
\alias{pk.beta.stnary}
\title{Beta preference function for the GEV shape parameter}
\usage{
pk.beta(
  para = NULL,
  lme.center = NULL,
  p = NULL,
  q = NULL,
  min.xi = -1,
  max.xi = 0.5,
  c0 = 0.35,
  c1 = 10,
  c2 = 2
)

pk.beta.stnary(
  para = NULL,
  lme.center = NULL,
  p = NULL,
  q = NULL,
  min.xi = -1,
  max.xi = 0.5,
  c0 = 0.35,
  c1 = 10,
  c2 = 2
)
}
\arguments{
\item{para}{A vector of GEV parameters; only \code{para[3]} (shape) is used.}

\item{lme.center}{L-moment estimates used as the center (adaptive mode).}

\item{p}{First shape parameter of the beta distribution.}

\item{q}{Second shape parameter (optional; if provided, fixed mode is used).}

\item{min.xi}{Lower support limit in fixed mode (default -1).}

\item{max.xi}{Upper support limit in fixed mode (default 0.5).}

\item{c0}{Half-width of the adaptive support (default 0.35).}

\item{c1}{Scaling hyperparameter for q (default 10).}

\item{c2}{Upper limit hyperparameter for q (default 2).}
}
\value{
A list containing:
\describe{
  \item{pk.one}{Preference function value (scalar)}
  \item{p}{Shape parameter p used}
  \item{q}{Shape parameter q used}
}
}
\description{
Computes the data-adaptive Beta preference (penalty) function for the GEV
shape parameter, used by both the stationary (\code{\link{glme.gev}}) and
the non-stationary (\code{\link{glme.gev11}}) GLME methods (v2.0.0 unified
implementation).

When \code{q} is \code{NULL} (adaptive mode), the support is
\eqn{(\max(-1, \hat\xi - c_0),\; \min(0.3, \hat\xi + c_0))} where
\eqn{\hat\xi} is \code{lme.center[3]}, and
\eqn{q = p + \min(|\hat\xi| c_1, c_2)} for \eqn{\hat\xi \le -0.05}
(otherwise \eqn{q = p}). When \code{q} is given (fixed mode), the support
is \code{(min.xi, max.xi)}; this mode is used for the fixed literature
penalties ("ms", "park", "cannon").

\code{pk.beta.stnary} is kept as a backward-compatible alias. Note that
since v2.0.0 both names use this unified implementation (the v1.x default
hyperparameters \code{c0=0.3, c2=5} changed to \code{c0=0.35, c2=2}, and
out-of-support values now return \code{1e-100} instead of \code{1}).
}
\examples{
# Adaptive beta preference for xi = -0.2 centered at LME xi = -0.15
pk.beta(para = c(100, 20, -0.2),
        lme.center = c(100, 20, -0.15), p = 6, c1 = 3, c2 = 1)

}
\references{
Shin, Y., Shin, Y., Park, J. & Park, J.-S. (2025). Generalized method of
L-moment estimation for stationary and nonstationary extreme value models.
arXiv preprint arXiv:2512.20385. \doi{10.48550/arXiv.2512.20385}
}
\seealso{
\code{\link{pk.norm.stnary}} for the normal penalty,
  \code{\link{MS_pk}} for the Martins-Stedinger penalty,
  \code{\link{glme.gev}}, \code{\link{glme.gev11}}.
}
\author{
Yonggwan Shin, Seokkap Ko, Jihong Park, Yire Shin, Jeong-Soo Park
}
