[R-sig-Geo] inverse distance weights matrix

Roger Bivand Roger.Bivand at nhh.no
Fri Mar 17 20:42:44 CET 2006


On Thu, 16 Mar 2006, Griffin, Terry W wrote:

> Greetings,
> 
>  
> 
> I'm migrating from MATLAB to R and am having trouble converting inverse
> distance weights matrix into a form usable by R.  I've created the
> matrix in SpaceStat (in *.FMT format) and converted to *.GWT format and
> also have it in MATLAB *.m format.
> 

I wonder whether your Matlab data are in the Spatial Econometrics Toolbox 
format - if they are, you could try the read.dat2listw() function 
mentioned on the read.gwt2nb function help page.
>  
> 
> I've tried using the read.gwt2nb in R, but without success.  There are
> nearly 2,451 observations with an average of 482 linkages.  About 20 %
> have nonzero weights.  Any suggestions are appreciated.

Without details of what you mean by "without success", it's hard to offer 
any advice. Could you create a small example of the problems you are 
seeing, and repost with copies of the commands you give and any error 
messages? 

If you are seeing errors ("Error in ..." messages from R), please also
type traceback() at the prompt and report the output. You could also put
the uncooperative GWT file on a website for others to try to see what is
going on.

> 
>  
> 
> Thank you,
> 
> Terry
> 
>  
> 
>  
> 
> Terry W. Griffin
> 
> Graduate Research Assistant
> 
> Agricultural Economics
> 
> Purdue University
> 
> 403 W State St
> 
> West Lafayette, IN 47907
> 
> 765-494-4257
> 
> http://web.ics.purdue.edu/~twgriffi/
> <http://web.ics.purdue.edu/~twgriffi/> 
> 
>  
> 
>  
> 
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 

-- 
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 R-sig-Geo mailing list