Learn R Programming

netdep (version 0.1.0)

make.permute.Phi: Permutation Test of \(\Phi\)

Description

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

Usage

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 \(\Phi\) statistic.

pval.z

p-value of a standardized \(\Phi\) statistic assuming asymptotic normality.

pval.permute

p-value of a standardized \(\Phi\) statistic using np independent permutation samples.

Examples

Run this code
# NOT RUN {
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)


# }

Run the code above in your browser using DataLab