View source: R/perform_hypothesis_test.R
argmin.HT | R Documentation |
This is a wrapper to perform hypothesis test to see if a given dimension may be an argmin. Multiple methods are supported.
argmin.HT(data, r = NULL, method = "softmin.LOO", ...)
data |
(1) A n by p data matrix for (GTA); each of its row is a p-dimensional sample, or (2) A n by (p-1) difference matrix for (SML, HML, NS, MT); each of its row is a (p-1)-dimensional sample differences |
r |
The dimension of interest for hypothesis test; defaults to NULL. (Only needed for GTA) |
method |
A string indicating the method for hypothesis test; defaults to 'softmin.LOO'. Passing an abbreviation is allowed. For the list of supported methods and their abbreviations, see Details. |
... |
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) | LOO (leave-one-out) algorithm, using the exponential weightings. Proposed by \insertRefzhang2024winnersargminCS. |
argmin.LOO (HML) | A variant of SML, but it uses (hard) argmin rather than exponential weighting. The method is not recommended because its type 1 error is not controlled. |
nonsplit (NS) | A variant of SML, but no splitting is involved. One needs to pass a fixed lambda value as a required additional argument. The method is not recommended because its type 1 error is not controlled. |
Bonferroni (MT) | Multiple testing with Bonferroni's correction. |
Gupta (GTA) | The method in \insertRefgupta.1965argminCS. |
'Accept' or 'Reject'. A string indicating whether the given dimension could be an argmin (Accept) or not (Reject), and relevant statistics.
zhang2024winnersargminCS
\insertRefcck.many.momentsargminCS
\insertRefgupta.1965argminCS
\insertReffutschik.1995argminCS
r <- 4
n <- 200
p <- 20
mu <- (1:p)/p
cov <- diag(length(mu))
set.seed(108)
data <- MASS::mvrnorm(n, mu, cov)
sample.mean <- colMeans(data)
## softmin.LOO
difference.matrix.r <- matrix(rep(data[,r], p-1), ncol=p-1, byrow=FALSE) - data[,-r]
argmin.HT(difference.matrix.r)
## use seed
argmin.HT(difference.matrix.r, seed=19)
# provide centered test statistic (to simulate asymptotic normality)
true.mean.difference.r <- mu[r] - mu[-r]
argmin.HT(difference.matrix.r, true.mean=true.mean.difference.r)
# keep the data unstandardized
argmin.HT(difference.matrix.r, scale.input=FALSE)
# use an user-specified lambda
argmin.HT(difference.matrix.r, lambda=sqrt(n)/2.5)
# add a seed
argmin.HT(difference.matrix.r, seed=19)
## argmin.LOO/hard min
argmin.HT(difference.matrix.r, method='HML')
## nonsplit
argmin.HT(difference.matrix.r, method='NS', lambda=sqrt(n)/2.5)
## Bonferroni (choose t test because of normal data)
argmin.HT(difference.matrix.r, method='MT', test='t')
## z test
argmin.HT(difference.matrix.r, method='MT', test='z')
## Gupta
critical.val <- get.quantile.gupta.selection(p=length(mu))
argmin.HT(data, r, method='GTA', critical.val=critical.val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.