What factors typically shaped the experience of immigrants in the United States? How did these factors differ among ethnic and racial groups?