Hi all,

I am trying to estimate the ATE of an IPW model by writing a GMM code. I am having trouble writing the moment conditions.

gmm (eq1: treatment - invlogit({xb: $xt _cons})) (eq2: (treatment - invlogit({xb: $xt _cons})/((invlogit({xb: $xt _cons})*(1 - invlogit({xb: $xt _cons})))))-{ate}), instruments($xt) onestep

But stata doesn't like them.

Could someone point me in the right direction?

Thanks