Guest User

Untitled

a guest
Feb 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. D1.education1[i]<-equals(education[i],1)
  2.  
  3. logit(p[i,j]) <- (b1cons + b1age*x1[i] + b1education[1]*D1.education1[i] + b1education[2]*D1.education2[i]+ b1education[3]*D1.education3[i]+b1residence*D1.residence[i] + b1working*D1.working[i] +b1breast*D1.breast[i]+ group[i] +b2cons + b2age*x1[j] + b2education[1]*D2.education1[j] + b2education[2]*D2.education2[j]+ b2education[3]*D2.education3[j]+b2residence*D2.residence[j] + b2working*D2.working[j] +b2breast*D2.breast[j]+ group[j])
  4.  
  5. }
  6. }
  7. for(i in 1:N) {
  8. for(j in 1:M){
  9.  
  10. Y_ppd[i,j] ~ dbern(p[i,j])
  11. }
  12. }
  13. # M groups
  14. for (i in 2:K) {
  15. for (j in 2:K){
  16.  
  17. group1[i]~ dnorm(0,tau1)
  18. group2[j]~dnorm(0,tau2)
  19. }
  20. }
  21. b1education[4] <- 0.0
  22. b2education[4] <- 0.0
  23. # Priors
  24. b1cons ~ dnorm(0.0,1.0E-6)
  25. b1age ~ dnorm(0.0,1.0E-6)
  26. b1residence ~ dnorm(0.0,1.0E-6)
  27. b1working ~ dnorm(0.0,1.0E-6)
  28. b1breast ~ dnorm(0.0,1.0E-6)
  29. for(l in 1:3){
  30. b1education[l]~dnorm(0.0,1.0E-6)
  31. }
  32.  
  33. b2cons ~ dnorm(0.0,1.0E-6)
  34. b2age ~ dnorm(0.0,1.0E-6)
  35. b2residence ~ dnorm(0.0,1.0E-6)
  36. b2working ~ dnorm(0.0,1.0E-6)
  37. b2breast ~ dnorm(0.0,1.0E-6)
  38. for(l in 1:3){
  39. b2education[l]~dnorm(0.0,1.0E-6)
  40.  
  41. }
  42. # Hyperprior
  43. tau1 ~ dgamma(0.001,0.001)
  44. tau2 ~ dgamma(0.001,0.001)
Add Comment
Please, Sign In to add comment