Between 1994 and 2006, the ratio of foreign-born scientists and engineers (FSE) to native scientists and engineers (NSE) doubled. I decompose this change into a migration effect (which accounts for migration in general), a proportional college effect (which accounts for the relative proportions of college graduates among migrant and native workers), and a proportional science and engineering (S&E) effect (which accounts for the relative proportions of S&Es among migrant and native college-educated workers). Results show that the migration effect explains about three-quarters of the increase in FSE/NSE during the entire period under study. The proportional S&E effect, which captures changes in the ratio as a result of immigration of S&Es in excess of what would be expected from general migration alone, was largest in 1995–1998, which were years of sustained economic growth. Conversely, a slower economy coincided with a declining proportional S&E effect after 2000. Increases in the annual cap on H-1B visas, an important avenue of entry for foreign-born S&Es, had little effect on the ratio. In short, during 1994–2006, the association between economic swings and the specific, more than proportional migration of S&Es was much stronger than the association between the latter and changes in the H-1B cap.