View source: R/construct_confidence_set.R
CS.argmin | R Documentation |
This is a wrapper to construct a discrete confidence set for argmin. Multiple methods are supported.
CS.argmin(data, method = "softmin.LOO", alpha = 0.05, ...)
data |
A n by p data matrix; each row is a p-dimensional sample. |
method |
A string indicating the method used to construct the confidence set. Defaults to 'softmin.LOO'. Can be abbreviated (e.g., 'SML' for 'softmin.LOO'). See **Details** for available methods and abbreviations. |
alpha |
The significance level; defaults to 0.05. The function produces a |
... |
Additional arguments to argmin.HT.LOO, lambda.adaptive.enlarge, is.lambda.feasible.LOO, argmin.HT.MT, argmin.HT.gupta. A correct argument name needs to be specified if it is used. |
The supported methods include:
softmin.LOO (SML) | Leave-one-out algorithm using exponential weighting. Proposed by \insertRefzhang2024winnersargminCS. |
argmin.LOO (HML) | A variant of SML that uses hard argmin instead of exponential weighting. Not recommended. |
nonsplit (NS) | A variant of SML without data splitting. Requires a fixed lambda value as an additional argument. Not recommended |
Bonferroni (MT) | Multiple testing using Bonferroni correction. |
Gupta (GTA) | The method proposed by \insertCitegupta.1965;textualargminCS. Requires independence and the same population standard deviation for all dimensions. |
Futschik (FCHK) | A two-step method from \insertCitefutschik.1995;textualargminCS. Requires independence and the same population standard deviation for all dimensions. |
A vector of indices (1-based) representing the (1 - alpha) confidence set.
zhang2024winnersargminCS
\insertRefcck.many.momentsargminCS
\insertRefgupta.1965argminCS
\insertReffutschik.1995argminCS
r <- 4
n <- 200
mu <- (1:20)/20
cov <- diag(length(mu))
set.seed(108)
data <- MASS::mvrnorm(n, mu, cov)
sample.mean <- colMeans(data)
## softmin.LOO
CS.argmin(data)
## use seed
CS.argmin(data, seed=13)
## argmin.LOO
CS.argmin(data, method='HML')
## nonsplit
CS.argmin(data, method='NS', lambda=sqrt(n)/2.5)
## Bonferroni (choose t test because of normal data)
CS.argmin(data, method='MT', test='t')
## Gupta
CS.argmin(data, method='GTA')
## Futschik two-step method
# default alpha.1, alpha.2
CS.argmin(data, method='FCHK')
alpha.1 <- 0.0005
alpha.2 <- 1 - (0.95/(1 - alpha.1))
CS.argmin(data, method='FCHK', alpha.1=0.0005, alpha.2=alpha.2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.