An, W., and X. Wang. “LARF: Instrumental Variable Estimation of Causal Effects through Local Average Response Functions”. Journal of Statistical Software, Code Snippets, vol. 71, no. 1, July 2016, pp. 1-13, doi:10.18637/jss.v071.c01.