An Instrumental Variable Approach to Dynamic Models