I have the following simple logistic regression model:

for (i in 1:length(target)) {

    target[i] ~ dbern(p[i])

    logit(p[i]) = int + b[1] * age[i] + b[2] * sex[i] + ...


  int ~ dnorm(0.0, 1.0/0.01)

  for (j in 1:13) {
    b[j] ~ dnorm(0.0, 1.0/0.01)

} "

and would like to check the residuals, if possible at all in this case, but conceptually I do not understand, how to do this. My first thought for getting the predicted values was to calculate the logit(p(i)) values from the means of the b values taken from the samples of the above model, and than applying a bern(...) function to it would give me the predicted target values. This does not seem right to me, as I would also need to take some kind of mean from the bernoulli distribution. I am a bit confused here. What is the solution here?



Your Answer

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

Browse other questions tagged or ask your own question.