Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Poisson-Gamma Mixture with Spatial Random Effects code.

    Good evening.

    I was wondering if there is any paper or article that explains how to obtain a Poisson-Gamma Mixture model for count data using the method MCMC with the M-H algorithm in Stata. More precisely, if there is an article that includes spatial random effects using a SWM. Now I'm trying to perform that kind of regression with disastrous results (mainly for the code).
    Just want to know if anyone has done it before starting a full discussion. My code:


    bayesmh y= (exp({eta: x Phi[_ID], noconstant})), ///
    mcmcsize(12500) burnin(2500) initrandom saving(example, replace) ///
    likelihood(poisson) ///
    prior({xb_y}, gamma({k},{k}/{eta:})) ///
    block({xb_y}, split) ///
    prior({rho}, uniform(-1,1)) ///
    block({rho}, split) ///
    prior({tao}, gamma(0.001,000.1)) ///
    block({tao}, split) ///
    prior({eta: x}, uniform(-0.1,0.1)) ///
    block({eta: x}, split) ///
    prior({eta: Phi[_ID]}, normal(0,1)) ///
    block({eta: Phi[_ID]}, split) ///
    prior({k}, gamma(4,1)) ///
    block({k}, split)

    Thanks for your time.

    Best regards.
Working...
X