Generate a single formula for models like lm or a list of formula for models like systemfit.
bsFormu(name.y, name.x, intercept =TRUE,...)
Arguments
name.y: a character vector of variables names for dependent variables; when the length is more than one, there will a list of formula generated for each variable in the name.
name.x: a character vector of indepedent variables.
intercept: a logical value (default of TRUE) of whether to include intercept or not.
...: additional arguments to be passed.
Details
This function can generate a single formula for simple model like lm or a list of formula for systems (systemfit. Note that the right-hand side variables are the same for each dependent variable. If different, a for loop can be added by users to address that, as demonstrated by the example below.
Returns
a single formula object or a list of formula objects.