Spatial models

Help
2011-02-10
2013-12-16
  • Corey Sparks

    Corey Sparks - 2011-02-10

    Hello list,

    I am interested in using JAGS for a spatial model that I'm running into issues
    with in WinBUGS, basically because of the large number of stochastic nodes I
    need to monitor.

    I can't seem to find anything about functions like

    car.normal() or spatial.exp()

    in JAGS, has anyone else tried to do these kinds of models?

    If so would you be willing to share with me?

    Here's an example of one of my models bugs code:

    model{

    for (i in 1:N){

    ynh_~dbin(pnh_, nnh_)

    yh_~dbin(ph_, nh_)

    logit(pnh_)<-alphanh+unh_

    logit(ph_)<-alphah+uh_

    prob2_<-step(ph_-pnh_)

    estimated rates

    nhrate_<-1000*pnh_

    hrate_<-1000*ph_

    prate_<-step(hrate_-nhrate_)

    }

    end model

    unh~car.normal(adj,weights, num, precunh)

    uh~car.normal(adj,weights, num, precuh)

    precunh~dgamma(.5,.001)

    precuh~dgamma(.5,.001)

    priors

    alphanh~dnorm(0, .0001)

    alphah~dnorm(0, .0001)

    signh<-1/precunh

    sigh<-1/precuh

    }____

     
  • Martyn Plummer

    Martyn Plummer - 2011-02-18

    Sorry but I don't use spatial models at all in my work so this is a low
    priority for me, even though it is a common feature request. I do have the
    books "Hierarchical modelling and analysis for spatial data" by Banerjee,
    Carlin and Gelfand as well as "Gaussian Markov Fields" by Rue and Held. But it
    might be a while before I've digested them and implemented anything in JAGS.

     
  • Mark Payne

    Mark Payne - 2013-12-10

    Hi,

    I was curious about this message and the status of spatial models in JAGS today (noting that the original post is now getting on towards three years old). Are there any plans to implement such spatial structures in JAGS? Alternatively, are there any good worked examples around that we could use as a DIY basis?

    Best wishes,

    Mark

     
  • Matt Denwood

    Matt Denwood - 2013-12-11

    Hi Mark

    I have also (occasionally) missed the spatial models in WinBUGS, although like Martyn I don't use them often enough to warrant the time required to implement them in JAGS myself. However, if someone were able to write the C++ code necessary to implement some of the required distributions/samplers (the tricky bit) it would be relatively straightforward to implement these as a standalone JAGS module even if they are not incorporated into JAGS itself. There is a great tutorial article at http://www.cidlab.com/prints/wabersich2013extending.pdf that is worth reading - I have also created a module (https://sourceforge.net/projects/runjags/files/Standalone%20JAGS%20module/) and would be happy to help with this side of things.

    Cheers,

    Matt

     
  • Mark Payne

    Mark Payne - 2013-12-16

    Hi Matt,

    Thanks for the reply. Unfortunately, I'm still a novice in the JAGS/Bayesian world, so extending JAGS is a bit beyond me yet... Hopefully I'm not the only one who is interested in using JAGS for Spatial Models though...

    Best wishes,

    Mark

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks