The advancement of underrepresented minority and women PhD students to elite postdoctoral and faculty positions in the STEM fields continues to lag that of majority males, despite decades of efforts to mitigate bias and increase opportunities for students from diverse backgrounds. In 2015, the National Science Foundation Alliance for Graduate Education and the Professoriate (NSF AGEP) California Alliance (Berkeley, Caltech, Stanford, UCLA) conducted a wide-ranging survey of graduate students across the mathematical, physical, engineering, and computer sciences in order to identify levers to improve the success of PhD students, and, in time, improve diversity in STEM leadership positions, especially the professoriate. The survey data were interpreted via path analysis, a method that identifies significant relationships, both direct and indirect, among various factors and outcomes of interest. We investigated two important outcomes: publication rates, which largely determine a new PhD students competitiveness in the academic marketplace, and subjective well-being. Women and minority students who perceived that they were well-prepared for their graduate courses and accepted by their colleagues (faculty and fellow students), and who experienced well-articulated and structured PhD programs, were most likely to publish at rates comparable to their male majority peers. Women PhD students experienced significantly higher levels of distress than their male peers, both majority and minority, while both women and minority student distress levels were mitigated by clearly-articulated expectations, perceiving that they were well-prepared for graduate level courses, and feeling accepted by their colleagues. It is unclear whether higher levels of distress in women students is related directly to their experiences in their STEM PhD programs. The findings suggest that mitigating factors that negatively affect diversity should not, in principle, require the investment of large resources, but rather requires attention to the local culture and structure of individual STEM PhD programs.