楼主: Lisrelchen
7411 1

[精彩WinBUGS答问]How can I estimate the precision of a normal using [推广有奖]

  • 0关注
  • 62粉丝

VIP

已卖:4192份资源

院士

67%

还不是VIP/贵宾

-

TA的文库  其他...

Bayesian NewOccidental

Spatial Data Analysis

东西方数据挖掘

威望
0
论坛币
50278 个
通用积分
83.5106
学术水平
253 点
热心指数
300 点
信用等级
208 点
经验
41518 点
帖子
3256
精华
14
在线时间
766 小时
注册时间
2006-5-4
最后登录
2022-11-6

楼主
Lisrelchen 发表于 2014-6-16 13:02:23 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

I am trying to estimate the precision τ of a normal distribution with either WinBUGS or OpenBUGS. I tried using a standard approach here by setting τ~gamma(0.001,0.001) but WinBUGS and OpenBUGS both stop with an error message. WinBUGS basically tells me to increase the parameters for the gamma prior.

However, if I do that, the MCMC chains of τ act strangely, even if I run 200.000 iterations withthin=200:

As you can see, the chains have spikes of up to 3000and in other cases even more. I'm not very experienced but I think this shouldn't be the case. The parameter c is in the range of [0;1] so I'm worried about precision estimates of above 400.


This question seems to address my issue. It says that Gibbs samplers (like WinBUGS) have problems estimating the precision of a normal if the parameters of the gamma distribution are close to zero (which is not exactly true for my case, but they are fairly small). Playing around with the parameters of the gamma distribution does help but I thought the whole purpose of using a gamma prior is to approximate a uniform which is close to zero.

I have also tried estimating the precision indirectly by estimating the standard deviation as a uniform distribution first but the result was more or less the same.

Any help is highly appreciated.


二维码

扫码加我 拉你入群

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

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

关键词:PRECISION estimate winbugs WINBUG normal normal

本帖被以下文库推荐

沙发
Lisrelchen 发表于 2014-6-16 13:07:10
had exactly the same with specifying dgamma(0.001, 0.001) for WinBUGS! Jags can actually take it (and I recommend you to use Jags if you don't need advanced WinBUGS features; and even if you want to use WinBUGS, it comes in handy for debugging, because Jags has much more comprehensible error reporting), but for WinBUGS, you must do:

x[..] ~ dnorm(mean[..], tau)

tau ~ dgamma(0.01, 0.01)
Don't be afraid, dgamma is a good choice. You just have to tweak the parameters. Follow this resource which perfectly explains gamma parameters and prior choice! http://www.unc.edu/courses/2010fall/ecol/563/001/docs/lectures/lecture14.htm#precision

Also note that it might come in handy to normalize the input variables - it makes parameter estimation (and prior choice) much more smooth and easier, because the basic priors will work perfectly with the usual constants.

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-12 13:15