0
$\begingroup$

I'm trying to model Bayesian logistic regression model 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[i] ~ dbern(mu[i])
        mu[i]<-1/(1+exp(-(b0 + b1*age[i] )))
    } 
    # Prior on constant term, b0
    b0 ~ dnorm(0, 1.0E-4)        
    # Prior on regression coefficient, b1
    b1 ~ ddirch(1,1)      
}
$\endgroup$
1
$\begingroup$

The Dirchlet distribution describes a random vector of multiple components. In your case, the random parameter $\beta_1$ is a random varaible (i.e. a numeric valued random quantity). So you want to use a prior distribution that describes a random variable, the normal is one option.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.