楼主: ReneeBK
966 0

[疑难杂症]D-R model using WinBUGS [推广有奖]

  • 1关注
  • 62粉丝

VIP

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49407 个
通用积分
51.8704
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57815 点
帖子
4006
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
Hi everyone

I have a model that compiles but produces an error when I try to run with multiple definitions of variable s[1]. I’m not so familiar with OpenBUGS so your help would be greatly appreciated.

The problem
==========

I am trying to fit an exact Beta-Poisson dose response model to Campylobacter data, i.e. estimate the parameters aa and bb.

I have six concentrations of bacteria (the Lambdas = mean ingested CFUs) from which people receive a Poisson(Lambda) dose.

The probability that an individual CFU will cause infection follows a Beta distribution with parameters aa,bb. It follows a distribution to reflect the variation in susceptibility between people. [Note: if x follows a Beta(aa,bb) then (1-x) follows a beta(bb,aa) ].

n is the number of people given a dose with mean CFUs Lambda, of whom
s become infected.

The code
=======

model
        {
                for (i in 1 : K)        {
                        for (j in 1 : n) {
                                                dose[i,j] ~ dpois(Lambda)
                                                q[i,j] ~ dbeta(bb,aa)
                                                p[i,j] <- 1 - pow(q[i,j] ,
dose[i,j] )
                                                inf[i,j] ~ dbern(p[i,j])
                                                }
                                        s <- sum( inf[i, 1:n ] )
                                        }
                aa ~ dexp(1)
                aa ~ dexp(1)
        }

Data

        list(
        Lambda = c(800,8000,90000,800000,1000000,100000000),
        n = c(10,10,13,11,19,5),
        s = c(5,6,11,8,15,5),
        K = 6)

Inits

        list(alpha = 1, beta = 1)
        list(alpha = 10, beta = 10)

Any thoughts? Thanks





二维码

扫码加我 拉你入群

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

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

关键词:winbugs WINBUG Using model mode individual receive familiar multiple produces

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

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-28 17:51