Dear list members,

I am a new R user and spdep user. I tried to use function "localG" to calculate Getis Gi. My targeted variable is log(SalePrice) for over 1000 houses. The listw is the number of neighbors within 3000m. 

> SalePrice.Gi <- localG(SalePrice, nb3000m.W, zero.policy=TRUE)

Then I got this error:  SalePrice is not a numeric vector

I don't understand why. All SalePrice data is numeric, with 6 decimal precision. I tried to import SalePrice from .dat or .txt or .csv file, but got the same error. I tried to play with the header and column/row argument, still no use.

I am really frustrated. I guess there is a simple solution, but I just cannot find it!!! Please help me! Thank you in advance!

Christina
USC Geography department




      
	[[alternative HTML version deleted]]

