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?
How to make Data Normal?I have applied the following commands to winsorize but still the data is not normal sum sizeofboard,…
medeff with continuous treatment intensityDear community, currently I want to conduct a mediation analysis in Stata using the medeff command.…
one less class in latent class analysis with -gsem-Is there anybody who can explain why this 3-classes LCA model with -gsem- command gives me only two …
coefplot subgraphs suppress variablesDear Stata users, I am using the user-written command coefplot to plot coefficients from 27 models …
Generate adjacency matrix in Mata and using it as input in StataDear all, I am using Stata 16 on Mac 10.14. I am currently working with two geocoded datasets. 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