| Title: | Analysis of Correlated High-Dimensional Expression (ACE) Data |
|---|---|
| Description: | A function for estimating factor models. Give factor-adjusted statistics, factor-adjusted mean estimation (one-sample test) or factor-adjusted mean difference estimation (two-sample test). |
| Authors: | Peng Wang [aut, cre], Pengfei Lyu [aut], Shyamal Peddada [aut], Hongyuan Cao [aut] |
| Maintainer: | Peng Wang <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1 |
| Built: | 2026-05-19 06:16:14 UTC |
| Source: | https://github.com/cran/ACE.CoCo |
A function for estimating factor models, giving factor-adjusted statistics.
ACE(Z, X, H0_indicator, gama)ACE(Z, X, H0_indicator, gama)
Z |
The observed data matrix with the variables in rows and samples in columns. It is a |
X |
(Optional) The observed data matrix with the variables in rows and samples in columns. It is a |
H0_indicator |
(Optional) A |
gama |
FDR control level. |
An object with S3 class ACE containing the following items will be returned:
FDPIf H0_indicator exists, FDP is true FDP, otherwise, it is estimated FDP.
PowerIf H0_indicator exists, power is output which is defined as the ratio of the number of correctly rejected to the number of non-nulls.
RejectionThe number of rejections.
Adjusted_mean_differenceFactor-adjusted mean difference which is a -dimensional vector.
Adjusted_statisticsFactor-adjusted statistics (-dimensional vector).
ThresholdA critical value. When absolute factor-adjusted statistics is larger than the threshold, we reject it.
Estimated_number_factorThe estimated number of factors.
pai1_hatThe estimated proportion of non-nulls.
Cao, H., & Kosorok, M. R. (2011). Simultaneous critical values for t-tests in very high dimensions. Bernoulli, 17, 347.
Wang, P., Lyu, P., Peddada, S., Cao, H. (2023+). A powerful methodology for analyzing correlated high dimensional data using factor models. results not shown.
library(mvtnorm); library(quantreg) p <- 200; n <- 100; h <- 3 # the number of variables, samples and factors berlii <- rbinom(p, 1, 0.2) # 1 means the variable is non-null and 0 means it is null. index0 <- which(berlii == 0); index1 <- which(berlii == 1) mu <- matrix(rep(0, 1*p), nrow=p) mu[index1] <- runif(length(index1), min=0.4, max=0.7) # expectation of data B <- matrix(runif(h*p, min=-1, max=1), nrow=p) # factor loading matrix t_error <- t(rmvt(n, sigma = diag(p), df = 10)) # error term followed t-distribution f <- t(rmvt(n, diag(h), df = 4))/sqrt(4/(4-2)) # factor followed t-distribution Y <- mu %*% matrix(rep(1, n*1), nrow=1) + B %*% f + t_error # data res <- ACE(Z = Y, H0_indicator = berlii, gama = 0.05) res$FDP # true FDP res$Power # powerlibrary(mvtnorm); library(quantreg) p <- 200; n <- 100; h <- 3 # the number of variables, samples and factors berlii <- rbinom(p, 1, 0.2) # 1 means the variable is non-null and 0 means it is null. index0 <- which(berlii == 0); index1 <- which(berlii == 1) mu <- matrix(rep(0, 1*p), nrow=p) mu[index1] <- runif(length(index1), min=0.4, max=0.7) # expectation of data B <- matrix(runif(h*p, min=-1, max=1), nrow=p) # factor loading matrix t_error <- t(rmvt(n, sigma = diag(p), df = 10)) # error term followed t-distribution f <- t(rmvt(n, diag(h), df = 4))/sqrt(4/(4-2)) # factor followed t-distribution Y <- mu %*% matrix(rep(1, n*1), nrow=1) + B %*% f + t_error # data res <- ACE(Z = Y, H0_indicator = berlii, gama = 0.05) res$FDP # true FDP res$Power # power