Hi Everyone,
I was wondering if anyone had experience or could help me create a graph for a three-way interaction between two continuous variables (sleep and depression scores) and one categorical variable (sex) after an SEM command.
Here is what I have tried so far and the error I ran into:
However, I get the error that
Any guidance or help would be greatly appreciated!
I was wondering if anyone had experience or could help me create a graph for a three-way interaction between two continuous variables (sleep and depression scores) and one categorical variable (sex) after an SEM command.
Here is what I have tried so far and the error I ran into:
Code:
sem (c_sat_composite <- c_cesd_wthsleep c_avg_sleepdis c_depXsleep c_depXsex c_sleepXsex c_depXsleepXsex ce_rage rasex rarace ///
ramari ra_edu emp_status smoking_now alcohol_ever meds_use diff_func gn_health rate_memory), allmissing method(mlmv)
*Graph Significant 3-way interaction
margins rasex, at(c_cesd_wthsleep==(0(1)7) c_avg_sleepdis=(0(1)2))
marginsplot, by(rasex) noci xdimension(c_cesd_wthsleep)
Code:
factor 'rasex' not found in list of covariates

Comment