Dear Statalist,
Hello! I would like to conduct a mediation analysis with the help of -medeff- command in STATA.
My treatment (T) is a discrete variable that can take 0, 2, 4, and 7. The mediator (M) and the outcome (Y) is a continuous variable.
Code(simply), medeff (regress M T x) (regress Y T M x), mediate(M) treat(T) sims(1000) seed(1)
However, I am not sure whether the X needs to be a binary variable. when I checked the -help medeff-, I finded -medeff- command,treat (varname [# #]) is required and specifies the treatment variable to use in the analysis, where the numbers following the treatment name are values to use for the control and treatment conditions, respectively. By default, these are set to 0 and 1.
Should I use the command -medeff- for my models with a discrete treatment (which can take values of 0, 2, 4, and 7)? If not, I sincerely hope you can give me any suggestions on this matter. Thank you a lot!
Best wishes.
Joan Xiao
Related Posts with Mediation analysis with -medeff-: Can a continuous or discrete treatment used in medeff?
Non stationary data transformation questionSo I have some panel data, investment in different regions over the course of a 7 years. It's non st…
Remove duplicate observationsHi all, I use data from the American Housing Survey and I have the following issue with preparing t…
xtgee outputHi how can I find the variance of the mean after xtgee? should I use SE to get Variance or is there …
Fixed effect vs random effect vs OLSDear Sir, I have yearly panel data from 2008-2018 and 63 companies. My variables are: Dependent- ex…
Combine 2 variables 'year', 'month' into 1 quarterly variableHi all, I need to analyze quarterly data, but I have only variables 'year' and 'month' in my data …
Subscribe to:
Post Comments (Atom)
0 Response to Mediation analysis with -medeff-: Can a continuous or discrete treatment used in medeff?
Post a Comment