Hello statalisters,

Using
Code:
 webuse womenwk
, one can estimate a Heckman model in gsem as outlined in the user manual.


Code:
generate selected = 0 if wage < . generate notselected = 0 if wage >= .
Code:
gsem (wage <- educ age L)(selected <- married children educ age L@1,family(gaussian, udepvar(notselected))), var(L@1 e.wage@a e.selected@a)
In case the response dependent variable was not wage (a continuous variable) but a binary dependent variable like minimum wage (ie the outcome is 1 if earns a minimum wage and 0 otherwise), what would be the appropriate syntax to use?