Hello Statalist,
I have some questions regarding to my mediation analysis as I'm very new to Stata and not sure if I got this right.
My DV is an ordinal categorical variable (7-point Likert scale). However, my department is not very strict on treating this as a continuous variable so I could run OLS. My IV is a categorical variable with 3 conditions (2 treatments and 1 control; coded as 0,1,2). My mediator is a continuous variable (index scores that I compute from 12 items questionnaire).
I have followed this link; https://stats.idre.ucla.edu/stata/fa...e-sem-command/
And run the mediation analysis shown below;
*where pur_int = DV, condition = IV and Mediator_idx = MV
sem (mediator_idx <- condition) (pur_int <- mediator_idx condition)
(79 observations with missing values excluded)
Endogenous variables
Observed: mediator_idx pur_int
Exogenous variables
Observed: condition
Fitting target model:
Iteration 0: log likelihood = -2901.0187
Iteration 1: log likelihood = -2901.0187
Array
I am aware that my IV has 3 conditions. Therefore, I tried to put i.prefix on it. However, it doesn't work and I got this response from Stata;
sem (mediator_idx <- i.condition) (pur_int <- mediator_idx i.condition)
factor variables not allowed
r(101);
Therefore, I would like to ask Statalist on what command should I use when my IV has 3 conditions and how to interpret them.
Thank you very much in advance.
Related Posts with Mediation analysis with 3 conditions categorical IV
How to run the Stata code for specific number of observations in panel data?Because when running the code below, it seems that Stata takes a long time to run it, so I want to t…
Inverse Probability Weighing for Multiple TreatmentsHi all, I am trying to compute inverse probability weight for multiple treatments. But I am struggl…
Multiple imputation convergence not achievedHi all, I'm trying to perform chained multiple imputations but get an error message about convergen…
mediation effect and endogenousDear sir or madam: But I have some question about the mediation effect and endogenous: Is there a tr…
How to unassign a variable?When I take the residual by using Code: predict adj, residuals Next time I need to rename the vari…
Subscribe to:
Post Comments (Atom)
0 Response to Mediation analysis with 3 conditions categorical IV
Post a Comment