Links between Analysis of Surrogate Endpoints and Endogeneity