1
$\begingroup$

I'm dealing with spatial data where the response variable is the gas concentration. In addition, I've the x,y-coordinate values, and another covariates. I'm thinking to fit a Gaussian random field model as follows:

$$ Z(s) = X(s) \beta + \epsilon(s) $$

where $ [Z(s) : s \in R^2]$, $X(s)$ is a set of p covariates associated with each site s, $\beta$ is a p-dimensional vector of coefficients. I already estimated the covariance function for the error term, but now I'm having trouble on how to proceed. I'm using R, but so far, unfortunately, I've not come across any package where I can include covariates in the model.

I'm still learning spatial statistics, so if you've any hint, I would truly appreciate it.

$\endgroup$
  • 4
    $\begingroup$ There is a package in R called R-INLA (Integrated Nested Laplace Approximation) which is increasingly being used to model latent Gaussian Random Fields (with covariates). See a nice paper here which has some R code in the supplement to get going. There are also several other papers on the INLA webpage here several of which have R code. INLA is is very computationally fast, but it may be a bit black-boxy for some. Regardless, it is the state of the art as far as fitting latent Gaussian models. $\endgroup$ – gregory_britten Jul 10 '13 at 17:54
  • $\begingroup$ I should add: I don't think R-INLA is on CRAN yet, so you can get the package and documentation from the website I posted above; i.e. here $\endgroup$ – gregory_britten Jul 10 '13 at 17:57
  • 1
    $\begingroup$ If by "Gaussian Random Field" you mean that the distribution of concentration follows a gaussian, then I would like to commend a "Gaussian Mixture Model". If it is the real world, then likely your initial conditions are not perfectly spherical, so your distribution is not perfectly gaussian. Such data, as long as it does not have discontinuities, can often be well fit using gaussian mixtures. These tools are mature - they are fast, they work as they are supposed to. As a MatLab guy, I use the built in "gmdistribution" tools. I cannot direct you in "R". $\endgroup$ – EngrStudent - Reinstate Monica Jul 10 '13 at 19:01
1
$\begingroup$

Partially answered in comments:

There is a package in R called R-INLA (Integrated Nested Laplace Approximation) which is increasingly being used to model latent Gaussian Random Fields (with covariates). See a nice paper here which has some R code in the supplement to get going. There are also several other papers on the INLA webpage: http://www.r-inla.org/ several of which have R code. INLA is very computationally fast, but it may be a bit black-boxy for some. Regardless, it is the state of the art as far as fitting latent Gaussian models. – gregory_britten

The INLA package is not on CRAN, can be found here: http://www.r-inla.org/download There is related package on CRAN, search CRAN for INLA. One is https://cran.r-project.org/package=inlabru

If by "Gaussian Random Field" you mean that the distribution of concentration follows a gaussian, then I would like to commend a "Gaussian Mixture Model". If it is the real world, then likely your initial conditions are not perfectly spherical, so your distribution is not perfectly gaussian. Such data, as long as it does not have discontinuities, can often be well fit using gaussian mixtures. These tools are mature - they are fast, they work as they are supposed to. As a MatLab guy, I use the built in "gmdistribution" tools. I cannot direct you in "R". – EngrStudent

$\endgroup$
  • $\begingroup$ Should be a CW answer no? $\endgroup$ – Firebug Aug 26 '18 at 12:26
  • $\begingroup$ Somewhere in this discussion stats.meta.stackexchange.com/questions/5325/… it was somewhat agreed that not necessarily. $\endgroup$ – kjetil b halvorsen Aug 26 '18 at 12:55
  • $\begingroup$ Oh I see now, I was misremembering. $\endgroup$ – Firebug Aug 26 '18 at 13:02
  • $\begingroup$ Thanks for trying to make something of this thread. However, the comment you quote about GRFs is off the mark. A GRF is a multidimensional stochastic process. See en.wikipedia.org/wiki/Gaussian_random_field for a (very abbreviated) description. $\endgroup$ – whuber Aug 26 '18 at 15:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.