Learn R Programming

sdafilter (version 1.0.1)

SDA_2S: Symmetrized Data Aggregation for two-sample t-test

Description

Symmetrized Data Aggregation for two-sample t-test

Usage

SDA_2S(dat_I, dat_II, alpha, Sigma_I, Sigma_II, stable = TRUE)

Value

the indices of the hypotheses rejected

Arguments

dat_I

a \(n_1\) by \(p\) data matrix, the first part of data

dat_II

a \(n_2\) by \(p\) data matrix, the second part of data

alpha

the FDR level

Sigma_I

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

Sigma_II

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

stable

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

Examples

Run this code
p = 100
n = 30
dat_I = matrix(rnorm(n*p),nrow = n)
mu = rep(0, p)
mu[1:10] = 1.5
dat_I = dat_I = rep(1, n)%*%t(mu)

dat_II = matrix(rnorm(n*p), nrow = n)
Sigma_I = diag(p)
Sigma_II = diag(p)
out = SDA_2S(dat_I, dat_II, alpha=0.05, Sigma_I, Sigma_II)
print(out)

Run the code above in your browser using DataLab