I'm trying to model Bayesian logistic regression model (using JAGS in R) with my dependent variable (status: 0=alive, 1 death) & independent variable (age) in the categorical form (0=patients < 65 yrs old, 1=patients >=65 yrs old). I'm using normal dist. as a prior for constant term, b0 and Dirichlet dist. as the prior for the regression coefficient,b1. However, i got the error of incorrect number of parameters in distribution ddirch. Am i using the correct prior for b1? or should i just assigned normal prior for it? Below are the codes i used:
# Bayesian logistic model for JAGS #
bayes.mod<-function(){
for( i in 1 : N ) {
status ~ dbern(mu)
mu<-1/(1+exp(-(b0 + b1*age )))
}
# Prior on constant term, b0
b0 ~ dnorm(0, 1.0E-4)
# Prior on regression coefficient, b1
b1 ~ ddirch(1,1)
}
# Bayesian logistic model for JAGS #
bayes.mod<-function(){
for( i in 1 : N ) {
status ~ dbern(mu)
mu<-1/(1+exp(-(b0 + b1*age )))
}
# Prior on constant term, b0
b0 ~ dnorm(0, 1.0E-4)
# Prior on regression coefficient, b1
b1 ~ ddirch(1,1)
}