When studying the relationship between independent variable and dependent variable , we want to know how impact . For this purpose, researchers proposed two types of basic “causal” mechanisms between and , mediation and moderation.
The simplest scenario: when everything is continuous
When is categorical
Suppose is a K-level categorical variable and dummy coded, the 1st category of is used as reference group. Combine these two equations we have When , , When , , , When , , , , When , , , Interested readers in more details about basic mediation analysis with categorical are referred to Hayes & Preacher (2014).
When dependent variable(s) is(are) categorical
When either or is, or both of them are categorical, the mediation analysis soon becomes much more complicated because logistic/probit regression involved, interested readers are referred to Breen et al. (2013).