similar to: RE: question about spatial correlation with Xs and Ys

Displaying 20 results from an estimated 300 matches similar to: "RE: question about spatial correlation with Xs and Ys"

2003 Jun 30
2
spatial correlation test
hello, I want to do a test for spatial correlation. I tried it with geary.test() but I don't understand the required input. x= a numeric vector the same length as the neighbours list in listw (my sampled data, I assume) listw= a listw object created for example by nb2listw (well when I check nb2listw() I get to "neighbours - an object of class nb" - but I couldn't figure
2012 Jul 12
0
How to handle NA-values in raster-based Geary´s C test?
Hi, I have a question on testing spatial autocorrelation on raster data including NA-values. In particular, I like to calculate Moran?s I and Geary?s C indices by using inverse distance weighting matrices. Calculating Moran?s I with moran.test works fine, because the function contains the option "na.action=na.pass". Unfortunately, the function geary.test does not contain this
2003 Nov 16
3
an object of class lm returned by lm?
Can someone tell me what an object of class lm returned by lm means? I assumed it mean the regression model - but I'm not sure how to enter this in. I have tried y~a+b but this is not working. I have also tried saving the regression results and entering these, but again this is incorrect. This language is from the following: lm.LMtests(model, listw, zero.policy=FALSE,
2009 Jun 06
1
large numbers of observations using ME() of spdep
Dear All, We aim to remove the spatial structure of our data using Moran Eigen Vectors and spdep package . Our data has 3694 samples and 13 variables. The computer stop working after almost 4 days of processing (we found it emitting a sharp sound and with all colors on the screen. No wories, it was restared without problem!). And we are left with nothing: no result file was produced since the
2011 May 04
1
Instrumental variable quantile estimation of spatial autoregressive models
Dear all, I would like to implement a spatial quantile regression using instrumental variable estimation (according to Su and Yang (2007), Instrumental variable quantile estimation of spatial autoregressive models, SMU economics & statistis working paper series, 2007, 05-2007, p.35 ). I am applying the hedonic pricing method on land transactions in Luxembourg. My original data set contains
2013 Apr 16
1
Spatial Ananlysis: zero.policy=TRUE doesn't work for no neighbour regions??
Hello, I'm new to R and to Spatial Analysis and got a problem trying to create a Spatial Weights Matrix. *I us the following code to create the Neighbourslist:* >library(maptools) >library(spdep) >library(rgdal) >location_County<- readShapePoly("....") >proj4string(location_County)<- CRS("+proj=longlat ellps=WGS84") >location_nbq<-
2009 Jul 15
1
Simulation code error
Dear List, I have some problem with my simulation code. Here is output from R: > sim.sp <- function(data,CM,n,N) + { + C <- matrix(rep(NA,N),ncol=1) + for(i in 1:N) + { + j <- n + xx <- which(colSums(CM[j,])==1) + V <- names(xx) + V <- paste(V, collapse="+") + V <- paste("SBA~", V) + rd <- round(nrow(data)*(2/3)) + d <-
2009 Jul 15
1
Error in simulation R-code
Dear List, I have got error message when I run the R-code. Can anyone has a suggestion? v.code <- df.bm7[,c(10:31)]; v.code[1:3,] names(v.code) CM = v.code # variable binomial code sim.sp <- function(data,CM,n,N) { C <- matrix(rep(NA,N),ncol=1) for(i in 1:N) { j <- n xx <- which(colSums(CM[j,])==1) V <- names(xx) V <- paste(V,
2008 Apr 18
1
spdep question - Moran's I
Dear all, I would like to calculate a Moran's I statistic using the moran function in the spdep package. The problem I'm having deals with how to create the listw object. My data stems from the area of social network analysis. I have list of poeple and for each pair of them I have a measure of their relationship strength. So my dataset looks like: Jim; Bob; 0.5 This measure of
2004 Nov 18
1
Method dispatch S3/S4 through optimize()
I have been running into difficulties with dispatching on an S4 class defined in the SparseM package, when the method calls are inside a function passed as the f= argument to optimize() in functions in the spdep package. The S4 methods are typically defined as: setMethod("det","matrix.csr", function(x, ...) det(chol(x))^2) that is within setMethod() rather than by name before
2008 Oct 08
1
Error in spdep: system is computationally singular
Hi all, I am trying to run an autologistic model using the function errorsarlm from spdep package. **I built an XY matrix extracting the two colums from matriz** coords1<-matriz[matriz$casos1==1, c(4,5)] coords1<-as.matrix(coords1) **I identify neighbours of region points** nb20<-dnearneigh(coords1,0,20,longlat=TRUE) ** I build a neighbours list with spatial weights**
2003 Aug 07
0
spdep error message
Hello, I have been using the package "spdep" to run spatial regressions on a data set with about 2500 observations. It has performed well up until now, but the following code resulted in an error: > load("Panel.90s.ok.R") > attach(Panel.90s.ok) > neighs<-dnearneigh(cbind(x,y),0,50000) > help(nbdists) > dists<-nbdists(neighs,cbind(x,y)) >
2012 Sep 27
0
error while estimating spatial Durbin (mixed) model
Dear all, I am new here ,I attempted to use R to estimate the spatial Durbin (mixed) model,and mydata is a panel data form,and the matrix is generated by geoda software ,here is my Command and error,really hope your help ,thank you! #??gal library(spdep) w<- read.gal("E:/splm/zj.GAL",override.id=TRUE) ww<-nb2listw(w,zero.policy=TRUE) #???? library(foreign)
2011 Jan 19
0
Error Moran's test : reconsider test arguments
Dear R-users, I was wondering if someone could give me some advices on the following problem. I tried to apply moran’s test to a small dataset and couldn’t succeed, here is the error message:   mor <- moran.test(x, res2)   Avis dans moran.test(x, res2) :   Out-of-range p-value: reconsider test arguments   mor     Moran's I test under randomization data:  x  weights: res2 
2009 Nov 05
0
analysing HTS assay plates for spatial effects
Hi, I'm have some data on a grid (specifically high throughput assay plates) and am interested in evaluating measures of spatial autocorrelation to flag plates for corrections. I have been using moran.test and geary.test from the spdep package. My approach is as follows: ## plate is a matrix of data coords <- expand.grid(1:32, 1:48) x <- as.numeric(plate) moran.test(x,
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
2011 Jul 12
1
Subsetting NaN values in localG()
Hi, I'm currently trying to calculate local Getis-Ord Gi* statistics for a 169x315 cell matrix of temperature values, below is the code I currently have (diffc is the data vector I am removing NaN values from, and I am moving said values to diffD; -999 represents NaN values; id contains ID values for cells I want to use in the calculation, which I already know to contain 25064 values):
2007 Nov 21
1
problem with nb2listw
Hi, I am a new student to R and I was hoping someone could help me with the error message I keep getting when I try to use the nb2listw() function. I have 45 sites and I want to get an autocorrelation value for sites within 1000m of each other. coords<-cbind(EAST,NORTH) coords<-as.matrix(coords) nb1000<-dnearneigh(coords,0,1000,longlat=TRUE) then when I try to run the
2009 Oct 09
1
svy / weighted regression
Dear list, I am trying to set up a propensity-weighted regression using the survey package. Most of my population is sampled with a sampling probability of one (that is, I have the full population). However, for a subset of the data I have only a 50% sample of the full population. In previous work on the data, I analyzed these data using SAS and STATA. In those packages I used a propensity weight
2005 Dec 29
1
Repeating functions
Hi, I have a number of spatial weight files and using Roger Bivand's spdep, I would like to 1. Convert them into neighbor lists using 2. Convert the neighbor lists into spatial weights For a given file, the syntax would be mygal_nb1 <- read.gal("mygalfile1", override.id = TRUE) myweight1 <- nb2listw(mygal_nb1) I have mygalfile[i] with i from 1 through to 6 and would like to