全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 winbugs及其他软件专版
1810 2
2014-06-30
I want to define a distribution in my model of the form: P(x=10)=0.10, P(x=15)=0.20, P(x=20)=0.70

The WinBUGS FAQ says it is possible construct my own discrete uniform distribution as a categorical variable with a uniform prior and which can take on the necessary integer values. See the blockerht example in the first part of the manual.

I looked the example up, I think it is this one: "A hierarchical t-distribution with unknown degrees of freedom"

At the model specification they do something like:
复制代码

Which does define a discrete uniform. But I don't know how to get to the form I need. Can anyone help me?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2014-6-30 23:18:19
If I understand your question correctly, you do not need the loop...

复制代码

should work...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2014-6-30 23:18:50
I am learning how to do this myself. I wonder if you can do this:

prior[10] <- .1
prior[15] <- .2
prior[20] <- .7
x ~ dcat(prior[])
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群