Description Usage Arguments Value
Creates mean-centered and/or double-mean-centered
product indicators. Additionally centers all variables in
data
1 | product_ind(data, vars1, vars2, bind = TRUE, method = c("single", "double"))
|
data |
A data frame. |
bind |
Logical. If |
method |
Character vector with options "single" and "double".
If "single" is included, the matched products of |
var1, var2 |
Character vectors naming the variables to be multiplied together. |
A data frame. If bind = TRUE
, all centered variables
of data
and all product indicators are appended to the the
original data frame. The merged data frame is returned. If
bind = FALSE
, only the centered variables and product
indicators are returned in a data frame.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.