I have an adjacency matrix and another which represents whether the two nodes share an attribute. Consider it like an homophily test. We want to test if the likelihood to form a connect depends on the fact that the two nodes have an attribute in common. Now, using R and SNA package, I run a correlation and test is significance through a QAP test:
g <- array(dim=c(2,nrow(x),nrow(x))) g[1,,] <- x g[2,,] <- y q.12 <- qaptest(g, gcor, reps = 2000, g1=1, g2=2, diag=FALSE)
The correlation is 0.7479487, and the p-value is 0
QAP Test Results Estimated p-values: p(f(perm) >= f(d)): 0 p(f(perm) <= f(d)): 1
Then I fit a logit to that data
nl <- netlogit(y, x, mode="digraph", diag=FALSE, nullhyp="qap", reps=2000)
but its coefficient is not significant. How is that possible?
Network Logit Model Coefficients: Estimate Exp(b) Pr(<=b) Pr(>=b) Pr(>=|b|) (intercept) -2.940634 5.283224e-02 0.000 1.000 0.00 x1 21.506702 2.188981e+09 0.519 0.481 0.97 Goodness of Fit Statistics: Null deviance: 17234.41 on 12432 degrees of freedom Residual deviance: 4617.118 on 12430 degrees of freedom Chi-Squared test of fit improvement: 12617.29 on 2 degrees of freedom, p-value 0 AIC: 4621.118 BIC: 4635.974 Pseudo-R^2 Measures: (Dn-Dr)/(Dn-Dr+dfn): 0.5036986 (Dn-Dr)/Dn: 0.7320989