Individual difference characteristics and contextual factors affecting educational attainment