An analysis of the determinants of occupational upgrading