Dear BUGS users,
I have been thinking to define a mixture model with the following form in WinBUGS:
f*(y[i]|pi[i], theta[i])=pi[i]*f(y[i]|pi[i], theta[i], y[i]=0)+(1- pi[i])* g(y[i]|pi[i], theta[i], y[i]>0), i=1,*,n
My questions are: 1) Is it possible to define the whole function f* using zero tricks within one loop (for i in (1:n))? If Yes, when specifying the log-likelihood function of f*, how can I specify the range y[i]=0 for f and y[i]>0 for g when f and g work only under the specific ranges?
2)In addition, is it possible to restrict function g under the condition theta[i]<pi[i], while both theta[i] and pi[i] are unknown parameters? If so, how can I specify it? My second level of the model is to model theta[i] and pi[i].
Any answers, suggestions, or hints will be greatly appreciated.
In addition, if you have worked on such models, can you kindly share your codes, or provide me some examples, or point me to some useful references?
Thanks a lot in advance.
Sincerely,
Benmei Liu
************************************************************************************
Benmei Liu
Joint Program in Survey Methodology (JPSM) - University of Maryland
1218 Lefrak Hall
University of Maryland
College Park, MD 20742
301-314-5833 (office)
301-314-7912 (fax)
www.jpsm.umd.edu
-------------------------------------------------------------------
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
|