binom.nettest: Performes a binomial test with FDR correction for network...

Description Usage Arguments Value Examples

View source: R/dgm.R

Description

Performes a binomial test with FDR correction for network edge occurrence.

Usage

1
binom.nettest(adj, alter = "two.sided", fdr = 0.05)

Arguments

adj

adjacency matrix, nodes x nodes x subj, or nodes x nodes x runs x subj.

alter

type of binomial test, "two.sided" (default), "less", or "greater"

fdr

false discovery rate (FDR) control, default is 0.05.

Value

store list with results.

Examples

1
2
3
4
5
6
7
# Generate some sample binary 5-node network structures for N=20, then perform
# significance testing.
N=20
x = rmdiag(array(rbinom(n=5*5*N, size=1, prob=0.10), dim=c(5,5,N)))
x[1,2,2:N]=1; x[2,3,seq(1,N,2)]=1 # add some consitent edges
A = apply(x, c(1,2), mean)
l = binom.nettest(x)

schw4b/multdyn documentation built on Dec. 14, 2021, 7:39 a.m.