Converts a dataframe into a named list to provide data to a Stan model
createData(
data,
y,
treatment,
x = NULL,
eta_mean = 0,
eta_sd = 1,
run_estimation = 1
)
Returns stan_data
a named list providing the data for the stan model
The data frame to be used
The name of the outcome variable in the data frame
The name of the treatment indicator variable in the data frame
A vector of names of all covariates to be used in the data frame
The prior mean to be used for estimating the treatment effect
The prior standard deviation to be used for estimating the treatment effect
Whether to run the estimation, or merely draw data from the priors