[R-sig-Geo] Correlograms of Moran's I with progressive Bonferroni correction

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Mon Mar 18 09:41:22 CET 2019


On Sun, 17 Mar 2019, Mingke Li wrote:

> Dear list,
>
> I am trying to generate a correlogram of Moran's I, with symbols showing if
> the coefficient is significant or not after the progressive Bonferroni
> correction. Now I'm using the "correlog" function in the package ncf to
> calculate the coefficients among all distance classes. I symbolized the
> dots in the plot to show if they are significant or not (after progressive
> Bonferroni correction), say, open circles for non-significant coefficients,
> and solid circles for significant coefficients.

Explain what you mean here by progressive Bonferroni correction, please. 
Could you rather see what is done in the mpmcorrelogram package, and 
report back if it makes sense?

Roger

>
> These are the codes I used in R:
>
>> correlog.L2.2014new <- correlog(Grid.2014.all$Lng, Grid.2014.all$Lat,
> Grid.2014.all$L2_Average,latlon = T, na.rm=T, increment=5, resamp=200)
>> for (i in list(1:length(correlog.L2.2014new$p))) {
>  correlog.L2.2014new$adjp[i]=correlog.L2.2014new$p[i]*i
> }
>> plot(correlog.L2.2014new$correlation[1:80], type="b", cex=1.5, lwd=1.5,
> ylim=c(-0.1,0.7),
>     pch=ifelse(((correlog.L2.2014new$adjp>0.05)),1,16),
>     xlab="Distance (km)", ylab="Moran's I", cex.lab=2, cex.axis=1.5);
> abline(h=0)
>
> I also found the function "sp.correlogram" in the package spdep to make the
> correlogram with Bonferroni correction.
>
> Now I have three questions:
>
> 1. Can I set a "up-limit" to the "correlog" function? For example, if I
> just need the first 80 distance classes to generate the graph (as shown in
> the plot code), is it possible to let the "correlog" function skip the rest
> distance classes to save the computation time?
>
> 2. Is my code of generating p values after the progressive Bonferroni
> correction correct? If not, how should I fix it?
>
> 3. Now I'm kind of correcting the p value manually based on my
> understanding of progressive Bonferroni correction. Is there any function
> in any R packages for creating correlograms with progressive Bonferroni
> correction? "sp.correlogram"  has a parameter setting "p.adj.method" but it
> seems do not have a progressive Bonferroni correction option?
>
> I just start to work with the correlograms recently; any advice or
> solutions are welcome. Thank you in advance!
>
> Erin
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list