Three empirical essays on urban economics