Educational attainment as a protective factor for psychiatric disorders