[R] spatial correlaton in lme and gls

From: Piet Bell <pj.bell_at_yahoo.co.uk>
Date: Mon 15 Jan 2007 - 23:01:12 GMT


Hello,
  I have multiple observations (replicates) per station...and the stations are distributed in space.    

  I've applied models using lme and gls from the nlme library. I've messed around with compound symmetry to capture the correlation within stations. My question is.....I have x and y coordinates for each station (the subsamples have nearly the same coordinates)...how do you include a spatial correlation structure between stations?    

  I tried things like:    

  tmp<-gls(y~z,correlation=corSpher(form=~xcoord+ycoord| Station))    

  but this is modelling the within-station correlation. I want to include between station correlation as some stations are close in space, and others are not. Station is the highest level (it is just 2-way data).    

  Is this possible? The examples in the literature mainly use xcoord and ycoord as fixed terms.    

  Kind regards,
  Pieter Bell                              


        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue Jan 16 10:28:04 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 16 Jan 2007 - 00:30:32 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.