Estimation of weak ARMA models with regime changes