createData | R Documentation |
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
)
data |
The data frame to be used |
y |
The name of the outcome variable in the data frame |
treatment |
The name of the treatment indicator variable in the data frame |
x |
A vector of names of all covariates to be used in the data frame |
eta_mean |
The prior mean to be used for estimating the treatment effect |
eta_sd |
The prior standard deviation to be used for estimating the treatment effect |
run_estimation |
Whether to run the estimation, or merely draw data from the priors |
Returns stan_data
a named list providing the data for the stan model
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.