make.permute.moran: Permutation Test of Moran's I

Description Usage Arguments Value Author(s) Examples

View source: R/nettest.R

Description

Permutation Test of Moran's I

Usage

1
make.permute.moran(A, Y, np = 100)

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

moran

a standardized Moran's I statistic.

pval.z

p-value of a standardized Moran's I statistic assuming asymptotic normality.

pval.permute

p-value of a standardized Moran's I 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(karate)
A = as.matrix(get.adjacency(karate, attr= "weight", sparse = TRUE)) # weighted adjacency matrix
Y = V(karate)$Faction
result = make.permute.moran(A, Y, np = 100)

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