Roger thanks for your response.

Also I am trying to plot my variable vs "spatial lag" ("moran.plot()") but
I have some problems of memory.

My data has 1 113 277 observations and R has not plotted the figure yet
(since a couple of hours I ran the command line), do you think there is an
error or it is possible to take all this time?

Again, thanks in advance.

On Fri, Oct 12, 2012 at 8:43 AM, Roger Bivand <Roger.Bivand@nhh.no> wrote:

> On Fri, 12 Oct 2012, Jaime Burbano Girón wrote:
>
>  Dear members of list,
>>
>> I calculated a local moran index ("localmoran()") for my data (which come
>> from a raster grid) with a queen spatial neighbor structure for construct
>> the weights matrix.
>>
>> I would like to plot in a map the value of local moran index for each
>> zone,
>> however, I am not sure how to extract spatial information for each one of
>> the values obtained of local moran index.
>>
>> My question is: if I am well in assume that the result of localmoran()
>> function is in the same order that neighbor list, thus, I can assign
>> coordinates of neighbors to each row of result matrix? something like:
>>
>> #Calculating neighbors
>> kneig=knearneigh(cbind(data$x,**data$y),k=8)
>> neig=knn2nb(neig)
>>
>> #Calculating weights for neighbors
>> neiglist=nb2listw(neig,style="**W")
>>
>> #Spatial autocorrelation
>> lmt=localmoran(data$z,**neiglist)
>>
>> #Data for plot local moran index
>> data_map=cbind(lmt,data$x,**data$y)
>>
>
> Yes, in principle. It is possible to specify the region.id component in
> the nb object, and check this against the IDs of data (or data$z) for
> safety's sake, but here you should be OK. Note the structure of lmt.
>
> Roger
>
>
>> Thanks in advance and best regards to all.
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________**_________________
>> R-sig-Geo mailing list
>> R-sig-Geo@r-project.org
>> https://stat.ethz.ch/mailman/**listinfo/r-sig-geo<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
>>
>>
> --
> Roger Bivand
> Department of Economics, NHH Norwegian School of Economics,
> Helleveien 30, N-5045 Bergen, Norway.
> voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand@nhh.no
>



-- 
Jaime Burbano Girón
Maestría en Ciencias Biológicas - Ecología
Universidad Nacional de Colombia
Bogotá - Colombia
(57) 3168573713

	[[alternative HTML version deleted]]

