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?
Sum variables without loosing the remaining variables from the dataset.Good morning, I have the following variables in the data set: country_code, year, grid_cell (gid), …
reshape long-form to wide-formHI! I need to use the penal-data multinomial logit model in my analysis, and before I use the "xtmlo…
Calculate the difference in days between two tests while using the first test in each yearMy dataset includes information about tests students have taken on their last year in school. Here's…
Count number of obs per groupHi, my database is (partially) the following: Code: * Example generated by -dataex-. For more info…
Adjust for inflation using CPI indexI'd like to add a list of CPI index values to my panel dataset and use them to adjust the values of …
Subscribe to:
Post Comments (Atom)
0 Response to Mediation analysis with -medeff-: Can a continuous or discrete treatment used in medeff?
Post a Comment