Cox Estimation Code