A Flexible Parametric Approach to Estimating Switching Regime Models and Treatment Effect Parameters