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?
svy: how to get mean and standard deviationHey all I am trying to get the mean and the standard deviation from a variable. I know how to do it…
Some questions about lsdvcGood evening, I m a Vietnamese girl. I am really happy to meet you all. I need your help on an issue…
Dropping dupliate dates by personHello, I am working with claims data and trying to drop duplicate dates by person in order to identi…
Nearest Neighbour matching with exact matches and without replacementDear all, without actually being interested in the estimation of a treatment effect, I want to find…
Guidance for estimating multilevel survival models with "mi" (multiple imputation)Dear Statalist members, I am using Stata 15.1 (last updated 15 oct 2018). I am asking for general a…
Subscribe to:
Post Comments (Atom)
0 Response to Mediation analysis with -medeff-: Can a continuous or discrete treatment used in medeff?
Post a Comment