Displaying 1 result from an estimated 1 matches for "neigh2".
Did you mean:
neigh
2011 Jul 12
1
Subsetting NaN values in localG()
...lues):
/counter = 1
diffD = array(0,25064)
id = array(0,25064)
for(i in 1:53235){
if(diffc[i]!=-999){
diffD[counter] = diffc[i]
id[counter] = i
counter = counter+1
}
} ##Isolates values I want to use in localG calculation
neigh = cell2nb(169,315,type=='queen')
neigh2 = subset.nb(neigh,(1:length(neigh) %in% id)
mylist = nb2listw(neigh2,style="B")
stats = localG(diffD,mylist)/
Unfortunately, when I get to the last line of the code, I receive the
following error:
/"Error in matrix(0, nrow = nrow(x), ncol = ncol(x)) :
invalid 'ncol' valu...