Use this function to acquire the ER estimates from a LERCA fit for a set of exposure values.
1 2 |
dta |
The dataset including columns X (treatment), Y (outcome), and potential confounders named as C1, C2, ... |
cutoffs |
A 3-dimensional array with dimensions corresponding to chain, iteration, and number of points in the experiment configuration. |
coefs |
A 4-dimensional array with dimensions corresponding to chain, iteration, experiment, and variable. Variables are intercept, exposure, and the potential confounders. |
predict_at |
A vector of the exposure values we wish to predict ER at. If left NULL, a grid of length grid_length will be created. |
grid_length |
The number of locations we will predict the ER. Defaults to 100. |
mean_only |
Logical. Set to FALSE if we want the individual ER predictions. Set to TRUE if we are only interested in the posterior samples of the mean ER. Defaults to FALSE. |
other_function |
Whether we want to apply a different function to the predictions. Defaults to NULL. Examples include exp(x), log(x). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.