View source: R/construct_confidence_set.R
CS.argmax | R Documentation |
This is a wrapper to construct a confidence set for the argmax by negating the input and reusing CS.argmin
.
CS.argmax(data, method = "softmin.LOO", alpha = 0.05, ...)
data |
An |
method |
A string indicating the method to use; defaults to 'softmin.LOO'. Can be abbreviated (e.g., 'SML' for 'softmin.LOO'). See Details for full list. |
alpha |
Significance level. The function returns a |
... |
Additional arguments passed to corresponding testing functions. |
The supported methods include:
softmin.LOO (SML) | Leave-one-out algorithm using exponential weighting. |
argmin.LOO (HML) | Variant of SML that uses hard argmin instead of soft weighting. Not recommended. |
nonsplit (NS) | Variant of SML without data splitting. Requires a fixed lambda value. Not recommended. |
Bonferroni (MT) | Multiple testing using Bonferroni correction. |
Gupta (GTA) | The method of \insertRefgupta.1965argminCS. |
Futschik (FCHK) | A two-step method from \insertReffutschik.1995argminCS. |
A vector of indices (1-based) representing the confidence set for the argmax.
zhang2024winnersargminCS
\insertRefgupta.1965argminCS
\insertReffutschik.1995argminCS
\insertRefcck.many.momentsargminCS
set.seed(108)
n <- 200
p <- 20
mu <- (1:p)/p
cov <- diag(p)
data <- MASS::mvrnorm(n, mu, cov)
## softmin.LOO (SML)
CS.argmax(data)
## argmin.LOO (HML)
CS.argmax(data, method = "HML")
## nonsplit (NS) - requires lambda
CS.argmax(data, method = "NS", lambda = sqrt(n)/2.5)
## Bonferroni (MT) - t test default
CS.argmax(data, method = "MT", test = "t")
## Gupta (GTA)
CS.argmax(data, method = "GTA")
## Futschik (FCHK) with default alpha.1 and alpha.2
CS.argmax(data, method = "FCHK")
## Futschik (FCHK) with user-specified alpha.1 and alpha.2
alpha.1 <- 0.001
alpha.2 <- 1 - (0.95 / (1 - alpha.1))
CS.argmax(data, method = "FCHK", alpha.1 = alpha.1, alpha.2 = alpha.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.