Learn R Programming

sdafilter (version 1.0.1)

SDA_M: Symmetrized Data Aggregation for one-sample t-test

Description

This is the main function in the SDA paper. Other commonly used test statistics for the first part of data are also allowed in this function.

Usage

SDA_M(
  dat,
  alpha,
  Omega,
  nonsparse = FALSE,
  stable = TRUE,
  kwd = c("lasso", "de-lasso", "innovate", "pfa"),
  scale = TRUE
)

Value

the indices of the hypotheses rejected by the SDA method

Arguments

dat

a n by p data matrix

alpha

the FDR level

Omega

the inverse covariance matrix; if it is missing, it will be estimated by the glasso package.

nonsparse

If it is TRUE, the covariance matrix will be estimated by the POET package; otherwise it will be fitted by glasso by default.

stable

If it is TRUE, the sample will be randomly splitted \(B=10\) times for stability performance; otherwise, only single sample-splitting is used.

kwd

various methods for calculating the test statistics from the first part of data

scale

If it is TRUE, the test statistic from the first part of data will be standardized.

Details

We provide other commonly used test statistics for the first part of sample. These include the de-biased lasso, innovated transformation, and factor-adjusted test statistics.

Examples

Run this code
n = 50
p = 100
rho = 0.8
Sig = matrix(rho, p, p)
diag(Sig) = 1
dat <- MASS::mvrnorm(n, rep(0, p), Sig)
mu = rep(0, p)
mu[1:as.integer(0.1*p)]=0.5
dat = dat+rep(1, n)%*%t(mu)
alpha = 0.2
out = SDA_M(dat, alpha, solve(Sig), kwd='lasso')
print(out)

Run the code above in your browser using DataLab