formula_builder {speccurvieR} | R Documentation |
Builds models formulae with every combination of control variables possible.
Description
Builds models formulae with every combination of control variables possible.
Usage
formula_builder(y, x, controls, fixedEffects = NA)
Arguments
y |
A string containing the dependent variable name. |
x |
A string containing the independent variable name. |
controls |
A vector of strings containing control variable names. |
fixedEffects |
A string containing the name of a variable to use for fixed effects, defaults to 'NA' indicating no fixed effects desired. |
Value
A vector of formula objects using every possible combination of controls.
Examples
formula_builder("dependentVariable", "independentVariable",
c("control1", "control2"));
formula_builder("dependentVariable", "independentVariable",
c("control1*control2"), fixedEffects="month");
[Package speccurvieR version 0.3.0 Index]