title: Hayes PROTEST moderation of X -> M, X->Y
as a 2-group model for X=0/1.
Combined model except beta5=0 and gamma4=0 (no c).
data:
file = protest.txt;
variable:
names = sexism liking respappr protest;
usev = sexism liking respappr protest;
grouping = protest(0=zero 1=one);
model:
liking on respappr sexism;
respappr on sexism;
model zero:
[liking] (k00);
liking on respappr (k01)
sexism (k02);
[respappr] (p00);
respappr on sexism (p01);
model one:
[liking] (k10);
liking on respappr (k11)
sexism (k12);
[respappr] (p10);
respappr on sexism (p11);
model constraint:
new(b1 b2 b4 b6 g0 g1 g2 g3);
b1=k01;
b2=k10-k00;
b4=k11-k01;
b6=k12-k02;
g0=p00;
g1=p10-p00;
g2=p01;
g3=p11-p01;
LOOP(z,4,6,0.1);
PLOT(indirect, direct);
indirect = (b1+b4*1)*(g1+g3*z);
direct = b2+b6*z+b4*(g0+g1*0+g2*z+g3*0*z);
plot:
type = plot3;
output:
sampstat;