Helper function for building multivariate scglr formula.
NOTE: Interactions involving factors are not allowed for now. For interactions between two quantitative variables, use I(x*y) as usual.
multivariateFormula(Y, X =NULL,..., A =NULL, additional =NULL, data =NULL)
Arguments
Y: a formula or a vector of character containing the names of the dependent variables.
X: a vector of character containing the names of the covariates (X) involved in the components or a list of it.
...: additional groups of covariates (theme)
A: a vector of character containing the names of the additional covariates.
additional: logical (if A is not provided, should we consider last X to be additional covariates)
data: a data frame against which formula's variable will be checked
Returns
an object of class MultivariateFormula, Formula, formula with additional attributes: Y, X, A, X_vars, Y_vars,A_vars,XA_vars, YXA_vars, additional
Details
If Y is given as a formula, groups of covariates must be separated by | (pipes). To declare last group as additional covariates, one can use || (double pipes) as last group separator or set additional parameter as TRUE.