Make an adjustment to local association measures' p-values based on the number of neighbours (+1) of each region, rather than the total number of regions.

1 | ```
p.adjustSP(p, nb, method = "none")
``` |

`p` |
vector of p-values |

`nb` |
a list of neighbours of class |

`method` |
correction method as defined in |

A vector of corrected p-values using only the number of neighbours + 1.

Danlin Yu and Roger Bivand Roger.Bivand@nhh.no

1 2 3 4 5 6 7 8 9 | ```
data(afcon)
oid <- order(afcon$id)
resG <- as.vector(localG(afcon$totcon, nb2listw(include.self(paper.nb))))
non <- format.pval(pnorm(2*(abs(resG)), lower.tail=FALSE), 2)
bon <- format.pval(p.adjustSP(pnorm(2*(abs(resG)), lower.tail=FALSE),
paper.nb, "bonferroni"), 2)
tot <- format.pval(p.adjust(pnorm(2*(abs(resG)), lower.tail=FALSE),
"bonferroni", n=length(resG)), 2)
data.frame(resG, non, bon, tot, row.names=afcon$name)[oid,]
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.