Following earlier Q re this, it was suggested I try Openbugs - see
results below! I think I'll stick to Winbugs for the moment...(for
this at least)
It was also suggested I try JAGS - & and some output sent looked
promising, but I haven't yet worked out how to get JAGS scripts to
run... (in Windows) if anyone can give a hint...
David
################# #######################
Even Simpler eg of problem-with-poisson code
In WinBUGS 1.4 produces non-integer D and Db, contrary to expectations
(low auto-correlations) but fairly close to correct
In OpenBUGS 3.03 produces integer D & Db (but distribution is just
slightly wrong!!) ( & huge auto-correlations)
{
MuProblem~dunif(0,100)
MuCheck~dunif(0,100)
Problem~dpois(MuProblem)
Check~dpois(MuCheck)
Prob2 <- Problem
ObsP~dbin(0.7,Prob2)
ObsCheck~dbin(0.7,Check)
}
Data list( ObsCheck=1 , ObsP=1 )
Inits list( MuProblem=2 , MuCheck=2 , Problem=3 , Check=3 )
Results:
OpenBugs 3.03
mean sd MC_error val2.5pc
median val97.5pc
Check 1.863 1.106 0.007267 1.0
2.0 5.0
MuCheck 2.865 2.022 0.01484 0.3502 2.412 8.004
MuProblem 17.74 12.0 0.1325 2.38 15.11
47.66
Prob2 16.74 11.26 0.1284 2.0 14.0
45.0 Problem 16.74 11.26 0.1284 2.0 14.0
45.0
WinBUGS 1.4
node mean sd MC error 2.5%
median 97.5% Check 1.855 1.111 0.005552
1.0 2.0 5.0 MuCheck 2.851 2.032
0.01117 0.3545 2.392 7.968 MuProblem 3.202
2.099 0.01078 0.4907 2.761 8.473 Prob2
2.202 1.089 0.008205 1.038 1.894 5.055
Problem 2.202 1.083 0.005855 1.039 1.903
4.998
################# #######################
-----Original Message-----
From: Braunholtz, David A.
Sent: 17 December 2007 22:26
To: [log in to unmask]
Subject: non integer poisson variates ?
Dear Bugsers,
I have noticed that code like the below results in non integer D (& Db).
Is this is intentional ? Is there a way of forcing the poisson to
produce integral D ? It seems unlikely, but is the distribution for MU
correct despite this ?
Incidentally, while looking into this, I noticed that i was able (in the
simplest possible program) to use the same poisson N for the order of
two binomials - without producing the error message mentioned in 'tips &
troubleshooting
/ restrictions ... / e) ?
Thanks for any help ...
[log in to unmask]
Immpact Project
University of Aberdeen
-------------------------------------------------------------------
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]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
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
|