clear set obs 200 generate x1 = runiform(-3,3) generate x2 = rlogistic() < (x1) logit x2 x1 generate y = rlogistic() < (x1 + x2) logit y x1 x2 gsem (y <- x1 x2, logit) (x2 <- x1, logit) nlcom _b[y:x2]*_b[x2:x1]