A dataset containing the results of a conjoint survey of a representative sample of American adults who were asked to choose which hypothetical immigrants they think should be admitted into the United States. Each row corresponds to a single profile presented to the respondent. The dataset results from a mostly full factorial design with restrictions on two combinations of features. (1) Profile immigrants from CountryOfOrigin “India”, “Germany”, “France”, “Mexico”, “Philippines”, and “Poland” could be paired only with ReasonForApplication “Seek better job” or “Reunite with family”; profiles from the remaining countries could be paired with any ReasonForApplication. (2) Profile immigrants with Job “Financial Analyst”, “Computer Programmer”, “Research Scientist”, or “Doctor” could not be paired with Education levels “No Formal”, “4th Grade”, “8th Grade”, or “High School”. All other features were fully randomized against all other features.

data(immigration)

Format

A data frame (with additional “cj_df” class) with 13960 observations on the following 16 variables.

CaseID

a numeric vector indicating the respondent to which the particular profile corresponds

contest_no

a numeric vector indicating the number of the task to which the profile corresponds

Education

a factor with levels “No formal”, “4th grade”, “8th grade”, “High school”, “Two-year college”, “college Degree”, “Graduate degree”

Gender

a factor with levels “Female”, “Male”

CountryOfOrigin

a factor with levels “India”, “Germany”, “France”, “Mexico”, “Philippines”, “Poland”, “China”, “Sudan”, “Somalia”, “Iraq”

ReasonForApplication

a factor with levels “Reunite with family”, “Seek better job”, “Escape persecution”

Job

a factor with levels “Janitor”, “Waiter”, “Child care provider”, “Gardener”, “Financial analyst”, “Construction worker”, “Teacher”, “Computer programmer”, “Nurse”, “Research scientist”, “Doctor”

JobExperience

a factor with levels “None”, “1-2 years”, “3-5 years”, “5+ years”

JobPlans

a factor with levels “Will look for work”, “Contract with employer”, “Interviews with employer”, “No plans to look for work”

PriorEntry

a factor with levels “Never”, “Once as tourist”, “Many times as tourist”, “Six months with family”, “Once w/o authorization”

LanguageSkills

a factor with levels “Fluent English”, “Broken English”, “Tried English but unable”, “Used interpreter”

ChosenImmigrant

a numeric vector denoting whether the immigrant profile was selected

ethnocentrism

a numeric vector

profile

a numeric vector giving the profile number

LangPos

a numeric vector

PriorPos

a numeric vector

Source

Hainmueller, J., Hopkins, D., and Yamamoto T. 2014. “Causal Inference in Conjoint Analysis: Understanding Multi-Dimensional Choices via Stated Preference Experiments.” Political Analysis 22(1): 1-30. http://doi.org/10.1093/pan/mpt024

Note

This is a modified version of the hainmueller dataset available from the cjoint package.

See also

Examples

# \donttest{ data("immigration") # view constraints between features subset(cj_props(immigration, ~ Job + Education, id = ~ CaseID), Proportion == 0)
#> Job Education Proportion #> 5 Financial Analyst No Formal 0 #> 8 Computer Programmer No Formal 0 #> 10 Research Scientist No Formal 0 #> 11 Doctor No Formal 0 #> 16 Financial Analyst 4th Grade 0 #> 19 Computer Programmer 4th Grade 0 #> 21 Research Scientist 4th Grade 0 #> 22 Doctor 4th Grade 0 #> 27 Financial Analyst 8th Grade 0 #> 30 Computer Programmer 8th Grade 0 #> 32 Research Scientist 8th Grade 0 #> 33 Doctor 8th Grade 0 #> 38 Financial Analyst High School 0 #> 41 Computer Programmer High School 0 #> 43 Research Scientist High School 0 #> 44 Doctor High School 0
subset(cj_props(immigration, ~ ReasonForApplication + CountryOfOrigin, id = ~ CaseID), Proportion == 0)
#> ReasonForApplication CountryOfOrigin Proportion #> 3 Escape Persecution India 0 #> 6 Escape Persecution Germany 0 #> 9 Escape Persecution France 0 #> 12 Escape Persecution Mexico 0 #> 15 Escape Persecution Philippines 0 #> 18 Escape Persecution Poland 0
# AMCEs with interactions for constraints f1 <- ChosenImmigrant ~ Gender + Education * Job + LanguageSkills + CountryOfOrigin * ReasonForApplication + JobExperience + JobPlans + PriorEntry cj(immigration, f1, id = ~ CaseID)
#> outcome statistic feature level #> 1 ChosenImmigrant amce Gender Female #> 2 ChosenImmigrant amce Gender Male #> 3 ChosenImmigrant amce Educational Attainment No Formal #> 4 ChosenImmigrant amce Educational Attainment 4th Grade #> 5 ChosenImmigrant amce Educational Attainment 8th Grade #> 6 ChosenImmigrant amce Educational Attainment High School #> 7 ChosenImmigrant amce Educational Attainment Two-Year College #> 8 ChosenImmigrant amce Educational Attainment College Degree #> 9 ChosenImmigrant amce Educational Attainment Graduate Degree #> 10 ChosenImmigrant amce Job Janitor #> 11 ChosenImmigrant amce Job Waiter #> 12 ChosenImmigrant amce Job Child Care Provider #> 13 ChosenImmigrant amce Job Gardener #> 14 ChosenImmigrant amce Job Financial Analyst #> 15 ChosenImmigrant amce Job Construction Worker #> 16 ChosenImmigrant amce Job Teacher #> 17 ChosenImmigrant amce Job Computer Programmer #> 18 ChosenImmigrant amce Job Nurse #> 19 ChosenImmigrant amce Job Research Scientist #> 20 ChosenImmigrant amce Job Doctor #> 21 ChosenImmigrant amce Language Skills Fluent English #> 22 ChosenImmigrant amce Language Skills Broken English #> 23 ChosenImmigrant amce Language Skills Tried English but Unable #> 24 ChosenImmigrant amce Language Skills Used Interpreter #> 25 ChosenImmigrant amce Country of Origin India #> 26 ChosenImmigrant amce Country of Origin Germany #> 27 ChosenImmigrant amce Country of Origin France #> 28 ChosenImmigrant amce Country of Origin Mexico #> 29 ChosenImmigrant amce Country of Origin Philippines #> 30 ChosenImmigrant amce Country of Origin Poland #> 31 ChosenImmigrant amce Country of Origin China #> 32 ChosenImmigrant amce Country of Origin Sudan #> 33 ChosenImmigrant amce Country of Origin Somalia #> 34 ChosenImmigrant amce Country of Origin Iraq #> 35 ChosenImmigrant amce Reason for Application Reunite with Family #> 36 ChosenImmigrant amce Reason for Application Seek Better Job #> 37 ChosenImmigrant amce Reason for Application Escape Persecution #> 38 ChosenImmigrant amce Job Experience None #> 39 ChosenImmigrant amce Job Experience 1-2 Years #> 40 ChosenImmigrant amce Job Experience 3-5 Years #> 41 ChosenImmigrant amce Job Experience 5+ Years #> 42 ChosenImmigrant amce Job Plans Will Look for Work #> 43 ChosenImmigrant amce Job Plans Contract with Employer #> 44 ChosenImmigrant amce Job Plans Interviews with Employer #> 45 ChosenImmigrant amce Job Plans No Plans to Look for Work #> 46 ChosenImmigrant amce Prior Entry Never #> 47 ChosenImmigrant amce Prior Entry Once as Tourist #> 48 ChosenImmigrant amce Prior Entry Many Times as Tourist #> 49 ChosenImmigrant amce Prior Entry Six Months with Family #> 50 ChosenImmigrant amce Prior Entry Once w/o Authorization #> estimate std.error z p lower upper #> 1 0.000000000 NA NA NA NA NA #> 2 -0.026023159 0.008012413 -3.2478555 1.162783e-03 -0.041727199 -0.010319118 #> 3 0.000000000 NA NA NA NA NA #> 4 0.033068508 0.014957991 2.2107586 2.705256e-02 0.008464802 0.057672214 #> 5 0.057744013 0.014961024 3.8596296 1.135590e-04 0.033135318 0.082352709 #> 6 0.119483476 0.015101284 7.9121401 2.530014e-15 0.094644074 0.144322878 #> 7 0.163405352 0.023021124 7.0980613 1.265190e-12 0.125538972 0.201271732 #> 8 0.190036705 0.023063509 8.2397135 1.726235e-16 0.152100609 0.227972801 #> 9 0.176068029 0.016690780 10.5488200 5.143906e-26 0.148614139 0.203521918 #> 10 0.000000000 NA NA NA NA NA #> 11 -0.006814709 0.016856109 -0.4042872 6.860015e-01 -0.034540541 0.020911122 #> 12 0.014886098 0.016807256 0.8856947 3.757820e-01 -0.012759377 0.042531573 #> 13 0.013171373 0.016881360 0.7802317 4.352545e-01 -0.014595993 0.040938738 #> 14 0.063934683 0.029669127 2.1549229 3.116786e-02 0.015133311 0.112736054 #> 15 0.037824466 0.016818599 2.2489665 2.451463e-02 0.010160332 0.065488599 #> 16 0.073287616 0.016755639 4.3739076 1.220421e-05 0.045727043 0.100848190 #> 17 0.079101210 0.028507649 2.7747363 5.524648e-03 0.032210299 0.125992120 #> 18 0.084736815 0.016393509 5.1689249 2.354444e-07 0.057771893 0.111701737 #> 19 0.127636596 0.028525956 4.4744021 7.662543e-06 0.080715574 0.174557618 #> 20 0.157302433 0.028699701 5.4809781 4.229809e-08 0.110095626 0.204509241 #> 21 0.000000000 NA NA NA NA NA #> 22 -0.056319723 0.011312971 -4.9783317 6.413467e-07 -0.078492739 -0.034146707 #> 23 -0.126359527 0.011370259 -11.1131620 1.082569e-28 -0.148644825 -0.104074230 #> 24 -0.159740917 0.011589128 -13.7836870 3.195271e-43 -0.182455191 -0.137026643 #> 25 0.000000000 NA NA NA NA NA #> 26 0.047160626 0.016613446 2.8387021 4.529742e-03 0.019833938 0.074487313 #> 27 0.026912000 0.017321820 1.5536473 1.202686e-01 -0.001579859 0.055403858 #> 28 0.010474179 0.017517995 0.5979097 5.499002e-01 -0.018340358 0.039288716 #> 29 0.034025766 0.017421385 1.9531034 5.080734e-02 0.005370138 0.062681394 #> 30 0.032579818 0.017592545 1.8519105 6.403868e-02 0.003642657 0.061516979 #> 31 -0.016966177 0.020290794 -0.8361514 4.030697e-01 -0.050341563 0.016409210 #> 32 -0.042461230 0.020878509 -2.0337290 4.197892e-02 -0.076803321 -0.008119139 #> 33 -0.048329846 0.020574253 -2.3490450 1.882163e-02 -0.082171481 -0.014488211 #> 34 -0.112660797 0.020291946 -5.5519956 2.824267e-08 -0.146038079 -0.079283516 #> 35 0.000000000 NA NA NA NA NA #> 36 -0.038318972 0.008947040 -4.2828658 1.845014e-05 -0.053035544 -0.023602401 #> 37 0.055634454 0.016849569 3.3018325 9.605541e-04 0.027919380 0.083349528 #> 38 0.000000000 NA NA NA NA NA #> 39 0.065290374 0.011021037 5.9241587 3.139003e-09 0.043689538 0.086891210 #> 40 0.107817867 0.011563087 9.3243156 1.117022e-20 0.085154634 0.130481101 #> 41 0.113148256 0.011355436 9.9642368 2.185459e-23 0.090892010 0.135404502 #> 42 0.000000000 NA NA NA NA NA #> 43 0.124929937 0.011682877 10.6934219 1.092637e-26 0.102031918 0.147827955 #> 44 0.025217294 0.011770294 2.1424523 3.215710e-02 0.002147942 0.048286647 #> 45 -0.157301077 0.011744316 -13.3938053 6.572515e-41 -0.180319513 -0.134282642 #> 46 0.000000000 NA NA NA NA NA #> 47 0.055954954 0.012463168 4.4896253 7.134857e-06 0.031527594 0.080382315 #> 48 0.054748425 0.012912603 4.2399217 2.235978e-05 0.029440188 0.080056661 #> 49 0.075317887 0.012603718 5.9758467 2.288981e-09 0.050615054 0.100020720 #> 50 -0.110084275 0.013026767 -8.4506211 2.897573e-17 -0.135616269 -0.084552280
# }