This function takes prior / posterior draws of the Bayesian logit model, applies theinverse logit (logistic) transformation to obtain probabilities, and then generates random samples from binomial distributions.
logitRng(alpha, tau, beta, treat, X, N)
A vector of N samples of preditive draws
Numeric. A draw of alpha param from the logit model
Numeric. A draw of tau param from the logit model
Vector. A draw of beta params from the logit model
A 0 / 1 vector of treatment indicator
Data to be predicted
Numeric. Size of the sample, should depend on size of the data.