Hi,
I have a dynamic model where the dependent variable is lagged. Therefore I am using system-GMM as an estimator. I am also using forward orthogonal deviations as the transformation as my panel is unbalanced. I also want to be able to vary the lags for the level instruments and the difference instruments independently. Therefore I am putting this into the Stata whilst varying the lags to get what I want:

xtabond2 lnex l.lnex lngdpchina lngdpother lndistance cp l.cp, gmm(lnex lngdpchina lngdpother, lag(2 3) equation(diff) collapse) gmm(lnex lngdpchina lngdpother, lag(2 4) equation(level) collapse) iv(cp l.cp lndistance) orthogonal robust

Is this correct or am I using the gmm option equation(level/diff) incorrectly?
Thank you.