The effectiveness of monetary policy in a regime-switching environment