search for: mat2listw

Displaying 9 results from an estimated 9 matches for "mat2listw".

2013 Nov 29
1
mat2listw function
Hi all, I am attempting to create a weights object and perform a Moran I test as well. I have a very large spatial weights matrix (roughly 22,000x22,000) that was created in Excel and read into R, and I'm now trying to implement: library(spdep) SW=mat2listw(matrix) I am getting the following error: Error in if (any(x<0)) stop ("values in x cannot be negative"): missing value where TRUE/FALSE needed. What's going wrong here? My current matrix is all 0's and 1's, with no missing values and no negative elements. What am I missi...
2013 Nov 27
0
trouble using mat2listw function to create spatial weights object
Hi all, I am attempting to create a weights object and perform a Moran I test as well. I have a very large spatial weights matrix (roughly 22,000x22,000) that was created in Excel and read into R, and I'm now trying to implement: library(spdep) SW=mat2listw(matrix) I am getting the following error: Error in if (any(x<0)) stop ("values in x cannot be negative"): missing value where TRUE/FALSE needed. What's going wrong here? My current matrix is all 0's and 1's, with no missing values and no negative elements. What am I missi...
2007 Oct 15
1
Distance matrix in SpDep-package
Hello everybody, I would like to use the SpDep-package (especially the Local Moran index analysis and the Getis-Ord statistics) in R for analysing my data. However, I don't have x-y coordinates, but my data is in a distance matrix format. Is it possible to use the SpDep package with predefined distances as well instead of letting the program determining the distance itself by the function
2009 Jan 07
1
troubles performing Moran.I test
dear R users, I have troubles performing Moran.I test as suggested on http://www.ats.ucla.edu/stat/r/faq/morans_i.htm my spatial data are longitude and lattitide of communities. The calculation of the inverse distance matrix according to the homepage (using my data) datAL <- read.csv2("C:\\Konvergenz AL.csv", header=T) ALdist <- as.matrix(dist(cbind(datAL$L?nge,
2004 Aug 19
3
Do you know if you can map a large minimum spanning tree in R?
Thanks Mike. My data has longitude and latitude coords and I used distAB {clim.pact} then mst {ape} to calculate my minimum spanning tree. The nodes are telecoms sites from all over Australia. My goal is to determine the minimum cost of linking them via cabling, and I'm starting by calculating the distance "as the crow flies", but will probably eventually need to calculate the
2003 Dec 09
0
The spdep package
...0 0 1 0 1 0 0 [5,] 0 1 0 1 0 1 0 1 0 [6,] 0 0 1 0 1 0 0 0 1 [7,] 0 0 0 1 0 0 0 1 0 [8,] 0 0 0 0 1 0 1 0 1 [9,] 0 0 0 0 0 1 0 1 0 > z=mat2listw(W);z Characteristics of weights list object: Neighbour list object: Number of regions: 9 Number of nonzero links: 24 Percentage nonzero weights: 29.62963 Average number of links: 2.666667 Weights style: M Weights constants summary: n n1 n2 n3 nn S0 S1 S2 M 9 8 7 6 81 24 48 272
2007 Dec 14
0
kernel density in space
Hello everybody, I would like to determine kernel densities along a maze. I have distances from each point of the maze to its neighbours and I managed by means of the mat2listw-function in the Spdep package to assign neighbours to each point. Each point now has a value for a Z-variable and it is this variable that I would like to use to determine a density for each point with neighbours at 200m along each side. (I hope this makes some sense.) Does anyone have an idea...
2007 Dec 21
1
matrix to gal object
useR's I need transform the matrix wdat [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0 1 1 0 [2,] 1 0 0 1 1 0 [3,] 0 0 0 0 1 1 [4,] 1 1 0 0 1 0 [5,] 1 1 1 1 0 0 [6,] 0 0 1 0 0 0 to gal object. How I do with spdep? Thanks in advance for the help. Bernardo. University of Concepci?.
2009 Feb 08
1
Help on computing Geary's C statistic to test for Spatial Autocorrelation
Dear Users: I have been trying to use the geary.test() function in *R*, but am having slight difficulty understanding how I am to apply it in my context. I have 2 matrices: 1) *n x p* matrix of *n* observations with *p* measurements each. It may be noted that this matrix has a spatial dimension to it, as the *n*observations are at different geographical locations on a map. 2) *n x n* spatial