#### WinBUGS code for implementing the Beta-Binomial Model with Conditionally-autoregressive spatial effects, when $\gamma(s) = \gamma$ model { #### means and variances mage<-mean(age[]) sdage <- sd(age[]) mfemale <- mean(female[]) sdfemale <- sd(female]) msmok <- mean(smoker[]) sdsmok <- sd(smoker[]) mbrf <- mean(brfl[]) sdbrf <- sd(brfl[]) #### Standardized parameters beta1t[1] <- beta1[1]/sdage beta1t[2] <- beta1[2]/sdfemale beta1t[3] <- beta1[3]/sdsmok beta1t[4] <- beta1[4]/sdbrf #### Intercept A <- Int - beta1t[1]*mage - beta1t[2]*mfemale - beta1t[3]*msmok - beta1t[4]*mbrf for (i in 1:N) { #100 patients for (s in 1:M) { # 32 teeth # Below is a way to code a BB model, W is the response (count) W[i,s] ~ dbin(theta[i,s], n[s]) W1[i,s] ~ dbin(theta[i,s], n[s]) theta[i,s] ~ dbeta(a[i,s], b[i,s])I(0.001, 0.999) #### Modeling parameters a and b with the new re-parametrization a[i,s] <- max( mu[i,s]*tau, 0.001) b[i,s] <- max( (1-mu[i,s])*tau, 0.001) #### Log-likelihood LL[i,s] <- logfact(n[s]) - logfact(W[i,s]) - logfact(n[s]-W[i,s]) + W[i,s]*log(theta[i,s]) + (n[s] - W[i,s])*log(1- theta[i,s]) ## to compute CPO's CPO.inv[i,s] <- exp(-LL[i,s]) #### This is done to remove instability mu[i,s]<-max(0.001,min(0.999,mu1[i,s])) #### modeling logit of mu (the mean) logit(mu1[i,s]) <- Int + beta1t[1]*(age[i]-mage) + beta1t[2]*(female[i]-mfemale) + beta1t[3]*(smoker[i]-msmok) + beta1t[4]*(brfl[i] - mbrf) + U[i,s] } #### Proper CAR prior distribution for spatial random effects: U[i,1:M] ~ car.proper(thetam[], C[], adj[], num[], m[], prec, gamma) } Deviance <- -2*sum(LL[,]) #### modeling tau.........the dispersion tau ~ dgamma(0.1, 0.01) #### Setting up car.proper() # Set up 'data' to define spatial dependence structure # ===================================== for(i in 1 : M) { m[i] <- 1/num[i] # scaling factor for variance in each cell thetam[i] <- alpha1 thetan[i] <- alpha2 } #### This is copied from WinBUGS manual, note the changes done to create the C matrix cumsum[1] <- 0 for(i in 2:(M+1)) { cumsum[i] <- sum(num[1:(i-1)]) } for(k in 1 : sumNumNeigh) { for(i in 1:M) { pick[k,i] <- step(k - cumsum[i] - epsilon) * step(cumsum[i+1] - k) # pick[k,i] = 1 if cumsum[i] < k <= cumsum[i=1]; otherwise, pick[k,i] = 0 } #C[k] <- sqrt(num[adj[k]]/ inprod(num[], pick[k,])) # weight for each neighbour-pair (in BUGS manual) C[k] <- 1 / inprod(num[], pick[k,]) # Sudipto Banerjee's paper suggests this instead of the other one, this runs for our data } epsilon <- 0.0001 ### Some priors alpha1~ dnorm(0, 0.01) alpha2 ~ dnorm(0, 0.01) prec ~ dgamma(0.1, 0.01) spvar <- 1/prec gamma ~ dbeta(4,1) Int ~ dnorm(0, 0.01) for (i in 1:4) { beta1[i] ~ dnorm(0,0.25) odds[i] <- exp(beta1t[i]) } } ## Model ends here ###### Initial values list(alpha1 = 0, gamma= 0.9, Int = 0.01, beta1 = c(0.1,0.1,0.1,0.1), theta = structure(.Data = c(0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5, 0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5, 0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,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5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5), .Dim = c(100,32)) ) ######### This is the data list(N=100, M = 32, adj = c(2,3, 32, 1,3, 4, 31, 1,2,4,5, 30, 2, 3,5,6, 29, 3,4,6,7, 28, 4,5,7,8, 5,6,8,9, 6,7, 9,10, 7,8,10,11, 8,9,11,12, 9,10,12,13, 10,11,13,14,21, 11,12,14,15,20, 12,13,15,16,19, 13,14,16,18, 14,15,17, 16, 18,19, 17, 19,20,15, 17,18, 20,21,14, 18,19, 21,22, 13, 19,20, 22,23,12, 20,21, 23,24, 21,22, 24, 25, 22,23, 25,26, 23,24, 26,27, 24,25, 27,28, 25,26, 28,29, 26,27, 29,30,5, 27,28, 30,31, 4, 28,29, 31,32, 3, 29,30, 32, 2, 30,31, 1), num = c(3,4,5,5,5,4,4,4,4,4,4,5,5,5,4,3,3,4,5,5,5,4,4,4,4,4,4,5,5,5,4,3), sumNumNeigh = 136, n = c(5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5), W=structure(.Data = c(5,5,1,0,0,0,4,1,0,0,1,0,0,1,1,5,5,1,0,1,0,0,0,0,0,0,0,0,1,0,5,5,5,5,5,5,5,4,2,3,3,3,4,5,5,5,5,5,5,5,5,5,5,3,0,0,0,2,2,5,5,5,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,0,5,5,5,5,5,5,5,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,4,4,3,2,4,4,5,5,5,5,5,5,5,5,5,3,0,0,0,0,0,0,0,5,5,5,5,5,5,0,5,2,0,1,0,3,1,0,2,5,1,5,5,5,2,1,1,0,0,0,0,0,0,1,0,0,0,4,5,5,5,4,5,5,4,4,4,4,4,4,5,2,5,0,5,5,0,5,0,1,0,0,0,0,0,0,0,0,5,5,5,3,2,3,3,3,1,0,0,0,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62,40,47,42,40,63,55,62,27,34,60,34,29,45,43,40,41,46,51,39,48,64,51,63,49,64,51,54,48,38,38,51,67,45,61), female=c(0,0,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,1,1,1,1,1,0,1,0,1,1,1,1,0,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,0,1,1,1,0,0,1,0,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1), smoker = c(1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1), brfl = c(0,0,0,0,0,1,0,1,0,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,1,1,0,0,1,0,0,0,0,0,0,0,0,1,1,1,0,0,0) )