Three essays on econometrics of heterogeneous effects