Analysis of behavioral traits in the presence of cultural transmission and assortative mating: Applications to IQ and SES