Hello,
I am trying to use a non linear combination to estimate an indirect effect in of X onto Q, via T (T is the mediator), at the mean of X. I am using the command nlcom
The code i am using is the following:
xtreg Q X <CONTROLS> i.YEAR, fe
est store M1
xtreg Q X T <CONTROLS> i.YEAR if, fe
est store M2A
xtreg T X <CONTROLS> i.YEAR, fe
est store M2B
global X_mean=r(mean)
global X_stdev=r(sd)
nlcom _b[M1:X]*[X_mean] - _b[M2A:MD]*[X_mean].
STATA displays the following error message: equation M1 not found
r(111);
Note: Please note that "<CONTROLS>" is not included in the code (it's my way of indicating in the forum that there are many control variables in the model).
Can anybody assist me? Many thanks in advance!
Kind regards,
Joao
I am trying to use a non linear combination to estimate an indirect effect in of X onto Q, via T (T is the mediator), at the mean of X. I am using the command nlcom
The code i am using is the following:
xtreg Q X <CONTROLS> i.YEAR, fe
est store M1
xtreg Q X T <CONTROLS> i.YEAR if, fe
est store M2A
xtreg T X <CONTROLS> i.YEAR, fe
est store M2B
global X_mean=r(mean)
global X_stdev=r(sd)
nlcom _b[M1:X]*[X_mean] - _b[M2A:MD]*[X_mean].
STATA displays the following error message: equation M1 not found
r(111);
Note: Please note that "<CONTROLS>" is not included in the code (it's my way of indicating in the forum that there are many control variables in the model).
Can anybody assist me? Many thanks in advance!
Kind regards,
Joao
Comment