make.permute.Phi: Permutation Test of Phi

Description Usage Arguments Value Author(s) Examples

View source: R/nettest.R

Description

This function prints out the network dependence test results for categorical observations.

Usage

1
make.permute.Phi(A, Y, np)

Arguments

A

[n x n] adjacency matrix or general relational weight matrix of which A_ij indicates relationship from i to j.

Y

a vector of n continuous or binary, one-dimensional observations.

np

the number of permutation samples.

Value

phi

a standardized Φ statistic.

pval.z

p-value of a standardized Φ statistic assuming asymptotic normality.

pval.permute

p-value of a standardized Φ statistic using np independent permutation samples.

Author(s)

Youjin Lee

Examples

1
2
3
4
5
6
7
library(netdep)
library(igraph)
library(igraphdata)
data(UKfaculty)
A = as.matrix(get.adjacency(UKfaculty, attr= "weight", sparse = TRUE)) # weighted adjacency matrix
Y = V(UKfaculty)$Group
result = make.permute.Phi(A, Y, np = 50)

netdep documentation built on May 2, 2019, 5:52 a.m.