I think the last e-mail was not ideally configured for the list, so I'm re-sending it. Sorry if it duplicates. Hi listers, I'm in the final sprint at my thesis in poverty and I would like to try to find clusters, like LISA's clusters, for vulnerability to poverty. However, my data is categorical, 3 categories, and LISA suits better in continuous data. I have been searching about any software or script which executes the join-count test for 3 categories at individual level. In other words, a LISA ,or LICD as Boots named it in the paper Developing Local Measures of Spatial Association for Categorical Data. All I have found so far is the Join-Count statistic for the whole data. Does anyone know if something has already been done at this area? PS: sorry for the grammar errors. Guilherme
Local indicators for categorical data - spatial analysis
3 messages · Guilherme Ottoni, JLong, Roger Bivand
Hi Guilherme, Send me an email to jed.long at st-andrews.ac.uk I think I have some software/code that Barry Boots developed way back then somewhere on my machine... Cheers, Jed ----- Jed Long Lecturer in GeoInformatics Department of Geography & Sustainable Development University of St Andrews, UK -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Local-indicators-for-categorical-data-spatial-analysis-tp7587775p7587776.html Sent from the R-sig-geo mailing list archive at Nabble.com.
On Wed, 11 Feb 2015, JLong wrote:
Hi Guilherme, Send me an email to jed.long at st-andrews.ac.uk I think I have some software/code that Barry Boots developed way back then somewhere on my machine...
LICD are not implemented, but you can get part of the way (just the
tabulations) by:
library(spdep)
data(oldcol)
HICRIME <- cut(COL.OLD$CRIME, breaks=c(0,35,80), labels=c("low","high"))
names(HICRIME) <- rownames(COL.OLD)
lw <- nb2listw(COL.nb, style="B")
joincount.multi(HICRIME, lw)
for a global baseline, and
Vis <- lapply(1:length(HICRIME), function(i) listw2star(lw, i, "B",
n=length(HICRIME), D=NULL, a=NULL))
ljcs <- t(sapply(Vis, function(x) { res <- joincount.multi(HICRIME, x,
zero.policy=TRUE); res[-nrow(res),1]}))
There are warnings because inference fails (as it should), but the tally
is the same, with:
apply(ljcs, 2, sum)/2
giving the counts of joins by type, dropping double-counting in the
summation. listw2star() is used in localmoran.sad() and elsewhere to
generate observation-wise weights objects. This isn't an implementation of
LICD in that the subregion for each i is simply its set of neighbours, not
a moving window, but at least provides a basis for classification.
As with other LISA, it is important to remove the effects of covariates,
so that an inferential approach might be based on GLM residuals (just a
speculation).
Hope this helps,
Roger
Cheers, Jed ----- Jed Long Lecturer in GeoInformatics Department of Geography & Sustainable Development University of St Andrews, UK -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Local-indicators-for-categorical-data-spatial-analysis-tp7587775p7587776.html Sent from the R-sig-geo mailing list archive at Nabble.com.
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at 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; fax +47 55 95 91 00 e-mail: Roger.Bivand at nhh.no