[GRASS5] r.moran

Roger Bivand Roger.Bivand at nhh.no
Wed Mar 22 03:25:29 EST 2006


On Wed, 22 Mar 2006, Wolf Bergenheim wrote:

> On Wed, 22 Mar 2006, Hamish wrote:
> 
> >> What happened to r.moran? I'd need to calculate Moran's I for a
> >> rastermap, but I'm unable to find r.moran in GRASS 6.1. If it has
> >> dropped off due to lack of a maintainer, please let me know, and I
> >> will gladly update it from GRASS 5.4. Is there perhaps another way to
> >> to calculate Moran's I?
> >
> > It's not in 5.4, just the man page is.
> >
> > It's not the GRASS 5 CVS either, you have to look in the GRASS 4.3
> > source code to find it:
> >  http://grass.ibiblio.org/grass43/source/
> 
> Thanks. I'll have to see. It seem that I actually need to do this for 
> vector areas. so I guess I could make v.autocorrelate that would support 
> Moran's I and perhaps later Geary's C and other methods. I noticed that 
> v.autocorr used to exist in grass 5 (or is this again only the manual 
> page?). Anyway, I'll have a look and see if it is of any use. I know that 
> the vector engine has changed since then, and much of the code is probably 
> useless, but the algorithms might be of use... anyway I need it to support 
> a selected attribute field.
> 
> > This means you'll need to add NULL support (instead of 0 as null).
> 
> Sure.
> 
> >
> > Maybe easier to use the GRASS/R interface and perform the operation in R?
> >  http://biomserv.univ-lyon1.fr/library/spdep/html/moran.test.html
> >  http://grass.ibiblio.org/statsgrass/index.php#grassR
> >
> 
> You might be right. But I guess it wouldn't work for vectors?

No, vectors are fully supported - in fact a raster would be treated as
cell centre points. See the range of functions for building lists of
neighbours in the R spdep package. Are your vectors points or polygons?  
What criteria for neighbours do you need? We can continue thread this on
the STATGRASS list if you like.

Roger

> 
> >
> > I think we could use a new wiki page listing all older modules not
> > ported; not just the 5.4->6.0 list. e.g. r.fuzzy, d.viewproj, r.casc2d,
> > etc.? May save someone some trouble. This probably has to be done by
> > hand. :/
> 
> Yes that would be most helpful. Also it could state the reason for the 
> drop, like that some other module can handle this too, or blank for unknown?
> 
> --Wolf
> 
> 

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no




More information about the grass-dev mailing list