NetANOVA {frechet} | R Documentation |
Fréchet ANOVA for Networks
Description
Fréchet analysis of variance for graph Laplacian matrices, covariance matrices, or correlation matrices with respect to the Frobenius distance.
Usage
NetANOVA(Ly = NULL, group = NULL, optns = list())
Arguments
Ly |
A list (length n) of m by m matrices or a m by m by n array where
|
group |
A vector containing the group memberships of the corresponding
matrices in |
optns |
A list of control parameters specified by
|
Details
Available control options are:
- boot
Logical, also compute bootstrap
p
-value ifTRUE
. Default isFALSE
.- R
The number of bootstrap replicates. Only used when
boot
isTRUE
. Default is 1000.
Value
A NetANOVA
object — a list containing the following fields:
pvalAsy |
A scalar holding the asymptotic |
pvalBoot |
A scalar holding the bootstrap |
optns |
The control options used. |
References
-
Dubey, P. and Müller, H.G., 2019. Fréchet analysis of variance for random objects. Biometrika, 106(4), pp.803-821.
Examples
set.seed(1)
n1 <- 100
n2 <- 100
gamma1 <- 2
gamma2 <- 3
Y1 <- lapply(1:n1, function(i) {
igraph::laplacian_matrix(igraph::sample_pa(n = 10, power = gamma1,
directed = FALSE),
sparse = FALSE)
})
Y2 <- lapply(1:n2, function(i) {
igraph::laplacian_matrix(igraph::sample_pa(n = 10, power = gamma2,
directed = FALSE),
sparse = FALSE)
})
Ly <- c(Y1, Y2)
group <- c(rep(1, n1), rep(2, n2))
res <- NetANOVA(Ly, group, optns = list(boot = TRUE))
res$pvalAsy # returns asymptotic pvalue
res$pvalBoot # returns bootstrap pvalue