NetCPD {frechet} | R Documentation |
Fréchet Change Point Detection for Networks
Description
Fréchet change point detection for graph Laplacian matrices, covariance matrices, or correlation matrices with respect to the Frobenius distance.
Usage
NetCPD(Ly = NULL, optns = list())
Arguments
Ly |
A list (length n) of m by m matrices or a m by m by n array where
|
optns |
A list of control parameters specified by
|
Details
Available control options are:
- cutOff
A scalar between 0 and 1 indicating the interval, i.e., [cutOff, 1 - cutOff], in which candidate change points lie.
- Q
A scalar representing the number of Monte Carlo simulations to run while approximating the critical value (stardized Brownian bridge). Default is 1000.
- 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 NetCPD
object — a list containing the following fields:
tau |
a scalar holding the estimated change point. |
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., 2020. Fréchet change-point detection. The Annals of Statistics, 48(6), pp.3312-3335.
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)
res <- NetCPD(Ly, optns = list(boot = TRUE))
res$tau # returns the estimated change point
res$pvalAsy # returns asymptotic pvalue
res$pvalBoot # returns bootstrap pvalue