Title: | Multivariate ANalysis of VAriance with Ridge Regularization for Semicontinuous High-Dimensional Data |
---|---|
Description: | Implements Multivariate ANalysis Of VAriance (MANOVA) parameters' inference and test with regularization for semicontinuous high-dimensional data. The method can be applied also in presence of low-dimensional data. The p-value can be obtained through asymptotic distribution or using a permutation procedure. The package gives also the possibility to simulate this type of data. Method is described in Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni (2024) <arXiv:2401.04036>. |
Authors: | Elena Sabbioni [aut, cre] , Claudio Agostinelli [aut] , Alessio Farcomeni [aut] |
Maintainer: | Elena Sabbioni <[email protected]> |
License: | GPL-2 |
Version: | 0.1-8 |
Built: | 2024-12-06 06:28:27 UTC |
Source: | CRAN |
scMANOVA
performs Multivariate ANalysis Of VAriance (MANOVA) inference and test with ridge regularization in presence of
semicontinuous high-dimensional data. The test is based on a Likelihood Ratio Test statistic
and the p-value can be computed using either asymptotic distribution (p.value.perm = FALSE
)
or via permutation procedure (p.value.perm = TRUE
). There is the possibility to provide
as input the regularization parameters or to choose them through an optimization procedure.
scMANOVA(x, n, lambda = NULL, lambda0 = NULL, lambda.step = 0.1, ident = FALSE, tol = 1e-08, penalty = function(n, p) log(n), B = 500, p.value.perm = FALSE, fixed.lambda = FALSE, ...)
scMANOVA(x, n, lambda = NULL, lambda0 = NULL, lambda.step = 0.1, ident = FALSE, tol = 1e-08, penalty = function(n, p) log(n), B = 500, p.value.perm = FALSE, fixed.lambda = FALSE, ...)
x |
|
n |
|
lambda |
|
lambda0 |
|
lambda.step |
scalar. Step size used in the optimization procedure to find the smallest value of |
ident |
|
tol |
scalar. Used in the optimization procedure to find the smallest value of |
penalty |
|
B |
scalar. Number of permutations to run in the permutation test |
p.value.perm |
|
fixed.lambda |
|
... |
further parameters passed to function |
An object of class
scMANOVA which is a list with the following components
pi |
|
mu |
|
sigmaRidge |
|
sigma |
|
pi0 |
|
mu0 |
|
sigma0Ridge |
|
sigma0 |
|
removed.vars |
|
logLikPi |
scalar. Log-likelihood for the discrete part of the model |
logLik |
scalar. Log-likelihood |
logLikPi0 |
scalar. Log-likelihood for the discrete part of the model under the null hypothesis |
logLik0 |
scalar. Log-likelihood under null hypothesis |
statistic |
scalar. Wilks statistics |
lambda |
scalar. Regularization parameter |
lambda0 |
scalar. Regularization parameter under null hypothesis |
df |
scalar. Model degree of freedom |
df0 |
scalar. Model degree of freedom under null hypothesis |
aic |
scalar. Information criteria |
aic0 |
scalar. Information criteria under null hypothesis |
p.value |
scalar. p-value of the Wilks statistic |
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni (2024) A regularized MANOVA test for semicontinuous high-dimensional data. arXiv: http://arxiv.org/abs/2401.04036
scMANOVAestimation
and scMANOVApermTest
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss) res.asy <- scMANOVA(x=x, n=n) # Asymptotic p.value res.asy res.perm <- scMANOVA(x=x, n=n, p.value.perm=TRUE) # p-value by permutation test res.perm
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss) res.asy <- scMANOVA(x=x, n=n) # Asymptotic p.value res.asy res.perm <- scMANOVA(x=x, n=n, p.value.perm=TRUE) # p-value by permutation test res.perm
scMANOVAestimation
computes the regularized Multivariate ANalysis Of
VAriance (MANOVA) maximum likelihood estimates for semicontinuous
high-dimensional data. The estimation can be performed also for
low-dimensional data. The regularization parameters are provided as input
and the user can decide to perform the regularization adding the identity
matrix to the raw estimated covariance matrix (default, ident=TRUE
)
or adding the diagonal values of the raw estimated covariance matrix
(ident=FALSE
).
scMANOVAestimation(x, n, lambda = NULL, lambda0 = NULL, ident = TRUE, posdef.check = TRUE, rm.vars = NA)
scMANOVAestimation(x, n, lambda = NULL, lambda0 = NULL, ident = TRUE, posdef.check = TRUE, rm.vars = NA)
x |
|
n |
|
lambda |
scalar. Ridge regularization parameter |
lambda0 |
scalar. Ridge regularization parameter under null hypothesis |
ident |
|
posdef.check |
|
rm.vars |
|
An object of class
scMANOVAestimation which is a list with the following components
pi |
|
mu |
|
sigmaRidge |
|
sigma |
|
pi0 |
|
mu0 |
|
sigma0Ridge |
|
sigma0 |
|
removed.vars |
|
logLikPi |
scalar. Log-likelihood for the discrete part of the model |
logLik |
scalar. Log-likelihood |
logLikPi0 |
scalar. Log-likelihood for the discrete part of the model under the null hypothesis |
logLik0 |
scalar. Log-likelihood under null hypothesis |
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni (2024) A regularized MANOVA test for semicontinuous high-dimensional data. arXiv: http://arxiv.org/abs/2401.04036
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss) res <- scMANOVAestimation(x=x, n=n, lambda=3.59, lambda0=3.13) res
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss) res <- scMANOVAestimation(x=x, n=n, lambda=3.59, lambda0=3.13) res
scMANOVApermTest
uses a permutation procedure to perform a test
based on a Multivariate ANalysis Of VAriance(MANOVA) Likelihood Ratio test statistic with a ridge
regularization. The statistic is developed for semicontinuous and
high-dimensional data, but can be used also in low-dimensional scenarios.
scMANOVApermTest(x, n, lambda = NULL, lambda0 = NULL, lambda.step = 0.1, ident = FALSE, tol = 1e-08, penalty = function(n, p) log(n), B = 500, parallel = c("no", "multicore", "snow"), ncpus = 1L, cl = NULL, only.pvalue = TRUE, rm.vars = NA, ...)
scMANOVApermTest(x, n, lambda = NULL, lambda0 = NULL, lambda.step = 0.1, ident = FALSE, tol = 1e-08, penalty = function(n, p) log(n), B = 500, parallel = c("no", "multicore", "snow"), ncpus = 1L, cl = NULL, only.pvalue = TRUE, rm.vars = NA, ...)
x |
|
n |
|
lambda |
scalar or a |
lambda0 |
|
lambda.step |
scalar. Step size used in the optimization procedure to find the smallest value of |
ident |
|
tol |
scalar. Used in the optimization procedure to find the smallest value of |
penalty |
|
B |
scalar. Number of permutations to run in the permutation test |
parallel |
The type of parallel operation to be used (if any) |
ncpus |
|
cl |
An optional |
only.pvalue |
|
rm.vars |
|
... |
Further parameters passed to |
If only.pvalue=TRUE
(default) a scalar which is the p-value of the Wilks statistic obtain by a permutation procedure, otherwise an object of class
htest
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni (2024) A regularized MANOVA test for semicontinuous high-dimensional data. arXiv: http://arxiv.org/abs/2401.04036
scMANOVA
and scMANOVAestimation
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss) res <- scMANOVApermTest(x=x, n=n, lambda=3.59, lambda0=3.13, only.pvalue=FALSE) res
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss) res <- scMANOVApermTest(x=x, n=n, lambda=3.59, lambda0=3.13, only.pvalue=FALSE) res
Simulation of dataset of semicontinuous data coming from different groups, with specific marginal probabilities of a missing value, specific mean vectors and common covariance matrix.
scMANOVAsimulation(n, p, pmiss = 0, rho = 0, mu = NULL, sigma = NULL, only.data = TRUE)
scMANOVAsimulation(n, p, pmiss = 0, rho = 0, mu = NULL, sigma = NULL, only.data = TRUE)
n |
|
p |
scalar. Number of variables (columns) |
pmiss |
scalar or |
rho |
scalar. If |
mu |
|
sigma |
|
only.data |
|
If only.data=TRUE
an object of class
matrix
is reported otherwise a list
with the following components
x |
|
y |
|
original |
|
mu |
|
sigma |
|
n |
As in input |
p |
As in input |
pmiss |
|
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni
Elena Sabbioni, Claudio Agostinelli and Alessio Farcomeni (2024) A regularized MANOVA test for semicontinuous high-dimensional data. arXiv: http://arxiv.org/abs/2401.04036
scMANOVAestimation
and scMANOVApermTest
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss)
set.seed(1234) n <- c(5,5) p <- 20 pmiss <- 0.1 x <- scMANOVAsimulation(n=n, p=p, pmiss=pmiss)