First Republic Interview Question

Coding for regression and R programming