Dealing With Endogeneity in Threshold Models Using Copulas