logitRng {imt} | R Documentation |
Calculate logit link and sample from binomial distribution
Description
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.
Usage
logitRng(alpha, tau, beta, treat, X, N)
Arguments
alpha |
Numeric. A draw of alpha param from the logit model |
tau |
Numeric. A draw of tau param from the logit model |
beta |
Vector. A draw of beta params from the logit model |
treat |
A 0 / 1 vector of treatment indicator |
X |
Data to be predicted |
N |
Numeric. Size of the sample, should depend on size of the data. |
Value
A vector of N samples of preditive draws
[Package imt version 1.0.0 Index]