Essays on nonlinear panel models with unobserved heterogeneity