+ Reply to Thread
Results 1 to 3 of 3

Thread: Choosing prior for the regression coefficients in the logistic regression

  1. #1
    Points: 4, Level: 1
    Level completed: 7%, Points required for next Level: 46

    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Choosing prior for the regression coefficients in the logistic regression




    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[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)
    }

  2. #2
    TS Contributor
    Points: 18,889, Level: 87
    Level completed: 8%, Points required for next Level: 461
    CowboyBear's Avatar
    Location
    New Zealand
    Posts
    2,062
    Thanks
    121
    Thanked 427 Times in 328 Posts

    Re: Choosing prior for the regression coefficients in the logistic regression

    Sorry for the delay releasing your post - it was inadvertently caught in our spam filter.
    Matt aka CB | twitter.com/matthewmatix

  3. #3
    Omega Contributor
    Points: 38,374, Level: 100
    Level completed: 0%, Points required for next Level: 0
    hlsmith's Avatar
    Location
    Not Ames, IA
    Posts
    6,998
    Thanks
    398
    Thanked 1,186 Times in 1,147 Posts

    Re: Choosing prior for the regression coefficients in the logistic regression


    I will point out that I am not an expert in this area at all. I ran a similar model earlier in the year and most literature pointed to using normal priors in Bayesian logistic regression. Is your prior going to be flat, if so why not use normal priors?


    Also, for my own education, why are you opting to use Dirch, and how does it translate into a log odds value.


    Thanks.
    Stop cowardice, ban guns!

+ Reply to Thread

           




Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts






Advertise on Talk Stats