Hi everyone,
I am currently testing a moderation model using SEM commands and intend to observe the effects at three levels of the moderator: (mean - 1 sd), (mean), and (mean + 1 sd). However, I'm not certain whether my codes are correct. Could you help, please?
************************************************** *******
Independent variable: x
Dependent variable: y
moderator: z
************************************************** *******
Here's my codes:
quietly sum z
global m=r(mean)
global s=r(sd)
sem (y <- controlvariable1 controlvariable2 controlvariable3 controlvariable4 x z xz ///
, cov(e.y) vce(r) iter(200)
nlcom (_b[y:x]+_b[y:z]+($m-$s)*_b[y:xz]) /* mean - 1 sd*/
nlcom (_b[y:x]+_b[y:z]+($m)*_b[y:xz]) /* mean */
nlcom (_b[y:x]+_b[y:z]+($m+$s)*_b[y:xz]) /* mean + 1 sd*/
************************************************** *******
If they are wrong, could you please help me correct them?
Thank you!"
I am currently testing a moderation model using SEM commands and intend to observe the effects at three levels of the moderator: (mean - 1 sd), (mean), and (mean + 1 sd). However, I'm not certain whether my codes are correct. Could you help, please?
************************************************** *******
Independent variable: x
Dependent variable: y
moderator: z
************************************************** *******
Here's my codes:
quietly sum z
global m=r(mean)
global s=r(sd)
sem (y <- controlvariable1 controlvariable2 controlvariable3 controlvariable4 x z xz ///
, cov(e.y) vce(r) iter(200)
nlcom (_b[y:x]+_b[y:z]+($m-$s)*_b[y:xz]) /* mean - 1 sd*/
nlcom (_b[y:x]+_b[y:z]+($m)*_b[y:xz]) /* mean */
nlcom (_b[y:x]+_b[y:z]+($m+$s)*_b[y:xz]) /* mean + 1 sd*/
************************************************** *******
If they are wrong, could you please help me correct them?
Thank you!"