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 avoid duplicates using rangejoin?Hello everyone! My goal is matching firms from two datasets with minimum difference in their Market…
Transpose (rotating) data by group (variable)Dear all, I need to transpose my dataset so that I can calculate the pairwise correlation matrix fo…
Filling a time-invariant dummy variable down for new years in panel data after expanding a datasetHi I am looking to fill in missing observations for a dummy variable for firms (which each have an …
Latent class analysis (LCA) plugin - assertion is false -errorHello, I've been trying to use the LCA plugin from Penn State for my analysis using Stata/IC. I succ…
stata2leaflet and stata2d3 -- updateI've recently written stata2leaflet 0.1.1, which uses the Mapbox API to get map tile images, and the…
Subscribe to:
Post Comments (Atom)
0 Response to Mediation analysis with -medeff-: Can a continuous or discrete treatment used in medeff?
Post a Comment