Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
To post to this group, send an email to r-inla-disc...@googlegroups.com.
Visit this group at http://groups.google.com/group/r-inla-discussion-group.
For more options, visit https://groups.google.com/groups/opt_out.
On 31 Jul 2013, at 09:34, Linh Nguyen <linh.vaw...@gmail.com> wrote:Dear All,
I am thinking how to calculate a precision matrix in a spatial model.
For example, in Gaussian Process, we can calculate a covariance matrix of unobserved locations, given observations.
Equivalently, can we compute such precision matrix in Gaussian Markov Random Field?When working with precision matrices and spatial models, things are done a bit differently than when working with covariance matrices. I r-inla, the precision for the basis weights in a spatial spde model can be obtained from inla.spde.precision(). Calling that precision Qx, a linear Gaussian model with observation model y_i=(A x)_i + epsilon_i can be written asX~N(mu, Qx)Y|X=x ~ N(A x, Qeps)The posterior distribution for X given Y=y is then given byX|Y=y ~ N(mupost, Qpost)WhereQpost = Qx + A' Qeps Amupost = mu + Qpost^-1 A' Qeps (y - A mu)The basis weights in mupost can then be used to evaluate the posterior mean at any location of the field. (The standard deviations require a bit more work and I don't have time to write all that in this email...)All of this happens internally in r-inla and so it's not usually something one needs to do manually (except possibly when predicting onto more locations than inla can handle simultaneously)So this only partially answered your question. Other versions of the answer depends on _why_ you would want to have that precision matrix!Finn
Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
On 31/07/13 10:41, Linh Nguyen wrote:
> Actually I would calculate the entropy at unobserved locations given
> observations. In GP, I can do that based on covariance matrix. That's
> why I need your help.
Is this aimed at spatial design?
A quick google search took me to the book by Werner M�ller:
http://books.google.co.uk/books?id=ivyV9UpL8XkC&lpg=PA181&ots=-wEBz1gQzh&dq=entropy%20at%20unobserved%20locations&pg=PA181#v=onepage&q=entropy%20at%20unobserved%20locations&f=false
I'm not aware of any papers discussing how to this practically for GMRF
models, and certainly not for triangulated spde models; but in your
original email you didn't say precisely what type of gmrf models you
were interested in.
With some more details of precisely what you are trying to compute I may
be able to give some advice.
Finn
On 31 Jul 2013, at 09:34, Linh Nguyen <linh.vaw...@gmail.com> wrote:Dear All,
I am thinking how to calculate a precision matrix in a spatial model.
For example, in Gaussian Process, we can calculate a covariance matrix of unobserved locations, given observations.
Equivalently, can we compute such precision matrix in Gaussian Markov Random Field?When working with precision matrices and spatial models, things are done a bit differently than when working with covariance matrices. I r-inla, the precision for the basis weights in a spatial spde model can be obtained from inla.spde.precision(). Calling that precision Qx, a linear Gaussian model with observation model y_i=(A x)_i + epsilon_i can be written as
X~N(mu, Qx)Y|X=x ~ N(A x, Qeps)The posterior distribution for X given Y=y is then given byX|Y=y ~ N(mupost, Qpost)WhereQpost = Qx + A' Qeps Amupost = mu + Qpost^-1 A' Qeps (y - A mu)The basis weights in mupost can then be used to evaluate the posterior mean at any location of the field. (The standard deviations require a bit more work and I don't have time to write all that in this email...)All of this happens internally in r-inla and so it's not usually something one needs to do manually (except possibly when predicting onto more locations than inla can handle simultaneously)So this only partially answered your question. Other versions of the answer depends on _why_ you would want to have that precision matrix!Finn
Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
On Wednesday, July 31, 2013 6:59:51 PM UTC+10, Finn Lindgren wrote:When working with precision matrices and spatial models, things are done a bit differently than when working with covariance matrices. I r-inla, the precision for the basis weights in a spatial spde model can be obtained from inla.spde.precision(). Calling that precision Qx, a linear Gaussian model with observation model y_i=(A x)_i + epsilon_i can be written as
In inla.spde.precision(), we need to define the parameters called "theta". These parameters can get from inla.spde2.result()? Are they log.tau, log.kappa or exp(log.tau), exp(log.kappa)?
--X~N(mu, Qx)Y|X=x ~ N(A x, Qeps)The posterior distribution for X given Y=y is then given byX|Y=y ~ N(mupost, Qpost)WhereQpost = Qx + A' Qeps Amupost = mu + Qpost^-1 A' Qeps (y - A mu)The basis weights in mupost can then be used to evaluate the posterior mean at any location of the field. (The standard deviations require a bit more work and I don't have time to write all that in this email...)All of this happens internally in r-inla and so it's not usually something one needs to do manually (except possibly when predicting onto more locations than inla can handle simultaneously)So this only partially answered your question. Other versions of the answer depends on _why_ you would want to have that precision matrix!Finn
Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
To post to this group, send an email to r-inla-disc...@googlegroups.com.
Visit this group at http://groups.google.com/group/r-inla-discussion-group.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.
On 31 Jul 2013, at 09:34, Linh Nguyen <linh.vaw...@gmail.com> wrote:When working with precision matrices and spatial models, things are done a bit differently than when working with covariance matrices. I r-inla, the precision for the basis weights in a spatial spde model can be obtained from inla.spde.precision(). Calling that precision Qx, a linear Gaussian model with observation model y_i=(A x)_i + epsilon_i can be written asX~N(mu, Qx)Y|X=x ~ N(A x, Qeps)The posterior distribution for X given Y=y is then given byX|Y=y ~ N(mupost, Qpost)WhereQpost = Qx + A' Qeps Amupost = mu + Qpost^-1 A' Qeps (y - A mu)The basis weights in mupost can then be used to evaluate the posterior mean at any location of the field.
(The standard deviations require a bit more work and I don't have time to write all that in this email...)
All of this happens internally in r-inla and so it's not usually something one needs to do manually (except possibly when predicting onto more locations than inla can handle simultaneously)So this only partially answered your question. Other versions of the answer depends on _why_ you would want to have that precision matrix!Finn
Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
Hi Finn,
When working with precision matrices and spatial models, things are done a bit differently than when working with covariance matrices. I r-inla, the precision for the basis weights in a spatial spde model can be obtained from inla.spde.precision(). Calling that precision Qx, a linear Gaussian model with observation model y_i=(A x)_i + epsilon_i can be written as
X~N(mu, Qx)Y|X=x ~ N(A x, Qeps)The posterior distribution for X given Y=y is then given byX|Y=y ~ N(mupost, Qpost)WhereQpost = Qx + A' Qeps Amupost = mu + Qpost^-1 A' Qeps (y - A mu)The basis weights in mupost can then be used to evaluate the posterior mean at any location of the field. (The standard deviations require a bit more work and I don't have time to write all that in this email...)All of this happens internally in r-inla and so it's not usually something one needs to do manually (except possibly when predicting onto more locations than inla can handle simultaneously)So this only partially answered your question. Other versions of the answer depends on _why_ you would want to have that precision matrix!Finn
Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
Hi Finn,
When working with precision matrices and spatial models, things are done a bit differently than when working with covariance matrices. I r-inla, the precision for the basis weights in a spatial spde model can be obtained from inla.spde.precision(). Calling that precision Qx, a linear Gaussian model with observation model y_i=(A x)_i + epsilon_i can be written as
If I have a set of observations {y_i}, i = 1 .. 100
Now I would compute the precision matrix of a subset (10 points) of this set. Is this possible? May I extract from Qx?
--
Thanks!X~N(mu, Qx)Y|X=x ~ N(A x, Qeps)The posterior distribution for X given Y=y is then given byX|Y=y ~ N(mupost, Qpost)WhereQpost = Qx + A' Qeps Amupost = mu + Qpost^-1 A' Qeps (y - A mu)The basis weights in mupost can then be used to evaluate the posterior mean at any location of the field. (The standard deviations require a bit more work and I don't have time to write all that in this email...)All of this happens internally in r-inla and so it's not usually something one needs to do manually (except possibly when predicting onto more locations than inla can handle simultaneously)So this only partially answered your question. Other versions of the answer depends on _why_ you would want to have that precision matrix!Finn
Thank you for your attention!
--
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion-group+unsub...@googlegroups.com.
To post to this group, send an email to r-inla-disc...@googlegroups.com.
Visit this group at http://groups.google.com/group/r-inla-discussion-group.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to r-inla-discussion...@googlegroups.com.