Print

Print


From: Etienne Rivot <[log in to unmask]>
Subject: hierarchical model for binomial N order

Dear BUGS users, 

A few days ago, I sent a query about the hierarchical model for binomial
N order. My problem was that it is impossible with WinBUGS to model a
hierarchical structure on X with a Poisson(X | lambda) as an hyperprior.
In my particular case study, the variable X was the order N of a Binomial
law. Thank you very much to Andrew Millard and David Spiegelhalter for their 
very useful suggestions. 


Andrew Millar suggested a trick : to use a discrete approximation of the
Poisson law, that may be constructed as follow : 

>N[i] ~ dcat(poisson[])

>for (j in 1:M){

>	poisson[j] <<- po.term[j]/sum(po.term[j])

>	log(po.term[j]) <<- j*log(lambda) - lambda - logfact(j)

>}

>for some M much greater than the likely values of N.  This then
approximates the poisson prior 

>(assuming 0 is not a likely value of N!). Or you might be able to use
the Ones trick to generate the 

>prior using the formula for a poisson to use the one trick 


I tried this solution. It works well, but the MCMC simulations appear to
be be very very slow (something about 10 min for 100 MCMC iteration with
only 1 string on my PIII 800 Mhz PC). 


In order to speed the simulations, I tried others continuous positive
conditional distributions for N as 

	-	N | mu ~ chisquare(mu)

	-	N | (alpha,beta) ~ gamma(alpha,beta)

	-	N | (mu, sigma) ~ lognormal(mu, sigma) 

as David Spiegelhalter suggested to me. 

With my particular data set, I found that the lognormal distributions
give the better results. Moreover, its is to my mind easier to put
reference or informative on the hyperparameters of the lognormal
distributions than for other ones. 


Best regards, 

Etienne. 





Etienne RIVOT

*********************************************************************

Etudiant en thèse / Ph.D. Student

UMR Ecobiologie et Qualité des Hydrosystèmes continentaux

Institut National pour la Recherche Agronomique

65, rue de St Brieuc, CS 84215, 35042 Rennes cedex, FRANCE

Tel : +33 2 23 48 54 49  ;  Fax : +33 2 23 48 54 40

Email : [log in to unmask]

Internet : http://www.rennes.inra.fr/

*********************************************************************

-------------------------------------------------------------------
To mail the BUGS list, mail to [log in to unmask]
You can search old messages at www.jiscmail.ac.uk/lists/bugs.html
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list

This list is for discussion of modelling issues and the BUGS
software.  For help with crashes and error messages, first mail
[log in to unmask]