On Saturday, June 22, 2013 2:59:21 PM UTC-4, Noah wrote:
A few questions related to a conditional logistic regression.
1) Is there a way in Stan to model a conditional logistic regression? (I didn't see it in the manual)
I think Stan can do pretty much any regression, but the conditional logistic log-likelihood isn't programmed into Stan yet, so the log-likelihood would have to be evaluated using Stan code and manipulation of the lp__ symbol.
2) With a CLR, the posterior is a probability estimate of the outcome for each member of a group, with the within-group probabilities summing to 1. With many draws from the posterior, I will effectively have many draws of possible probabilities. (I have N draws of probabilities for K members of a race.) How would I then simulate outcomes? What is the probability of member i winning?
There is a good explanation of the probabilities and the likelihood here
http://www.stata.com/support/faqs/statistics/within-group-collinearity-and-clogit/To implement this in Stan, you will need to take logs to get the categorical log-likelihood and you probably want to use some of the log_sum_exp() tricks to prevent numerical overflow. In any event, once you get the posterior probabilities, you can just draw from categorical_rng() for each group.
3) I have probabilities of winning for each race member (from another model.) It would be interesting to treat those as priors for a model in Stan. However, I'm used to thinking about priors on the coefficients as drawn from some distribution, not actual point estimates of the outcomes. How would I set that up in Stan?
Does your model have predictors? If so, it is going to be pretty tedious to analytically derive the distribution of the coefficients conditional on the probability of winning. In Stan, you proceed numerically by adjusting lp__ by the log absolute Jacobian determinant of the transformation from probabilities to coefficients, but this is difficult at best.
Ben