If you are a young woman who hopes to earn as much as the men in your education cohort, is it more important to go to Stanford or to study (anywhere) computer science?

Obviously one could study computer science at Stanford, but for those who don't have that option, new research says that young women can close the income gap with men if they pursue lucrative majors (science, technology, mathematics and business). But those women who don't study in those fields and who enroll in elite institutions are destined to earn much less than their male counterparts.

The research has just been published in The Review of Higher Education (abstract available here) and it arrives at a time of much debate over how much students should be encouraged to enroll in certain fields.

In the study, more than 2,000 students -- randomly selected from the National Education Longitudinal Study -- were tracked by institution attended, field of study and post-graduation earnings up until the age of 26. Various control factors were used to compare similarly qualified students. The topic is important, write the two authors, because women on average lag men in salaries, earning about 82 cents for every dollar earned by a man -- and the gap is greater for those with at least a bachelor's degree. The two authors are Yingyi Ma, associate professor of sociology at Syracuse University, and Gokhan Savas, assistant professor of sociology at Luther College.

For women who attended elite institutions, the gender pay gap persists, they found. But for women who study in the lucrative majors, the pay gap disappears -- regardless of the prestige of the institution the women attend. And the impact appears to be strongest for disadvantaged women, who otherwise face large pay gaps with men.

It's not that women don't gain anything by attending an elite institution, Ma said in an interview, but men gain more. At non-elite institutions, the impact of education appears to be equal for men and women who pursue high-demand fields.

Because the study only tracks people up until age 26, she said, there is a chance that graduate education changes the equation.

Ma said that she believes the reason elite colleges don't close the gender gap is the greater access of male students at those institutions to connections that will help their careers. "A man with a history major can go to Wall Street and make a lot of money, but that's not the case for women," she said; a woman needs the business degree. "Fields of study appears to be the key."

She stressed that she was not saying women shouldn't attend top colleges or study non-lucrative majors. But she said that women for whom pay is a key factor -- especially perhaps for women from disadvantaged backgrounds -- need to know that there's more at play in their later earnings than where they go to college.