ESSAYS IN ADAPTIVE LEARNING AND MEAN-SQUARE STABILITY IN REGIME SWITCHING MODELS