FLAG {FLAG}R Documentation

FLAG is the main function to fulfill the whole process.

Description

FLAG is the main function to fulfill the whole process.

Usage

FLAG(
  data,
  scale.var = TRUE,
  low.rank = NULL,
  infer = "llr",
  eps = 1e-07,
  crit.loglik = 1e-04
)

Arguments

data

Matrix, with size n*p.

scale.var

Logical, whether to scale the variance of X to 1/p, default to be T(RUE).

low.rank

Logical, whether to use low rank update to shrink the time of eigen-decomposition of XX^T, default to be TRUE when sample size larger than 1000.

infer

Character, option of different tests of inference where 'llr' for likelihood ratio test and 'wald' for Wald test based on Fisher Information Matrix.

eps

Numeric, a small term to avoid numerical problems, default to be 1e-7.

crit.loglik

Numeric, the criteria of the change ratio of log likelihood to stop.

Value

List, the estimated precision matrix, the p-value of precision matrix estimation, the edge existence using Bonferroni correction, the edge existence using false discovery rate, the matrix of estimated eta, the standard error or estimated eta, the matrix of estimated partial correlation rho, the standard error or estimated partial correlation rho, the p-value of partial correlation matrix estimation, the matrix of estimated sigma_a^2, the standard error or estimated sigma_b^2, the execution time.

Examples

N = 20
P = 10
pi = 0.2
Pre = matrix(sample(c(0.2, 0.4), P*P, replace = TRUE) * rbinom(P*P, 1, pi), nrow = P, ncol = P )
Pre[lower.tri(Pre)] = t(Pre)[lower.tri(Pre)]
diag(Pre) = 1
vals <- eigen(Pre)$values
Sigma = solve(Pre)
Z = MASS::mvrnorm(N, rep(0, P), Sigma)
Z.c = scale(Z, center = TRUE, scale = FALSE)
results = FLAG(Z.c)


[Package FLAG version 0.1 Index]