This is an auxiliary function to calculate non-standardized \(\Phi\) statistic and its first and second moment.
phi.moment(A, Y)[n x n] adjacency matrix or general relational weight matrix of which \(A_ij\) indicates relationship from \(i\) to \(j\).
a vector of \(n\) nominal or binary, one-dimensional observations.
rawphiNon-standardized \(\Phi\) statistic.
m1.rawphithe first (permutation) moment of rawphi.
m2.rawphithe second (permutation) moment of rawphi.