Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- model{
- #Likelihood
- for( i in 1 : N) {<br/>
- Disease[i] ~ dbern (thetacombine[i])<br/>
- thetacombine[i]<-theta1new[i]*theta0new[i]<br/>
- theta1new[i]<-pow((theta1[i]+0.0000000001),G[i])<br/>
- theta0new[i]<-pow((theta0[i]+0.0000000001),(G[i]-1))<br/>
- }
- #Priors regressors <br/>
- theta1 ~ dbeta (a1,b1)<br/>
- theta0 ~ dbeta (a2,b2)<br/>
- }
- bayes_data <- list(
- Disease = Disease,
- G = G,
- N = ntot,
- a1=5,
- b1=1,
- a2=1,
- b2=3
- )
- bayes_posterior_jags <- jags.model(
- file = bayes_model_str,
- data = bayes_data,
- inits = bayes_init,
- n.chains = 3,
- n.adapt = 100
- )<br/>
Add Comment
Please, Sign In to add comment