Dear BUGS users,
Can someone help? I am unable to reproduce in WinBUGS something which I can
do in BUGS.
The basic problem is getting WinBUGS to deal with a catogorical variable
when I know the probabilities. On compilation I get the dreaded Trap window.
The two examples I can find of this in the BUGS Examples (Blocker 10.2 and
Dugongs) have respectively been deleted and replaced in the WinBUGS
examples. This worries me.
As a simple example, the code below is designed to simulate a standard
normal distribution by putting together two halves. No data are required.
model test;
{
mu ~ dnorm(0, 1) I(lower[j], upper[j]);
j ~ dcat(p[1:2]);
p[1] <- 0.5;
p[2] <- 0.5;
lower[1] <- -100000;
upper[1] <- 0;
lower[2] <- 0;
upper[2] <- 100000;
}
Any help greatly appreciated.
Regards,
Julian
=================
Dr Julian Higgins
Medical Statistician, Systematic Reviews Training Unit
Department of Epidemiology and Public Health
Institute of Child Health, University College London Medical School
30 Guilford Street, London WC1N 1EH
Tel: +44 (0)171 242 9789 ext 2478
email: [log in to unmask]
fax: +44 (0)171 813 8233
http://www.ich.ucl.ac.uk/srtu
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|