[R-sig-ME] nlme: spatial autocorrelation on a sphere

Dan Bebber dbebber at earthwatch.org.uk
Tue Oct 2 07:12:52 CEST 2012


I would like to write a spatial correlation structure function for nlme, that replicates the ability of such functions in the 'ramps' package to calculate great circle distances, e.g. corRSpher(form = ~ lat + lon, metric = "haversine").

The authors of the ramps package, Smith et al. (2008) write "The spatial correlation structures in nlme are not directly used because they do not allow great circle distance, which is very commonly needed for spatial data" so there may be a case for adding this functionality to nlme.

Unfortunately, I have been unable to locate the code to do this within nlme.
My question is: is this code accessible, and if so, how do I access it to modify it and then use it in functions like corSpher?

Spencer Graves on the r-help mailing list recommended I try here for an answer.

Many thanks,
Dan Bebber

Reference
Smith BJ, Yan J & Cowles MK 2008. Unified Geostatistical Modeling for Data Fusion and Spatial Heteroskedasticity with R Package ramps. Journal of Statistical Software 25(10)



More information about the R-sig-mixed-models mailing list