next up previous
Next: Standard errors in gam(), Up: Spatial and spatio-temporal data Previous: Space-time smoothing in R

Universal kriging and generalized least squares (GLS) fitting

If you're interested in fitting a model, $Y\sim\mathcal{N}(X\beta,\Sigma+\tau^{2}I)$, where $\Sigma$ captures correlation, such as spatial structure, you have two options. I prefer likfit() for two reasons. First it can make use of the Matérn covariance. Second it seems to do a much better maximization job, often finding higher likelihoods than gls().

  1. Use gls() from the nlme package in R. The 'exponential' and 'Gaussian' correlation functions are two options. Make sure to include the nugget. Note that 'sig2' is the total variation and 'nugget' is the proportion for the spatial component (I think - I haven't checked this recently).
  2. Use likfit() from the geoR package in R. Here trend.spatial specifies the mean term. kappa is the Matérn differentiability parameter.
Note that the model above is the same as a model

Y & \sim & \mathcal{N}(X\beta+g,\tau^{2}I)\\
g & \sim & \mathcal{N}(0,\Sigma),

namely a spatial random effects or Gaussian process-based model.

Last modified: 12/14/08. Typo corrected 1/14/12.

Chris Paciorek 2012-01-21