This paper investigates the extent to which international migration can be explained by climate change and whether this relationship varies systematically between groups of countries. The primary focus is to further investigate the heterogeneous effect found for countries with different income levels using a yearly migration dataset and allowing the country-grouping to be data-driven. For this purpose, a recently proposed statistical technique is used, the grouped fixed-effects (GFE) estimator, which groups the countries of origin according to the data generating process. The results indicate that, on average, increasing population-weighted temperatures are associated with an increase in emigration rates, but that the pattern differs between groups. The relationship is driven by a group of countries mainly located in Africa and Central Asia. No statistically robust association is found between population-weighted precipitation and emigration.