[R-sig-Geo] Spatially Weighted T-Test?

Roger Bivand Roger.Bivand at nhh.no
Sun Nov 22 14:15:59 CET 2009


On Sat, 21 Nov 2009, Ezra Boyd wrote:

> Hi Everyone,
>
> I have a spatial dataset (US Counties with basic Census attributes and an
> attribute denoting whether or not the county has a flood protection levee)
> and I used t.test to compare the means between the groups.
>
> All of my variables show clustering and neighborhood effects.  Is there a
> t.test procedure that accounts for spatial correlation?  Is this even
> necessary?

In theory yes, but there are no implementations, because they are not 
really needed. Fit a linear model using the levee factor as the 
independent variable, and test the output object with lm.morantest() in 
the spdep package. If need be, you may also fit a spatial regression 
model. Note that your levee/no_levee variable is itself highly patterned.

It may be sensible to think through how your collection of dependent 
variables are related to each other, as the presence or absence of a levee 
is unlikely to be the only relevant explanatory variable, and missing 
variables will probably increase spatial patterning in the residuals. You 
may even need to restrict your comparison to otherwise similar counties 
near major water bodies of similar topography with and without levees to 
see anything worthwhile.

>
> I've looked through Applied Spatial Data Analysis with R along with many of
> the tutorials and notes available online and I have not found any mention of
> such a procedure.  In Dalgaard (2008) I found the following statement about
> the t.test: 'The t tests are fairly robust against departures from the
> normal distribution' which seems to say that it is not necessary to account
> for spatial effects.

I don't know how you draw this conclusion, the two are unrelated. The 
presence of spatial autocorrelation will have the effect of reducing your 
effective degrees of freedom. Dalgaard's assertion is based on independent 
observations, which you have already stated that you do not have, hence 
the drop in effective n proportional to the strength of positive 
dependence.

Hope this helps,

Roger

> But, I wanted to see what people on the list thought about that?
>
> Thanks,
> Ezra
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list