Hi, I have questions about the implications of an interaction term and automatic centering in rstanarm for interpretation and prior specification.
I understand that rstanarm does automatic mean-centering of predictors during the estimation process (so that the mean of zero for prior_intercept makes sense) and then returns the estimates based on the original scale of these predictors (i.e., all regression coefficients and the constant are those for non-centered predictors).
I am not sure what rstanarm does when there is an interaction term. To my knowledge, the standard practice is first center the predictors to be interacted and then compute the product between them. For example, if there are two predictors X and Z, their centered version X_c and Z_c are used to create the interaction term X_cZ_c. X_cZ_c generally does not have a mean of zero, so it is generally different from the centered version of the interaction term between the non-centered predictors, XZ_c.
I understand using either XZ_c or X_cZ_c does not change the computation of predicted outcomes. But it generally produces different values for the coefficients for the interacted terms (X and Z) and the constant and, therefore, requires different prior specifications.
Given this general point, my questions specifically with respect to rstanarm are:
-
Does rstanarm center XZ during the estimation process, if I include the interaction term as an independent variable: y ~ x + z + xz, so that the mean of a prior for the constant captures the situation where all X, Z, and XZ are taking their mean values? What if I specify the model as: y ~ x*z? Will it internally centers X and Z but not the interaction term XZ during the estimation process, so that the mean of a prior for the constant captures the situation where only X and Z but not XZ are taking their mean values? Or will it be the same as when the model is y ~ x + z + xz?
-
Regardless of an answer to Q1, can I interpret rstamarm’s estimated (posterior samples of) coefficients of the interacted terms (X and Z) and the constant, as if they were computed without centering? Or does “y ~ x + z + xz” vs. “y ~ x*z” affect this interpretation?
-
Regardless of an answer to Q1, can I specify priors for the interacted terms (X and Z) as if they would be for non-centered versions? Or does “y ~ x + z + xz” vs. “y ~ x*z” affect this?
I would appreciate your help.
Akisato