I am learning mediation analysis now. I have a question about variable types for mediation analysis. Supposed I have a dependent variable, Y, an independent variable, X, and a mediating variable, M. My first question is that if they are all dummay variables, can I use logistic regression for all steps?
Step 1: X -> Y, logistic regression
Step 2: X -> M, logistic regression
Step 3: X + M -> Y, logistic regression
My second question is whether I can include other control variables in these steps? For example, I have some control variables, alpha_i. Can I include alpha_i in these models? Or I should only use X,M, and Y three variables in my models?
Thanks for your help and suggestions.
