add as_vector argument for stanmodel@optimizing