Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • openbugs model error

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 15
    Answer it

    Hi I hava a problem in running my openbugs model my model is:

    model
    {
    for(i in 1:N)
    {
    y[i] ~ dpois(mu[i])
    log(mu[i]) <- alpha + beta1*x1[i] + beta2*x2[i] +beta3*x3[i] + u[i] + v[i]
    u[i] ~ dnorm(0, precu)
    }
    v[1:N] ~ car.normal(adj[], weights[], num[], precv)
    for (k in 1:sumNumNeigh){ weights[k] <- 1}
    alpha ~ dflat()
    beta1 ~ dnorm(0,1.0E-5)
    beta2 ~ dnorm(0,1.0E-5)
    beta3 ~ dnorm(0,1.0E-5)
    precu ~ dgamma(0.001, 0.001)
    precv ~ dgamma(0.1, 0.1)
    sigmau<-1/precu
    sigmav<-1/precv
    }

    #liatticels
    #Data

    list(N=16, 
    num=c(1 ,2, 3, 2, 6, 4, 3, 4 ,3, 3, 6, 3, 4, 4, 7, 3),
    adj=c(4 ,
    15, 8, 
    13, 11, 15, 
    13, 1, 
    15, 10, 7, 12, 14, 8, 
    10, 9, 11, 15, 
    5, 12, 14, 
    2, 15, 5, 14, 
    16, 11, 6, 
    6, 15, 5, 
    15, 3, 6, 9, 16, 13, 
    7, 5, 14, 
    4, 16, 11, 3,
    8, 5, 12, 7, 
    3, 11, 6, 10, 5, 8, 2, 
    13, 11, 9
    ),
    y=c(5547,  7594, 17454, 8790, 3538, 4112, 8374, 14081, 5573, 12170, 7422, 3138, 5410, 7977, 115632, 2283 ),
    x1=c(28742, 50823, 48193, 74133, 16351, 18416, 72095, 58378, 
    31209, 13220, 41975, 15306, 22246, 49351, 179456, 16901),
    x2=c(91257, 141215, 139016, 242868, 46975, 54226, 206039, 167544, 92310, 42408, 125074, 43225, 69865, 140686, 523749, 52649),
    x3=c(3286, 3801, 9657, 5370, 1094, 1647, 5393, 6538, 2606, 8985, 3591, 1184, 4720, 4578, 55630, 1129),
    sumNumNeigh = 58)
    list(alpha=0, beta1=0.5, beta2=0.5, beta3=0.5, precv=0.01, precu=0.01),
    precu ~ dgamma(0.001, 0.001)
    precv ~ dgamma(0.1, 0.1)
    sigmau<-1/precu
    sigmav<-1/precv
     

    when I want to run it in openbugs It get error Please help me to fix it

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: