rand.test: Randomization test for Patel's kappa. Creates a distribution...

Description Usage Arguments Value Examples

View source: R/dgm.R

Description

Randomization test for Patel's kappa. Creates a distribution of values kappa under the null hypothesis.

Usage

1
rand.test(X, alpha = 0.05, K = 1000)

Arguments

X

time x node x subjects 3D matrix.

alpha

sign. level

K

number of randomizations, default is 1000.

Value

stat lower and upper significance thresholds.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# create some sample data with 200 samples,
# 3 nodes, and 2 subjects
ts = array(rnorm(200*3*5), dim=c(200,3,5))
mysubs=list()
mysubs[[1]]=patel(ts[,,1])
mysubs[[2]]=patel(ts[,,2])
mysubs[[3]]=patel(ts[,,3])
mysubs[[4]]=patel(ts[,,4])
mysubs[[5]]=patel(ts[,,5])
g=patel.group(mysubs)
r=rand.test(rmdiag(g$kappa), K=100)

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