Causal measures using generalized difference-in-difference approach with nonlinear models