Skip to content
Prev 853 / 29559 Next

inverse distance weights matrix

Thank you Roger,

I've posted the original shape file for the dataset on the website at:
http://web.ics.purdue.edu/~twgriffi/R_matrix.htm

One shape file is projected while the other is not; however both sets of
*.dbf are identical and contain both decimal degrees and Northing and
Easting in meters.  

I chose a <=75 meter distance threshold and a power=1.  

The final inverse distance matrix was row standardized so it is not
symmetric. The weight characteristics you list below are nearly
identical to those that SpaceStat provides.  

I really appreciate this.  Thank you,

Terry



-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no] 
Sent: Friday, March 17, 2006 5:50 PM
To: Griffin, Terry W
Cc: r-sig-geo at stat.math.ethz.ch
Subject: RE: [R-sig-Geo] inverse distance weights matrix

Terry:

http://web.ics.purdue.edu/~twgriffi/mat4rf

and 

http://web.ics.purdue.edu/~twgriffi/mat4rs

throw access errors.

Do you have the coordinates and your specifications for the inverse 
weighted neighbours (distance threshold, power if any)? 

inMAT <- matrix(scan("cottonID75wm", sep=","), nrow=2451, ncol=2451, 
  byrow=TRUE)

does read the matrix - the weights aren't symmetric, are they?
inMATlw <- mat2listw(inMAT)

print(is.symmetric.nb(inMATlw$neighbours))
[1] TRUE

print(inMATlw$neighbours)
Neighbour list object:
Number of regions: 2451 
Number of nonzero links: 1182982 
Percentage nonzero weights: 19.69208 
Average number of links: 482.6528 

If you could post the coordinates and your specifications, I could see
how 
to reproduce the weights within R if you like.

Roger
On Fri, 17 Mar 2006, Griffin, Terry W wrote:

            
small
(realizing
I
code
two
are
%
put
is