I am estimating a stochastic frontier with a mixed model. So far the half normal distribution worked good but I need a truncated normal distribution. It does not work, and I receive the error „Expected collection operator c“. I am using R2WinBUGS and as you can see in the model I have tried OpenBUGS and WinBUGS. Any suggestion? My model looks like:
for (i in 1:N)
{
mu[i] <- alpha + x[i,1]*beta[1] + x[i,2]*beta[2] + x[i,3]*beta[3] +
x[i,4]*beta[4] + x[i,5]*beta[5] + u0[county[i]] + u1[county[i]]*x[i,1] +
u2[county[i]]*x[i,2] + u3[county[i]]*x[i,3] + u4[county[i]]*x[i,4] +
u5[county[i]]*x[i,5] - z[ID[i]]
y[i] ~ dnorm(mu[i], tau)
}
for (i in 1:220) {
z[i] ~ djl.dnorm.trunc(rho,lambda,0,1000)
z[i] ~ dnorm(rho,lambda)T(0,100) #For openbugs
eff[i] <- exp(-z[i])
}
prior for rho~dnorm(0,0.027)
I would appreciate your help! Regards, Daniel
djl.dnorm.trunc
looks suspicious to me. Why don't you use thednorm(..)I(..)
here also? $\endgroup$