Topics in econometrics and optimization