Posted  by  admin

Raster Local Moran P Value

Raster Local Moran P Value Rating: 6,0/10 2927 votes
  1. Test For Spatial Autocorrelation

I am doing a multiple linear regression of factors related to poverty and would like to include some spatial-statistical data. I have come up with Anselin Local Moran's I values (cluster/outlier) data for census tracts in a metropolitan area, which I would like to include in the regression.However, the Anselin Local Moran's I values are indexed with either positive or negative values.

A positive value for I indicates that a feature has neighboring features with similarly high or low attribute values; this feature is part of a cluster. A negative value for I indicates that a feature has neighboring features with dissimilar values; this feature is an outlier. These values are, however, only considered significant if indicated so by their corresponding z or p scores.Is it possible to use a negative/positive index like this as an independent variable in a regression?If so, how could this problem be approached considering only some of the observations (Moran's I values for census tracts) are considered significant?More details about Anselin Local Moran's I can be found here.

Dear members of list,I calculated a local moran index ('localmoran') for my data (which comefrom a raster grid) with a queen spatial neighbor structure for constructthe 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 ofthe values obtained of local moran index.My question is: if I am well in assume that the result of localmoranfunction is in the same order that neighbor list, thus, I can assigncoordinates of neighbors to each row of result matrix? Something like:#Calculating neighborskneig=knearneigh(cbind(data$x,data$y),k=8)neig=knn2nb(neig)#Calculating weights for neighborsneiglist=nb2listw(neig,style='W')#Spatial autocorrelationlmt=localmoran(data$z,neiglist)#Data for plot local moran indexdatamap=cbind(lmt,data$x,data$y)Thanks in advance and best regards to all. Dear members of list,I calculated a local moran index ('localmoran') for my data (which comefrom a raster grid) with a queen spatial neighbor structure for constructthe 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 ofthe values obtained of local moran index.My question is: if I am well in assume that the result of localmoranfunction is in the same order that neighbor list, thus, I can assigncoordinates of neighbors to each row of result matrix? Something like:#Calculating neighborskneig=knearneigh(cbind(data$x,data$y),k=8)neig=knn2nb(neig)#Calculating weights for neighborsneiglist=nb2listw(neig,style='W')#Spatial autocorrelationlmt=localmoran(data$z,neiglist)#Data for plot local moran indexdatamap=cbind(lmt,data$x,data$y)Thanks in advance and best regards to all.

I calculated a local moran index ('localmoran') for my data (which comefrom a raster grid) with a queen spatial neighbor structure for constructthe weights matrix.I would like to plot in a map the value of local moran index for eachzone,however, I am not sure how to extract spatial information for each one ofthe values obtained of local moran index.My question is: if I am well in assume that the result of localmoranfunction is in the same order that neighbor list, thus, I can assigncoordinates of neighbors to each row of result matrix? Something like:#Calculating neighborskneig=knearneigh(cbind(data$x,.data$y),k=8)neig=knn2nb(neig)#Calculating weights for neighborsneiglist=nb2listw(neig,style='.W')#Spatial autocorrelationlmt=localmoran(data$z,.neiglist)#Data for plot local moran indexdatamap=cbind(lmt,data$x,.data$y)Yes, in principle. It is possible to specify the region.id component inthe nb object, and check this against the IDs of data (or data$z) forsafety's sake, but here you should be OK. Note the structure of lmt.Roger. Roger Bivand Yes, a scatterplot of 1M points will alway take a very long time to plot, and will almost certainly not be legible, the points will overplot one another.

If you need to visualise a high N scatterplot, see the hexbin package - that is, simply lag the variable and plot the variable by its lag using hexbin. However, I'm also certain that localmoran and a Moran scatterplot will be meaningless unless you have demeaned the data first. You need to model the data carefully, and then see whether any. On Fri, 12 Oct 2012, Jaime Burbano Gir?n wrote:Roger thanks for your response.Also I am trying to plot my variable vs 'spatial lag' ('moran.plot') butI 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 anerror or it is possible to take all this time?Yes, a scatterplot of 1M points will alway take a very long time to plot,and will almost certainly not be legible, the points will overplot oneanother.

If you need to visualise a high N scatterplot, see the hexbinpackage - that is, simply lag the variable and plot the variable by itslag using hexbin. However, I'm also certain that localmoran and a Moranscatterplot will be meaningless unless you have demeaned the data first.You need to model the data carefully, and then see whether any residualspatial patterning remains.

There must be lots of relevant covariates thatyou are omitting.In addition, moran.plot takes care to provide influence measures for thelinear relationship between the variable and its lag, pointing up outliersthat will also show up in the localmoran output. This necessarily takestime, but is also used in the plot - and will be illegible in your case.We don't know your system resources, you didn't provide the output ofsessionInfo; the slowness may also be caused by using virtual memory.Roger. I calculated a local moran index ('localmoran') for my data (which comefrom a raster grid) with a queen spatial neighbor structure for constructthe weights matrix.I would like to plot in a map the value of local moran index for eachzone,however, I am not sure how to extract spatial information for each one ofthe values obtained of local moran index.My question is: if I am well in assume that the result of localmoranfunction is in the same order that neighbor list, thus, I can assigncoordinates of neighbors to each row of result matrix? Something like:#Calculating neighborskneig=knearneigh(cbind(data$x,.data$y),k=8)neig=knn2nb(neig)#Calculating weights for neighborsneiglist=nb2listw(neig,style='.W')#Spatial autocorrelationlmt=localmoran(data$z,.neiglist)#Data for plot local moran indexdatamap=cbind(lmt,data$x,.data$y)Yes, in principle. It is possible to specify the region.id component inthe nb object, and check this against the IDs of data (or data$z) forsafety's sake, but here you should be OK.

Values

Note the structure of lmt.Roger. Thanks in advance and best regards to all.alternative HTML version deleted.R-sig-Geo mailing listR-sig-Geo at r-project.org-Roger BivandDepartment of Economics, NHH Norwegian School of Economics,Helleveien 30, N-5045 Bergen, Norway.voice: +47 55 95 93 55; fax +47 55 95 95 43e-mail: Roger.Bivand at nhh.no-Roger BivandDepartment of Economics, NHH Norwegian School of Economics,Helleveien 30, N-5045 Bergen, Norway.voice: +47 55 95 93 55; fax +47 55 95 95 43e-mail: Roger.Bivand at nhh.no. Roger, again thanks.Evidently, how you say, a cloud point was plotted, I will try with hexbinpackage or the reduction of my data. However, I have two more questionstaking advantage of your cordiality and expertise, hope I do not abuse ofyour generosity.I am also concerned about my model due to my spatial data type (rastergrid), since until now I just had worked with geostatistics and latticesusing information from municipalities (polygons). I want to perform a modelfor explain Net Primary Production as a function of Land Cover (4categories) and 3 Climatic variables. My idea is to include an additionalcovariate for explaining spatial structure.I have opted for include an eigenvector filtering function in concordancewith the proposal of Dray S, Legendre P and Peres-Neto PR (2006), but I amnot sure if this is the right option since also exists the semi-parametricspatial filtering approach from Tiefelsdorf M and Griffith DA.

Monte-carlo

(2007), orsomething simpler like take the residuals of the regression between thestudy variable and geographical coordinates.In the case in which including each of theme in the model, the assumptionsof: independence, homoscedasticity and normality of residuals could betested favorably, which of these could you recommend me to include?Finally, I have always experimented memory problems with r in time andcapacity storage of virtual memory. The speed of processes have beenrecently managed by parallelizing its execution, however, I'm not sure ifthe allocation of big objects can be fixed just giving to the virtualmemory a larger capacity than my RAM memory. I have a Intel Core i7-2670QMprocesor of 2.2GHz with 8gb of RAM.

It is OK if I set in R the memory limitto 10gb or a larger value?Roger, thanks in advance and my best regards. Also I am trying to plot my variable vs 'spatial lag' ('moran.plot') butI 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 anerror or it is possible to take all this time?Yes, a scatterplot of 1M points will alway take a very long time to plot,and will almost certainly not be legible, the points will overplot oneanother.

If you need to visualise a high N scatterplot, see the hexbinpackage - that is, simply lag the variable and plot the variable by its lagusing hexbin. However, I'm also certain that localmoran and a Moranscatterplot will be meaningless unless you have demeaned the data first.You need to model the data carefully, and then see whether any residualspatial patterning remains. There must be lots of relevant covariates thatyou are omitting.In addition, moran.plot takes care to provide influence measures for thelinear relationship between the variable and its lag, pointing up outliersthat will also show up in the localmoran output. Love was never mine kunal bhardwaj epub download.

This necessarily takestime, but is also used in the plot - and will be illegible in your case.We don't know your system resources, you didn't provide the output ofsessionInfo; the slowness may also be caused by using virtual memory.Roger. I calculated a local moran index ('localmoran') for my data (whichcomefrom a raster grid) with a queen spatial neighbor structure forconstructthe weights matrix.I would like to plot in a map the value of local moran index for eachzone,however, I am not sure how to extract spatial information for each oneofthe values obtained of local moran index.My question is: if I am well in assume that the result of localmoranfunction is in the same order that neighbor list, thus, I can assigncoordinates of neighbors to each row of result matrix? Something like:#Calculating neighborskneig=knearneigh(cbind(data$x,.data$y),k=8)neig=knn2nb(neig)#Calculating weights for neighborsneiglist=nb2listw(neig,style='.W')#Spatial autocorrelationlmt=localmoran(data$z,.neiglist)#Data for plot local moran indexdatamap=cbind(lmt,data$x,.data$y)Yes, in principle. It is possible to specify the region.id component inthe nb object, and check this against the IDs of data (or data$z) forsafety's sake, but here you should be OK. Note the structure of lmt.RogerThanks in advance and best regards to all. Roger Bivand I think that you will face major difficulties in getting the eigenvectors of your (doubly centred) weights matrix.

In addition, because the raster cells are very likely not well fitted to the underlying ecological units of NPP (which could be of all kinds of scales), you may run straight into the red herring controversy (is the observed spatial patterning scale or autocorrelation?). There are analytical ways of getting eigenvectors in the literature, but with your data size, you'll face major. On Sat, 13 Oct 2012, Jaime Burbano Gir?n wrote:Roger, again thanks.Evidently, how you say, a cloud point was plotted, I will try with hexbinpackage or the reduction of my data. However, I have two more questionstaking advantage of your cordiality and expertise, hope I do not abuse ofyour generosity.I am also concerned about my model due to my spatial data type (rastergrid), since until now I just had worked with geostatistics and latticesusing information from municipalities (polygons). I want to perform a modelfor explain Net Primary Production as a function of Land Cover (4categories) and 3 Climatic variables.

Test For Spatial Autocorrelation

Raster Local Moran P Value

My idea is to include an additionalcovariate for explaining spatial structure.I have opted for include an eigenvector filtering function in concordancewith the proposal of Dray S, Legendre P and Peres-Neto PR (2006), but I amnot sure if this is the right option since also exists the semi-parametricspatial filtering approach from Tiefelsdorf M and Griffith DA. (2007), orsomething simpler like take the residuals of the regression between thestudy variable and geographical coordinates.I think that you will face major difficulties in getting the eigenvectorsof your (doubly centred) weights matrix. In addition, because the rastercells are very likely not well fitted to the underlying ecological unitsof NPP (which could be of all kinds of scales), you may run straight intothe red herring controversy (is the observed spatial patterning scale orautocorrelation?). There are analytical ways of getting eigenvectors inthe literature, but with your data size, you'll face major problemsanyway.

The issues are discussed in the Numerical Ecology with R book andpartly in a forthcoming paper (possibly Dray et al.) in EcologicalMonographs, but not really for large data sets.Hope this helps,Roger. In the case in which including each of theme in the model, the assumptionsof: independence, homoscedasticity and normality of residuals could betested favorably, which of these could you recommend me to include?Finally, I have always experimented memory problems with r in time andcapacity storage of virtual memory. The speed of processes have beenrecently managed by parallelizing its execution, however, I'm not sure ifthe allocation of big objects can be fixed just giving to the virtualmemory a larger capacity than my RAM memory.

I have a Intel Core i7-2670QMprocesor of 2.2GHz with 8gb of RAM. It is OK if I set in R the memory limitto 10gb or a larger value?Roger, thanks in advance and my best regards. Also I am trying to plot my variable vs 'spatial lag' ('moran.plot') butI 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 anerror or it is possible to take all this time?Yes, a scatterplot of 1M points will alway take a very long time to plot,and will almost certainly not be legible, the points will overplot oneanother. If you need to visualise a high N scatterplot, see the hexbinpackage - that is, simply lag the variable and plot the variable by its lagusing hexbin. However, I'm also certain that localmoran and a Moranscatterplot will be meaningless unless you have demeaned the data first.You need to model the data carefully, and then see whether any residualspatial patterning remains. There must be lots of relevant covariates thatyou are omitting.In addition, moran.plot takes care to provide influence measures for thelinear relationship between the variable and its lag, pointing up outliersthat will also show up in the localmoran output.

This necessarily takestime, but is also used in the plot - and will be illegible in your case.We don't know your system resources, you didn't provide the output ofsessionInfo; the slowness may also be caused by using virtual memory.Roger. I calculated a local moran index ('localmoran') for my data (whichcomefrom a raster grid) with a queen spatial neighbor structure forconstructthe weights matrix.I would like to plot in a map the value of local moran index for eachzone,however, I am not sure how to extract spatial information for each oneofthe values obtained of local moran index.My question is: if I am well in assume that the result of localmoranfunction is in the same order that neighbor list, thus, I can assigncoordinates of neighbors to each row of result matrix? Something like:#Calculating neighborskneig=knearneigh(cbind(data$x,.data$y),k=8)neig=knn2nb(neig)#Calculating weights for neighborsneiglist=nb2listw(neig,style='.W')#Spatial autocorrelationlmt=localmoran(data$z,.neiglist)#Data for plot local moran indexdatamap=cbind(lmt,data$x,.data$y)Yes, in principle. It is possible to specify the region.id component inthe nb object, and check this against the IDs of data (or data$z) forsafety's sake, but here you should be OK. Note the structure of lmt.RogerThanks in advance and best regards to all. Roger BivandDepartment of Economics, NHH Norwegian School of Economics,Helleveien 30, N-5045 Bergen, Norway.voice: +47 55 95 93 55; fax +47 55 95 95 43e-mail: Roger.Bivand at nhh.no-Roger BivandDepartment of Economics, NHH Norwegian School of Economics,Helleveien 30, N-5045 Bergen, Norway.voice: +47 55 95 93 55; fax +47 55 95 95 43e-mail: Roger.Bivand at nhh.no-Roger BivandDepartment of Economics, NHH Norwegian School of Economics,Helleveien 30, N-5045 Bergen, Norway.voice: +47 55 95 93 55; fax +47 55 95 95 43e-mail: Roger.Bivand at nhh.no.