Dear all,

this is probably a very stupid question -- in case it is I apologize in
advance.

I'm not very familiar with spatial statistics, although I have used the
spdep package previously (specifically the moran.mc and moran.test
functions) in a different context.

I have a dataset with roughly 150,000 records where each record corresponds
to a person. For each record (person) I have a series of continuous
variables (x1, x2, x3, ...) -- for example how much money the person earns
or how often s/he buys shampoo - and a ZIP Code where the person is living.
The ZIP Codes are all five digit and stem from the US (e.g., 10022, 92506,
43614).

I'd like to calculate Moran's I for each of my continuous variables in order
to identify for which measures there is spatial autocorrelation.

Is there a convenient/ automatic way to convert my list of ZIP codes into an
listw object which I can use as an input for moran.mc or moran.test?

Thanks very much for your help in advance,

Michael




Michael Haenlein
Associate Professor of Marketing
ESCP Europe
Paris, France

	[[alternative HTML version deleted]]

