In the DIC, the penalty term pD is generally described as being an 'effective

number of parameters.' However, in my recent modelling, the value of pD has

generally come out half as large as I expected. As an experiment, I ran the

following simple bilinear normal JAGS model using Rjags. (model text and R

code below). I'm pretty confident that this model has four parameters (one

intercept, two slopes, and a precision). Oddly, the call to DIC.out reports a

penalty of 2.0, suggesting that this model effectively has just two

parameters. Is there a missing factor of two in dic.samples? Am I

misinterpreting the meaning of pD? Are there really correlations among these

parameters such that the four actual parameters only contain the same

information as two independent parameters? Any comments would be greatly

appreciated. Thanks,

## JAGS model file

model{

b ~ dunif(-100,100)

m1 ~ dunif(-100,100)

m2 ~ dunif(-100,100)

tau ~ dgamma(.01,.01)

for(i in 1:Npoints)

{

y_~dnorm(b+m1*x1_+m2*x2_, tau)

}

}##End model

# RCode

library(rjags)

b_true = 20

m1_true=5

m2_true=12

tau_true = 1

Npoints=1e2

Nchains=3

x1=runif(Npoints,-100,100)

x2=runif(Npoints,-100,100)

y = b_true+m1_true*x1+m2_true*x2 + rnorm(Npoints, mean=0, sd=1/sqrt(tau_true))

data_list = list(x1,x2,y,Npoints)

names(data_list)<-c("x1","x2","y","Npoints")

jagsmodel= jags.model(

file = ".\SimpleBilinear.txt",

data = data_list,

n.chains=Nchains,

n.adapt=100)

coda.out = coda.samples(jagsmodel, c("b","m1","m2","tau"), n.iter=20e3,

thin=1)

DIC.out = dic.samples(jagsmodel, n.iter=40e3, thin=1, type="pD")