StatBiomed / SpatialDM

Spatial direct messaging detected by bivariate Moran
https://spatialdm.readthedocs.io
Apache License 2.0
24 stars 5 forks source link

Question about global permutation test #31

Open sealx017 opened 3 months ago

sealx017 commented 3 months ago

Hello, I noticed that the package compares the actual global I with the permuted global I's to compute the permutation p-value:

    adata.uns['global_stat']['perm']['global_p'] = 1 - (adata.uns['global_I'] \
                         > adata.uns['global_stat']['perm']['global_perm'].T).sum(axis=0) / n_perm

My question is why do you compare only one direction (">"), i.e., greater than the mean under NULL? Global I can be negative, i.e., less than the mean under NULL indicating negative spatial association.

Please let me know if I misunderstood the package and the paper!