| audit_formula | R Documentation | 
Audit the formula used for causal inference.
audit_formula(data, formula, exposure.name, extra.names)
data | 
 Dataframe of raw data.  | 
formula | 
 Formula with at least 1 exposure and 1 extra variable.  | 
exposure.name | 
 The name of the exposure variable.  | 
extra.names | 
 Character vector with the names of the extra variable.  | 
The formula and the variables used must be validated to avoid problems. All formula must have at least 1 outcome variable, 1 exposure variable and 1 extra variable. The extra variables can be confounds, instrumental variable, etc. depending on the context.
List with outcome.name, exposure.name and extra.names of variables.
out <- audit_formula(
 iris, formula = Sepal.Length ~ Species * Sepal.Width,
 exposure.name = "Species", extra.names = "Sepal.Width")
# return a list with all 3 variable names
stopifnot(length(out) == 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.