Hi Statalist Members,
I am using the following code to run some mediation analyses (single mediator) to my entire sample. I wondered whether it is possible to do a mediation analysis to a subsample of the same sample in Stata? I am using Stata 17.
sem (X -> M Y) (M -> Y)
Thank you.
Related Posts with How to do Mediation Analyses to Subsamples
convert time variable from; 'Jan 2018' to 'Jan'I want add a time variable that only shows the months in this format; 'Jan', 'Feb', .. So I have 2 t…
How to combine SDC Platinum/ThomsonOne with CRSP?I have a dataset from SDC containing 127 000 M&A bids, including announcement date, year, compan…
Lasso inference for cox regressionDear STATA team, I hope all is well. I was trying to do lasso inference for survival ,model. The va…
Error with Probit: outcome does not varyDear Statalists, I create a variable = 1 in case of treatment and = 0 in case of no treatment. Then…
Exporting Mean/Median of Variable X by variables Y and ZI am using data from the IPUMS-CPS ASEC series. I am looking to calculate the median income for each…
Subscribe to:
Post Comments (Atom)
0 Response to How to do Mediation Analyses to Subsamples
Post a Comment