Learn R Programming

imt (version 1.0.0)

logitRng: 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)

Value

A vector of N samples of preditive draws

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.