In a regression of y on a b c d
If I want to run regressions that satisfy the following conditions each time:
(1) both current values of b and lagged values of b are not zero; and also current and lagged values of c are not zero; I would use:
reg y a b c d if b!=0 & l.b!=0 & c!=0 & l.c!=0,r
But;
(2) if both current and lagged values of b are not zero and "either" current or lagged values of c are not zero;
reg y a b c d if b!=0 & l.b!=0 & c!=0 | l.c !=0
I think the problem here will be that Stata might run the regression either b and lagged b and c are not zero OR lagged c is not zero, and this is not my aim. My aim is run the regression if b and lagged b are not zero and either c or lagged c are non zero.
Comment