This paper presents a methodology to identify net demand shocks as well as wage rigidities in heterogeneous labor markets on the basis of nonparametric regression. We show how this approach can be used to make suggestions for immigration policy in economies with labor market rigidities. In an application to western Germany it is demonstrated that nonparametric regression is feasible in higher dimensions with only a few thousand observations. In sum, labor markets able to absorb immigrants are characterized by above average age and by professional occupations. On the other hand, labor markets for young workers in service occupations are identified to exhibit rising unemployment due to wage rigidities and are therefore not recommended for immigration.