[R] nlme: spatial autocorrelation on a sphere

Dan Bebber dbebber at earthwatch.org.uk
Tue Oct 2 06:55:39 CEST 2012


Hi Spencer,

thanks, I'll try R-sig-mixed-models.

I tried using the corRSpher function from ramps in gls but received the following error:
> Error in recalc.corSpatial(object[[i]], conLin) : 
>   Unknown spatial correlation class

Will post back here if I am successful.

Dan
________________________________________
From: Spencer Graves [spencer.graves at prodsyse.com]
Sent: 02 October 2012 04:29
To: Dan Bebber
Cc: David Winsemius; r-help at r-project.org
Subject: Re: [R] nlme: spatial autocorrelation on a sphere

Hi, Dan:


On 10/1/2012 8:07 PM, Dan Bebber wrote:
> Please be assured, I really did "RTFM" (i.e. Pinheiro & Bates) as well as all the online sources, and have accessed the codes of the corStruct functions, but they do not reveal how the "metric" argument is used. Therefore, I can't reprogram to include "haversine" distance, as seen in 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.
>
> If anyone knows a way in to the relevant code, please let me know.


       Thanks for the clarification and for your persistence in this
issue.  Others clearly have been asking for an enhancement of this nature.


       I assume you've checked and confirmed that "ramps::corRSpher", as
suggested by David Winsemius, will NOT do what you want.  If so, I
suggest you subscribe to "R-sig-mixed-models" (per r-project.org ->
"Mailing Lists"), and post your question, citing Smith et al., to
there.  When you do, I suggest you include cc:  Douglas Bates
<bates at stat.wisc.edu>.


       I'm sorry I can't help more, but I hope you will soon find a
solution to this problem.


       Best Wishes,
       Spencer
>
> Thanks
> Dan
>
> 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)
>
>
> ________________________________________
> From: David Winsemius [dwinsemius at comcast.net]
> Sent: 01 October 2012 17:32
> To: Spencer Graves
> Cc: Dan Bebber; r-help at r-project.org
> Subject: Re: [R] nlme: spatial autocorrelation on a sphere
>
> On Oct 1, 2012, at 8:34 AM, Spencer Graves wrote:
>
>> On 10/1/2012 12:38 AM, David Winsemius wrote:
>>> <snip>
>>> LMCTVTFY: http://cran.r-project.org/web/views/Spatial.html
>>>
>>
>>       What's LMCTVIFY?
> Please accept my apologies for attempting to be cute and I also apologize to Mr Bebber for reading his request far too quickly. I was trying to use (C)RAN (T)ask (V)iews as a verb.
>
>>       LMGTFY for LMCTVIY produced only LMGTFY, at least for me. There's space for it on Wikipedia ("RTFM") after LMGTFY (which I found using LMGTFY Wikipedia).
> I don't think it warrants being enshrined. I might also  have written:  require(sos); findFn("metric spherical latitude longitude")  might produce. In this instance that approach found the ramps::corRSpher function, which has a "haversine" metric, much  more quickly than did my subsequent efforts with RSeek, which I conducted after I realized that Bebber had already made a good faith effort at identifying resources.
>
> --
>
>
> David Winsemius, MD
> Alameda, CA, USA
>





More information about the R-help mailing list