Essays in public economics and applied econometrics