makeAdditiveFormula(predictors, responses, env = parent.frame(), onMultipleResponse = "cbind", emptyResponsesOutput = stop("no response"))
predictors | a character vector listing the names of the predictor variables or a list of expressions to use as the predictor variables. |
responses | a character vector listing the names of the response variables or a list of expressions to use as the response variables. |
env |
the environment attribute of the returned formula is set to this environment.
Names in the formula not otherwise found are sought in this environment.
|
onMultipleResponse | a character string: either "cbind" or "+". If there are multiple responses, they should bind them together by a call to "cbind" (the common practice in modeling functions), or by calls to "+" (uncommon, but used in ftable). |
emptyResponsesOutput | if no response variables (or expressions) are listed, use this argument as a placeholder. The default action is to signal an error. You can supply NULL to mean that not having a response is acceptable. |
makeAdditiveFormula(predictors=c("Age", "Sex"), responses=c("Attitude")) makeAdditiveFormula(predictors=c("Town"), responses=c("NumCases", "Population"))