Path analysis for discrete variables: the role of education in social mobility