#StackBounty: #bayesian #weights #stan #survey-weights #rstan Should weights be applied in generated quantities block in stan?

Bounty: 50

I want to do predictions via generated quantities block in stan. I have two questions:

  1. Should the weights be applied again in the generated quantities
    block in addition to the likelihood in the model block? (a) or (b)?
  2. What values of the variable weights should I use in the predictions (i.e., in generated quantities block)?

(a)

model{
      ...
      target +=  weights[i] * binomial_lpmf(...);
      ...
      }

generated quantities{
      ...
      y_pred[i] = weights[i] * inv_logit(...);
      ...
      }

(b)

 model{
        ...
        target +=  weights[i] * binomial_lpmf(...);
        ...
        }

 generated quantities{
        ...
        y_pred[i] = inv_logit(...);
        ...
        }

Thanks in advance for any help. Also, see here and here.


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.