Organize Data Notebook

Authors
Affiliations

University of Oregon

Jenifer Bratter

Rice University

Code
timestamp()
##------ Wed Apr 23 11:37:59 2025 ------##
Code
# this should anyone to access the data
drive_deauth()

Introduction

This notebook documents the process of reading American Community Survey data from IPUMS and converting it to a set of “marriage market” data that can be used to model marriage choices, using the fakeunion package. To do that I need three datasets:

  1. A dataset of actual recent marriages with symmetrical information about each spouse. I am only looking at opposite-sex unions for this analysis.
  2. A dataset of potential male partners that is made up of those recently married (from 1) and currently single people (those not in cohabitation or less recent marriages). This dataset should contain all the same information about these men as the husbands from (1).
  3. A dataset identical to (2) but for potential female partners.

I set up a few key parameters right at the top of the document

Code
set.seed(39)
years_mar <- 5   # limit on the duration of marriages that will be identified
n_samples <- 5  # number of separate marriage markets to construct
n_fakes   <- 7   # number of fake unions to generate for each real one

Next, I set up several functions that will be useful for coding the data. Since I have to repeat the same coding for several variables on both partners in a union, it makes sense to put that coding into a function to minimize code and the risk of error.

Code
# since I have to code the same variable for both spouses, it makes sense to put
# this coding into a function

code_race <- function(raced, hispand) {
  # We want to take the raced and hispand variables and code them into a combined
  # race variable. I am going to use the fullest possible coding here. 
  race <- case_when(
    # Latino trumps everything, because combined question, sigh
    # However, we will split them into Latino, Single Race and Latino, 
    # Multiple Race - CORRECTION, we will do this as a sensitivity analysis
    # but its not showing any real differences, so we will leave as one to 
    # simplify main analysis
    #hispand>0 & hispand<900 & raced>=800 ~ "Latino, Multiple Race",
    #hispand>0 & hispand<900 & raced<800 ~ "Latino, Single Race",
    hispand>0 & hispand<900 ~ "Latino",
    # white and black are easy
    raced==100 ~ "White",
    raced==200 ~ "Black",
    # for indigenous we get all AIAN, Pacific Islanders, and the one multiracial
    # combo of them (855)
    (raced>=300 & raced<400) | (raced==630 | (raced>=680 & raced<=699)) | 
      raced==855 ~ "Indigenous",
    # Asian - also need to grab a couple of multiracial response which are 
    # really multiethnic Asian
    ((raced>=400 & raced<=679) | raced %in% c(869, 887)) ~ "Asian",
    # Biracial groups
    raced==801 ~ "White-Black",
    (raced>=810 & raced<=819) ~ "White-Asian",
    (raced>=831 & raced<=838) ~ "Black-Asian",
    # for all part Indigenous groups we need to get the part AIAN and part PI
    raced==802 | (raced>=820 & raced<=825) ~ "White-Indigenous",
    raced==830 | (raced>=840 & raced<=842) ~ "Black-Indigenous",
    (raced>=850 & raced<=854) | (raced>=860 & raced<=868) ~ "Asian-Indigenous",
    TRUE ~ NA_character_
  )
  
  race <- factor(race, 
                 levels=c("White","Black","Indigenous","Asian", "Latino",
                          "White-Black","White-Indigenous","White-Asian",
                          "Black-Indigenous","Black-Asian","Asian-Indigenous"))
  
  return(race)
}


code_educ <- function(educd) {
  # We want to re-code the educd variable into the following simple
  # categories:
  # - Less than high school diploma
  # - High school diploma
  # - Some college, but less than a four year degree
  # - Four year college degree or more
  educ <- ifelse(educd<60, "LHS",
                 ifelse(educd<=65, "HS",
                        ifelse(educd<=90, "SC",
                               ifelse(educd<=999, "C", 
                                      NA))))
  educ <- factor(educ,
                 levels=c("LHS","HS","SC","C"),
                 ordered=TRUE)
  return(educ)
}

code_bpl <- function(bpld) {
  #recode any one born in the US (99 or less) as a single number. Otherwise
  #we will be fitting state level endogamy. also code in missing values
  
  # The general codes are way to general. The detailed codes have some
  # overspecifity in the codes, but not in the actual data used here.
  return(ifelse(bpld>=95000, NA, 
                ifelse(bpld<10000,1,bpld)))
}

code_language <- function(language) {
  #I need to use the detailed language codes as the general language codes 
  #are too general. However the detailed language codes are too detailed in 
  #some places, particularly in translating between the two time periods. Thus
  #I make some corrections to the detailed codes for consistency between the
  #two time periods.
  
  # We don't need to code language as a factor variable with labels because
  # ultimately all we need to know is whether the two partners speak the same
  # language. We should however code in any missing values (0), although 
  # there do not appear to be any.
  
  lang_recode <- language
  
  #the following cases will be collapsed to the their top two digit codes
  #(starting at the 100 levels)
  #1:27 - European language groups (e.g. English, French, German)
  #35: Uralic
  #37: Other Altaic
  #43: Chinese
  #47: Thai/Siamese/Lao (not separable in 1980)
  #52: Indonesian
  #53: Other Malay
  #58:  Near East Arabic Dialect
  collapsed_cases <- c(1:24,35,37,43,47,52,53,58)
  collapsed_language <- floor(language/100)
  lang_recode <- ifelse(collapsed_language %in% collapsed_cases,
                        collapsed_language*100, lang_recode)
  
  #A couple of cases need to be put back into there other categories
  #420: Afrikaans
  #1140: Haitian Creole
  #1150: Cajun
  #2310: Croatian
  #2320: Serbian
  uncollapsed_cases <- c(420,1140,1150,2310,2320)
  lang_recode <- ifelse(language %in% uncollapsed_cases,
                        language, lang_recode)
  
  #put malay and other malay together
  lang_recode <- ifelse(language==5270, 5300, lang_recode)
  
  #collapse Hindi and Urdu into 3101 (Hindustani)
  lang_recode <- ifelse(language>3101 & language<=3104, 3101, lang_recode)
  
  #For 1980 consistency put all American Indian languages in one group
  lang_recode <- ifelse(lang_recode>7000 & lang_recode<=9300, 7000, 
                        lang_recode)
  
  #A few cases are "other" or "nec". These will be recoded as -1 and
  #not treated as endogamy with each other
  nec_codes <- c(3140,3150,3190,5290,5590,6200,6390,6400,9400,9410,9420,9500,
                 9600,9601,9602,9999)
  lang_recode <- ifelse(lang_recode %in% nec_codes, -1, lang_recode)
  
  #code any missing values 
  lang_recode <- ifelse(lang_recode==0, NA, lang_recode)
  
  return(lang_recode)
  
}

code_generation <- function(bpl, age, year, yr_usa) {
  
  # first, calculate age of entry into the US, NA for all non-migrants
  age_usa <- age-yr_usa
  # check
  #tapply(age_usa, bpl>1, mean)
  #summary(age_usa)
  # some of these responses are as negative as -5. -1 is expected because of
  # the crudeness of calendar year vs birthdays. Almost all of the values 
  # greater than -1 are for year of migration prior to 1940, which is top-coded
  # in the data, so I think those make sense as well. In those cases, we will
  # just replace with zero.
  age_usa <- ifelse(age_usa<0, 0, age_usa)
  
  # now we can code our generations. All native-borns are 2nd+.
  generation <- case_when(
    is.na(bpl) ~ NA_character_,
    bpl==1 ~ "2nd+",
    age_usa<6 ~ "1.75",
    age_usa<13 ~ "1.5",
    age_usa<18 ~ "1.25",
    !is.na(age_usa) ~ "1st"
  )
  
  generation <- factor(generation,
                       levels=c("1st","1.25","1.5","1.75","2nd+"))
    
  # checks
  #summary(generation)
  #table(bpl>1, generation, exclude=NULL)
  #tapply(age_usa, generation, min)
  #tapply(age_usa, generation, max)

  return(generation)
}

Read in the data

The data are ACS data from 2010-2019, extracted via IPUMS. Below, I show all variables and their position in the files.

  Variable                         Columns        Len   2010    2011    2012    2013    2014    2015    2016    2017    2018    2019    
  YEAR                         H   1-4            4     X       X       X       X       X       X       X       X       X       X       
  SAMPLE                       H   5-10           6     X       X       X       X       X       X       X       X       X       X       
  SERIAL                       H  11-18           8     X       X       X       X       X       X       X       X       X       X       
  CBSERIAL                     H  19-31          13     X       X       X       X       X       X       X       X       X       X       
  HHWT                         H  32-41          10     X       X       X       X       X       X       X       X       X       X       
  CLUSTER                      H  42-54          13     X       X       X       X       X       X       X       X       X       X       
  STATEFIP                     H  55-56           2     X       X       X       X       X       X       X       X       X       X       
  COUNTYFIP                    H  57-59           3     X       X       X       X       X       X       X       X       X       X       
  PUMA                         H  60-64           5     X       X       X       X       X       X       X       X       X       X       
  MET2013                      H  65-69           5     X       X       X       X       X       X       X       X       X       X       
  STRATA                       H  70-81          12     X       X       X       X       X       X       X       X       X       X       
  GQ                           H  82              1     X       X       X       X       X       X       X       X       X       X       
  PERNUM                       P  83-86           4     X       X       X       X       X       X       X       X       X       X       
  PERWT                        P  87-96          10     X       X       X       X       X       X       X       X       X       X       
  SEX                          P  97              1     X       X       X       X       X       X       X       X       X       X       
  AGE                          P  98-100          3     X       X       X       X       X       X       X       X       X       X       
  MARST                        P 101              1     X       X       X       X       X       X       X       X       X       X       
  MARRNO                       P 102              1     X       X       X       X       X       X       X       X       X       X       
  YRMARR                       P 103-106          4     X       X       X       X       X       X       X       X       X       X       
  RACE                         P 107              1     X       X       X       X       X       X       X       X       X       X       
  RACED                        P 108-110          3     X       X       X       X       X       X       X       X       X       X       
  HISPAN                       P 111              1     X       X       X       X       X       X       X       X       X       X       
  HISPAND                      P 112-114          3     X       X       X       X       X       X       X       X       X       X       
  BPL                          P 115-117          3     X       X       X       X       X       X       X       X       X       X       
  BPLD                         P 118-122          5     X       X       X       X       X       X       X       X       X       X       
  YRIMMIG                      P 123-126          4     X       X       X       X       X       X       X       X       X       X       
  LANGUAGE                     P 127-128          2     X       X       X       X       X       X       X       X       X       X       
  LANGUAGED                    P 129-132          4     X       X       X       X       X       X       X       X       X       X       
  EDUC                         P 133-134          2     X       X       X       X       X       X       X       X       X       X       
  EDUCD                        P 135-137          3     X       X       X       X       X       X       X       X       X       X       
  PERNUM_SP                    P 138-141          4     X       X       X       X       X       X       X       X       X       X       
  SEX_SP                       P 142              1     X       X       X       X       X       X       X       X       X       X       
  AGE_SP                       P 143-145          3     X       X       X       X       X       X       X       X       X       X       
  RACED_SP                     P 146-148          3     X       X       X       X       X       X       X       X       X       X       
  HISPAND_SP                   P 149-151          3     X       X       X       X       X       X       X       X       X       X       
  BPLD_SP                      P 152-156          5     X       X       X       X       X       X       X       X       X       X       
  YRIMMIG_SP                   P 157-160          4     X       X       X       X       X       X       X       X       X       X       
  LANGUAGED_SP                 P 161-164          4     X       X       X       X       X       X       X       X       X       X       
  EDUCD_SP                     P 165-167          3     X       X       X       X       X       X       X       X       X       X       

Now, I am ready to read the data in. Because the dataset is very large, the data are currently stored on Google Drive and accessed using the googledrive library. A local copy is downloaded, read in, and then deleted.

Code
# where the downloaded data will live (temporarily)
file_path <- here("data","data_raw","acs.dat.gz")

# download the data file
drive_download(as_id("15jz02cevyTvLvGoyivrhQ5AU_lN8Z6Xu"), path=file_path)
File downloaded:
• 'usa_00139.dat.gz' <id: 15jz02cevyTvLvGoyivrhQ5AU_lN8Z6Xu>
Saved locally as:
• '/home/aarong/projects/research/multiracial_intermar/data/data_raw/acs.dat.gz'
Code
acs <- read_fwf(file_path,
                col_positions = fwf_cols(
                  YEAR = c(1, 4),
                  SERIAL = c(11, 18),
                  HHWT = c(32, 41),
                  STATEFIP = c(55, 56),
                  COUNTYFIP = c(57, 59),
                  PUMA = c(60, 64),
                  MET2013 = c(65, 69),
                  PERNUM = c(83, 86),
                  SEX = 97,
                  AGE = c(98, 100),
                  MARST = 101,
                  MARRNO = 102,
                  YRMARR = c(103, 106),
                  RACED = c(108, 110),
                  HISPAND = c(112, 114),
                  BPLD = c(118, 122),
                  YRIMMIG = c(123, 126),
                  LANGUAGED = c(129, 132),
                  EDUCD = c(135, 137),
                  PERNUM_SP = c(138, 141),
                  SEX_SP = 142,
                  AGE_SP = c(143, 145),
                  RACED_SP = c(146, 148),
                  HISPAND_SP = c(149, 151),
                  BPLD_SP = c(152, 156),
                  YRIMMIG_SP = c(157, 160),
                  LANGUAGED_SP = c(161, 164),
                  EDUCD_SP = c(165, 167)
                ),
                col_types = cols(.default = "i", HHWT="d"), 
                progress = FALSE)

# now that the data are loaded, delete
file.remove(file_path)
[1] TRUE

Code variables

Code
table(acs$COUNTYFIP != 0, acs$MET2013 != 0)
       
           FALSE     TRUE
  FALSE  5985337  4136095
  TRUE    629571 14112354

The table above shows the cases where county and/or metro area are identifiable in the full data. We have considerably more cases where metro area is identifiable than county is identifiable.

I recode, create, and clean all of the variables that I need in one mutate call. Embedded comments should provide more details. I will check my coding below.

Code
acs <- acs |> 
  mutate(
    ## unique ids for each respondent ##
    id = SERIAL*1000000+PERNUM*10000+YEAR,
    id_sp = ifelse(is.na(PERNUM_SP),NA,
                    SERIAL*1000000+PERNUM_SP*10000+YEAR),
    ## sex of respondent and spouse ##
    sex = ifelse(SEX==1, "Male", ifelse(SEX==2, "Female", NA)),
    sex_sp = ifelse(SEX_SP==1, "Male", ifelse(SEX_SP==2, "Female", NA)),
    ## age of respondent and spouse ##
    age=AGE,
    age_sp=AGE_SP,
    ## marital status of respondent ##
    mar_stat=factor(MARST, levels=1:6, 
                    labels=c("Married, spouse present", "Married, spouse absent",
                             "Separated","Divorced","Widowed","Never married")),
    ## race of respondent and spouse - see details in code_race function ##
    race = code_race(RACED, HISPAND),
    race_sp = code_race(RACED_SP, HISPAND_SP),
    ## education of respondent and spouse - see code_educ function for details ##
    educ = code_educ(EDUCD),
    educ_sp = code_educ(EDUCD_SP),
    ## language of respondent and spouse - see code_lang for details ##
    lang = code_language(LANGUAGED),
    lang_sp = code_language(LANGUAGED_SP),
    ## marriage market id ##
    # we do marriage market with a cascading logic. First, we check for 
    # met2013. If this is identifiable, then we assign the metro area. Second,
    # for cases without met2013, we look for county and if identiable, then
    # we assign it. Third, if we have neither metro area or county, we assign
    # PUMA
    mar_market = case_when(
      MET2013 != 0 ~ paste("M", MET2013, YEAR, sep = "."),
      COUNTYFIP != 0 ~ paste("C", STATEFIP, COUNTYFIP, YEAR, sep = "."),
      TRUE ~ paste("P", STATEFIP, PUMA, YEAR, sep = ".")
    ),
    # a simpler alternative would be to use state
    #mar_market = paste(STATEFIP, YEAR, sep=""),
    ## marriage duration ##
    dur_mar = ifelse(YRMARR==0, NA, YEAR - YRMARR),
    ## country of birth of respondent and spouse - see code_bpl for details ##
    bpl = code_bpl(BPLD),
    bpl_sp = code_bpl(BPLD_SP),
    ## Years in the USA - missing for natives ##
    yr_usa = ifelse(YRIMMIG==0, NA, YEAR-YRIMMIG),
    yr_usa_sp = ifelse(YRIMMIG_SP==0, NA, YEAR-YRIMMIG_SP),
    ## immigrant generation - see code_generation for details ##
    immig_gen = code_generation(bpl, age, YEAR, yr_usa),
    immig_gen_sp = code_generation(bpl_sp, age_sp, YEAR, yr_usa_sp)
  )

Ok, now I check to make sure all of my coding worked as expected. This is a long section because the output is often quite large.

Code
options(max.print=10000)

# Do we have any duplicates in our ids?
sum(duplicated(acs$id))
[1] 0
Code
sum(duplicated(na.omit(acs$id_sp)))
[1] 0
Code
# check sex
table(acs$sex, acs$SEX, exclude=NULL)
        
                1        2
  Female        0 12881384
  Male   11981973        0
Code
table(acs$sex_sp, acs$SEX_SP, exclude=NULL)
        
                1        2     <NA>
  Female        0  7111457        0
  Male    7109258        0        0
  <NA>          0        0 10642642
Code
# check mar_stat
table(acs$mar_stat, acs$MARST, exclude=NULL)
                         
                                 1        2        3        4        5        6
  Married, spouse present 12859808        0        0        0        0        0
  Married, spouse absent         0   550033        0        0        0        0
  Separated                      0        0   463526        0        0        0
  Divorced                       0        0        0  2800373        0        0
  Widowed                        0        0        0        0  1737851        0
  Never married                  0        0        0        0        0  6451766
Code
# check age
summary(acs$age)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  18.00   34.00   50.00   49.49   63.00   97.00 
Code
summary(acs$age_sp)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
      15       39       52       52       63       97 10642642 
Code
# check educ
table(acs$EDUCD, acs$educ, exclude=NULL)
     
          LHS      HS      SC       C
  2    353763       0       0       0
  11     4264       0       0       0
  12     5102       0       0       0
  14    11695       0       0       0
  15    24418       0       0       0
  16    53713       0       0       0
  17    42663       0       0       0
  22    61174       0       0       0
  23   219247       0       0       0
  25    95859       0       0       0
  26   309624       0       0       0
  30   348129       0       0       0
  40   461405       0       0       0
  50   629232       0       0       0
  61        0  482760       0       0
  63        0 5970021       0       0
  64        0 1015313       0       0
  65        0 1827631       0       0
  71        0       0 3846057       0
  81        0       0 1954892       0
  101       0       0       0 4424265
  114       0       0       0 1922591
  115       0       0       0  480758
  116       0       0       0  318781
Code
table(acs$EDUCD_SP, acs$educ_sp, exclude=NULL)
      
            LHS       HS       SC        C     <NA>
  2      165054        0        0        0        0
  11       2054        0        0        0        0
  12       2135        0        0        0        0
  14       5521        0        0        0        0
  15      12541        0        0        0        0
  16      27633        0        0        0        0
  17      21641        0        0        0        0
  22      30916        0        0        0        0
  23     127555        0        0        0        0
  25      43718        0        0        0        0
  26     142836        0        0        0        0
  30     167398        0        0        0        0
  40     204473        0        0        0        0
  50     224437        0        0        0        0
  61          0   242380        0        0        0
  63          0  3198790        0        0        0
  64          0   520402        0        0        0
  65          0   981161        0        0        0
  71          0        0  1944654        0        0
  81          0        0  1236390        0        0
  101         0        0        0  2943171        0
  114         0        0        0  1377987        0
  115         0        0        0   360889        0
  116         0        0        0   236979        0
  <NA>        0        0        0        0 10642642
Code
# check race
table(acs$RACED, acs$race, exclude=NULL)
     
         White    Black Indigenous    Asian   Latino White-Black
  100 17415446        0          0        0  2053988           0
  200        0  2451888          0        0    64288           0
  302        0        0       4506        0     1708           0
  303        0        0       2148        0      139           0
  304        0        0      23095        0     1029           0
  305        0        0        817        0       50           0
  306        0        0       2011        0       45           0
  307        0        0      10075        0      289           0
  308        0        0       7961        0      233           0
  309        0        0        730        0      178           0
  310        0        0       3602        0       67           0
  311        0        0        926        0       36           0
  312        0        0       3872        0      101           0
  314        0        0       6057        0       49           0
  315        0        0      39512        0     1133           0
  317        0        0        326        0       24           0
  318        0        0       1408        0      187           0
  319        0        0       1785        0       59           0
  320        0        0       6398        0      707           0
  321        0        0       1271        0       43           0
  323        0        0       9054        0      420           0
  324        0        0       1634        0       31           0
  325        0        0       1681        0      207           0
  328        0        0       1035        0      115           0
  350        0        0        121        0        1           0
  352        0        0       2058        0       94           0
  353        0        0        114        0        4           0
  354        0        0       1065        0     1018           0
  355        0        0        181        0        7           0
  356        0        0        128        0        1           0
  357        0        0        125        0        3           0
  358        0        0        238        0       23           0
  359        0        0        131        0     1476           0
  360        0        0        253        0     6102           0
  361        0        0      20445        0     4688           0
  362        0        0      23897        0     2196           0
  370        0        0       1913        0       13           0
  371        0        0       1421        0       11           0
  372        0        0       1785        0        6           0
  374        0        0       3090        0       73           0
  375        0        0       4534        0       19           0
  379        0        0       1072        0       63           0
  398        0        0        668        0      227           0
  399        0        0      19190        0    12629           0
  400        0        0          0   313140     1869           0
  410        0        0          0    12075       32           0
  500        0        0          0    72378     1430           0
  600        0        0          0   219272     5669           0
  610        0        0          0   238569      965           0
  620        0        0          0   111735      704           0
  630        0        0      13565        0     1365           0
  640        0        0          0   127187      584           0
  641        0        0          0     1019        2           0
  642        0        0          0      840       17           0
  643        0        0          0     6302       17           0
  660        0        0          0    17276      117           0
  661        0        0          0    13506       37           0
  662        0        0          0    12924      167           0
  663        0        0          0    15683      148           0
  664        0        0          0    10178       11           0
  665        0        0          0     6078       24           0
  666        0        0          0     5494       67           0
  667        0        0          0     1500       13           0
  669        0        0          0    26718      116           0
  670        0        0          0     3728       11           0
  671        0        0          0     8709      357           0
  672        0        0          0     2460       64           0
  673        0        0          0     2369       43           0
  674        0        0          0     3028      333           0
  675        0        0          0     5543       11           0
  676        0        0          0     3028       32           0
  677        0        0          0     1409       95           0
  678        0        0          0     3481       60           0
  679        0        0          0     3155       58           0
  680        0        0       6184        0      367           0
  682        0        0       2072        0       40           0
  684        0        0        142        0        7           0
  685        0        0       4738        0      825           0
  689        0        0       1306        0        7           0
  695        0        0       1851        0       15           0
  697        0        0        380        0        1           0
  698        0        0         27        0        0           0
  699        0        0       3825        0      400           0
  700        0        0          0        0   781221           0
  801        0        0          0        0    15944       63828
  802        0        0          0        0    18670           0
  811        0        0          0        0     1206           0
  812        0        0          0        0     1162           0
  813        0        0          0        0     2618           0
  814        0        0          0        0      332           0
  815        0        0          0        0      294           0
  816        0        0          0        0      151           0
  817        0        0          0        0      110           0
  818        0        0          0        0      592           0
  819        0        0          0        0       79           0
  821        0        0          0        0      595           0
  822        0        0          0        0       93           0
  823        0        0          0        0      194           0
  824        0        0          0        0      164           0
  825        0        0          0        0        4           0
  826        0        0          0        0    47367           0
  830        0        0          0        0     1716           0
  832        0        0          0        0      114           0
  833        0        0          0        0       63           0
  834        0        0          0        0      173           0
  835        0        0          0        0       84           0
  836        0        0          0        0       50           0
  837        0        0          0        0       84           0
  838        0        0          0        0       83           0
  841        0        0          0        0       91           0
  842        0        0          0        0       71           0
  845        0        0          0        0     6585           0
  851        0        0          0        0      144           0
  852        0        0          0        0       87           0
  854        0        0          0        0      125           0
  855        0        0         80        0       28           0
  856        0        0          0        0     5798           0
  861        0        0          0        0       98           0
  862        0        0          0        0      104           0
  863        0        0          0        0       50           0
  864        0        0          0        0      213           0
  865        0        0          0        0      153           0
  867        0        0          0        0      108           0
  868        0        0          0        0       27           0
  881        0        0          0        0       84           0
  882        0        0          0        0       69           0
  883        0        0          0        0     1271           0
  884        0        0          0        0      287           0
  885        0        0          0        0     1921           0
  886        0        0          0        0       71           0
  887        0        0          0      623       10           0
  890        0        0          0        0     1141           0
  892        0        0          0        0      255           0
  893        0        0          0        0      207           0
  901        0        0          0        0     3319           0
  902        0        0          0        0      476           0
  903        0        0          0        0       11           0
  904        0        0          0        0     1070           0
  905        0        0          0        0      434           0
  906        0        0          0        0       21           0
  907        0        0          0        0     1549           0
  911        0        0          0        0      206           0
  912        0        0          0        0      147           0
  913        0        0          0        0       61           0
  914        0        0          0        0      140           0
  915        0        0          0        0       67           0
  916        0        0          0        0      180           0
  917        0        0          0        0       84           0
  920        0        0          0        0      278           0
  921        0        0          0        0      182           0
  922        0        0          0        0       15           0
  923        0        0          0        0      168           0
  925        0        0          0        0      647           0
  930        0        0          0        0       13           0
  931        0        0          0        0        5           0
  932        0        0          0        0       48           0
  933        0        0          0        0        8           0
  934        0        0          0        0       17           0
  935        0        0          0        0        9           0
  940        0        0          0        0       17           0
  941        0        0          0        0       19           0
  942        0        0          0        0       11           0
  943        0        0          0        0      207           0
  944        0        0          0        0       49           0
  950        0        0          0        0      244           0
  951        0        0          0        0        1           0
  952        0        0          0        0       51           0
  953        0        0          0        0        6           0
  954        0        0          0        0        5           0
  955        0        0          0        0        2           0
  960        0        0          0        0      223           0
  961        0        0          0        0        9           0
  962        0        0          0        0        4           0
  963        0        0          0        0      914           0
  964        0        0          0        0       31           0
  970        0        0          0        0        6           0
  971        0        0          0        0        3           0
  972        0        0          0        0        1           0
  973        0        0          0        0      243           0
  974        0        0          0        0      410           0
  976        0        0          0        0     1137           0
  980        0        0          0        0        8           0
  981        0        0          0        0       10           0
  982        0        0          0        0      303           0
  983        0        0          0        0      313           0
  984        0        0          0        0        1           0
  985        0        0          0        0      326           0
  990        0        0          0        0      770           0
     
      White-Indigenous White-Asian Black-Indigenous Black-Asian
  100                0           0                0           0
  200                0           0                0           0
  302                0           0                0           0
  303                0           0                0           0
  304                0           0                0           0
  305                0           0                0           0
  306                0           0                0           0
  307                0           0                0           0
  308                0           0                0           0
  309                0           0                0           0
  310                0           0                0           0
  311                0           0                0           0
  312                0           0                0           0
  314                0           0                0           0
  315                0           0                0           0
  317                0           0                0           0
  318                0           0                0           0
  319                0           0                0           0
  320                0           0                0           0
  321                0           0                0           0
  323                0           0                0           0
  324                0           0                0           0
  325                0           0                0           0
  328                0           0                0           0
  350                0           0                0           0
  352                0           0                0           0
  353                0           0                0           0
  354                0           0                0           0
  355                0           0                0           0
  356                0           0                0           0
  357                0           0                0           0
  358                0           0                0           0
  359                0           0                0           0
  360                0           0                0           0
  361                0           0                0           0
  362                0           0                0           0
  370                0           0                0           0
  371                0           0                0           0
  372                0           0                0           0
  374                0           0                0           0
  375                0           0                0           0
  379                0           0                0           0
  398                0           0                0           0
  399                0           0                0           0
  400                0           0                0           0
  410                0           0                0           0
  500                0           0                0           0
  600                0           0                0           0
  610                0           0                0           0
  620                0           0                0           0
  630                0           0                0           0
  640                0           0                0           0
  641                0           0                0           0
  642                0           0                0           0
  643                0           0                0           0
  660                0           0                0           0
  661                0           0                0           0
  662                0           0                0           0
  663                0           0                0           0
  664                0           0                0           0
  665                0           0                0           0
  666                0           0                0           0
  667                0           0                0           0
  669                0           0                0           0
  670                0           0                0           0
  671                0           0                0           0
  672                0           0                0           0
  673                0           0                0           0
  674                0           0                0           0
  675                0           0                0           0
  676                0           0                0           0
  677                0           0                0           0
  678                0           0                0           0
  679                0           0                0           0
  680                0           0                0           0
  682                0           0                0           0
  684                0           0                0           0
  685                0           0                0           0
  689                0           0                0           0
  695                0           0                0           0
  697                0           0                0           0
  698                0           0                0           0
  699                0           0                0           0
  700                0           0                0           0
  801                0           0                0           0
  802           118238           0                0           0
  811                0       10449                0           0
  812                0       19255                0           0
  813                0       19198                0           0
  814                0        4505                0           0
  815                0        9034                0           0
  816                0        3383                0           0
  817                0        3808                0           0
  818                0       19169                0           0
  819                0         433                0           0
  821             5383           0                0           0
  822             1020           0                0           0
  823             1079           0                0           0
  824             2163           0                0           0
  825               34           0                0           0
  826                0           0                0           0
  830                0           0            18158           0
  832                0           0                0        1138
  833                0           0                0        1142
  834                0           0                0        2169
  835                0           0                0        1368
  836                0           0                0        1020
  837                0           0                0        1696
  838                0           0                0         588
  841                0           0             1484           0
  842                0           0              594           0
  845                0           0                0           0
  851                0           0                0           0
  852                0           0                0           0
  854                0           0                0           0
  855                0           0                0           0
  856                0           0                0           0
  861                0           0                0           0
  862                0           0                0           0
  863                0           0                0           0
  864                0           0                0           0
  865                0           0                0           0
  867                0           0                0           0
  868                0           0                0           0
  881                0           0                0           0
  882                0           0                0           0
  883                0           0                0           0
  884                0           0                0           0
  885                0           0                0           0
  886                0           0                0           0
  887                0           0                0           0
  890                0           0                0           0
  892                0           0                0           0
  893                0           0                0           0
  901                0           0                0           0
  902                0           0                0           0
  903                0           0                0           0
  904                0           0                0           0
  905                0           0                0           0
  906                0           0                0           0
  907                0           0                0           0
  911                0           0                0           0
  912                0           0                0           0
  913                0           0                0           0
  914                0           0                0           0
  915                0           0                0           0
  916                0           0                0           0
  917                0           0                0           0
  920                0           0                0           0
  921                0           0                0           0
  922                0           0                0           0
  923                0           0                0           0
  925                0           0                0           0
  930                0           0                0           0
  931                0           0                0           0
  932                0           0                0           0
  933                0           0                0           0
  934                0           0                0           0
  935                0           0                0           0
  940                0           0                0           0
  941                0           0                0           0
  942                0           0                0           0
  943                0           0                0           0
  944                0           0                0           0
  950                0           0                0           0
  951                0           0                0           0
  952                0           0                0           0
  953                0           0                0           0
  954                0           0                0           0
  955                0           0                0           0
  960                0           0                0           0
  961                0           0                0           0
  962                0           0                0           0
  963                0           0                0           0
  964                0           0                0           0
  970                0           0                0           0
  971                0           0                0           0
  972                0           0                0           0
  973                0           0                0           0
  974                0           0                0           0
  976                0           0                0           0
  980                0           0                0           0
  981                0           0                0           0
  982                0           0                0           0
  983                0           0                0           0
  984                0           0                0           0
  985                0           0                0           0
  990                0           0                0           0
     
      Asian-Indigenous     <NA>
  100                0        0
  200                0        0
  302                0        0
  303                0        0
  304                0        0
  305                0        0
  306                0        0
  307                0        0
  308                0        0
  309                0        0
  310                0        0
  311                0        0
  312                0        0
  314                0        0
  315                0        0
  317                0        0
  318                0        0
  319                0        0
  320                0        0
  321                0        0
  323                0        0
  324                0        0
  325                0        0
  328                0        0
  350                0        0
  352                0        0
  353                0        0
  354                0        0
  355                0        0
  356                0        0
  357                0        0
  358                0        0
  359                0        0
  360                0        0
  361                0        0
  362                0        0
  370                0        0
  371                0        0
  372                0        0
  374                0        0
  375                0        0
  379                0        0
  398                0        0
  399                0        0
  400                0        0
  410                0        0
  500                0        0
  600                0        0
  610                0        0
  620                0        0
  630                0        0
  640                0        0
  641                0        0
  642                0        0
  643                0        0
  660                0        0
  661                0        0
  662                0        0
  663                0        0
  664                0        0
  665                0        0
  666                0        0
  667                0        0
  669                0        0
  670                0        0
  671                0        0
  672                0        0
  673                0        0
  674                0        0
  675                0        0
  676                0        0
  677                0        0
  678                0        0
  679                0        0
  680                0        0
  682                0        0
  684                0        0
  685                0        0
  689                0        0
  695                0        0
  697                0        0
  698                0        0
  699                0        0
  700                0    37456
  801                0        0
  802                0        0
  811                0        0
  812                0        0
  813                0        0
  814                0        0
  815                0        0
  816                0        0
  817                0        0
  818                0        0
  819                0        0
  821                0        0
  822                0        0
  823                0        0
  824                0        0
  825                0        0
  826                0     8130
  830                0        0
  832                0        0
  833                0        0
  834                0        0
  835                0        0
  836                0        0
  837                0        0
  838                0        0
  841                0        0
  842                0        0
  845                0     4341
  851              455        0
  852              566        0
  854              527        0
  855                0        0
  856                0      593
  861             1714        0
  862              684        0
  863              918        0
  864             1560        0
  865             3173        0
  867             1813        0
  868             1074        0
  881                0       28
  882                0       21
  883                0      613
  884                0     1930
  885                0     5525
  886                0       88
  887                0        0
  890                0      418
  892                0      130
  893                0      609
  901                0    11568
  902                0     2119
  903                0       45
  904                0      699
  905                0     1411
  906                0       63
  907                0      340
  911                0     2503
  912                0      650
  913                0      980
  914                0     1000
  915                0      588
  916                0      433
  917                0      370
  920                0      208
  921                0      584
  922                0      346
  923                0      152
  925                0     1028
  930                0       77
  931                0       10
  932                0       58
  933                0       55
  934                0       85
  935                0       15
  940                0       32
  941                0       12
  942                0        1
  943                0      909
  944                0     1097
  950                0      818
  951                0       21
  952                0       42
  953                0       11
  954                0       15
  955                0        2
  960                0      834
  961                0        4
  962                0        0
  963                0     4530
  964                0      545
  970                0        4
  971                0        4
  972                0        0
  973                0      559
  974                0     1110
  976                0     2224
  980                0       33
  981                0        7
  982                0      259
  983                0      673
  984                0        2
  985                0      656
  990                0     1120
Code
table(acs$HISPAND, acs$race, exclude=NULL)
     
         White    Black Indigenous    Asian   Latino White-Black
  0   17415446  2451888     246503  1249407        0       63828
  100        0        0          0        0  1886193           0
  200        0        0          0        0   292507           0
  300        0        0          0        0   145997           0
  411        0        0          0        0     9048           0
  412        0        0          0        0    68131           0
  413        0        0          0        0    40602           0
  414        0        0          0        0    25873           0
  415        0        0          0        0    12802           0
  416        0        0          0        0   110583           0
  417        0        0          0        0     2000           0
  420        0        0          0        0    18697           0
  421        0        0          0        0     7050           0
  422        0        0          0        0    10263           0
  423        0        0          0        0    70355           0
  424        0        0          0        0    37962           0
  425        0        0          0        0     1632           0
  426        0        0          0        0    39439           0
  427        0        0          0        0     4126           0
  428        0        0          0        0    21175           0
  431        0        0          0        0     1499           0
  450        0        0          0        0    54710           0
  460        0        0          0        0    91254           0
  498        0        0          0        0   124602           0
     
      White-Indigenous White-Asian Black-Indigenous Black-Asian
  0             127917       89234            20236        9121
  100                0           0                0           0
  200                0           0                0           0
  300                0           0                0           0
  411                0           0                0           0
  412                0           0                0           0
  413                0           0                0           0
  414                0           0                0           0
  415                0           0                0           0
  416                0           0                0           0
  417                0           0                0           0
  420                0           0                0           0
  421                0           0                0           0
  422                0           0                0           0
  423                0           0                0           0
  424                0           0                0           0
  425                0           0                0           0
  426                0           0                0           0
  427                0           0                0           0
  428                0           0                0           0
  431                0           0                0           0
  450                0           0                0           0
  460                0           0                0           0
  498                0           0                0           0
     
      Asian-Indigenous     <NA>
  0              12484   100793
  100                0        0
  200                0        0
  300                0        0
  411                0        0
  412                0        0
  413                0        0
  414                0        0
  415                0        0
  416                0        0
  417                0        0
  420                0        0
  421                0        0
  422                0        0
  423                0        0
  424                0        0
  425                0        0
  426                0        0
  427                0        0
  428                0        0
  431                0        0
  450                0        0
  460                0        0
  498                0        0
Code
table(acs$RACED_SP, acs$race_sp, exclude=NULL)
      
          White    Black Indigenous    Asian   Latino White-Black
  100  10714385        0          0        0  1098622           0
  200         0   836008          0        0    23774           0
  302         0        0       1950        0      834           0
  303         0        0        963        0       58           0
  304         0        0      12431        0      451           0
  305         0        0        356        0       14           0
  306         0        0       1147        0       18           0
  307         0        0       4805        0      111           0
  308         0        0       4365        0      111           0
  309         0        0        380        0       80           0
  310         0        0       1964        0       31           0
  311         0        0        405        0       15           0
  312         0        0       1966        0       47           0
  314         0        0       3045        0       18           0
  315         0        0      16411        0      500           0
  317         0        0        132        0        8           0
  318         0        0        454        0       75           0
  319         0        0        985        0       27           0
  320         0        0       2528        0      336           0
  321         0        0        555        0       18           0
  323         0        0       3623        0      167           0
  324         0        0        764        0       16           0
  325         0        0        492        0       83           0
  328         0        0        411        0       51           0
  350         0        0         66        0        0           0
  352         0        0        896        0       37           0
  353         0        0         55        0        1           0
  354         0        0        380        0      461           0
  355         0        0         83        0        3           0
  356         0        0         80        0        0           0
  357         0        0         64        0        0           0
  358         0        0         89        0        9           0
  359         0        0         69        0      751           0
  360         0        0        105        0     3181           0
  361         0        0       8838        0     2242           0
  362         0        0      10737        0      981           0
  370         0        0        860        0        7           0
  371         0        0        753        0        5           0
  372         0        0        824        0        3           0
  374         0        0       1350        0       33           0
  375         0        0       2068        0        7           0
  379         0        0        406        0       24           0
  398         0        0        300        0      114           0
  399         0        0       8071        0     6071           0
  400         0        0          0   185058      931           0
  410         0        0          0     7401       14           0
  500         0        0          0    42926      728           0
  600         0        0          0   129904     2900           0
  610         0        0          0   167624      494           0
  620         0        0          0    66535      357           0
  630         0        0       6700        0      582           0
  640         0        0          0    73551      270           0
  641         0        0          0      694        1           0
  642         0        0          0      510        7           0
  643         0        0          0     4152       13           0
  660         0        0          0     8876       62           0
  661         0        0          0     6786       24           0
  662         0        0          0     7126       89           0
  663         0        0          0     9289       84           0
  664         0        0          0     6818        3           0
  665         0        0          0     3828       12           0
  666         0        0          0     3471       34           0
  667         0        0          0      811        6           0
  669         0        0          0    17092       60           0
  670         0        0          0     2384        5           0
  671         0        0          0     4664      146           0
  672         0        0          0     1421       30           0
  673         0        0          0     1093       16           0
  674         0        0          0     1653      189           0
  675         0        0          0     2803        7           0
  676         0        0          0     1789       18           0
  677         0        0          0      692       43           0
  678         0        0          0     2051       31           0
  679         0        0          0     1589       26           0
  680         0        0       2982        0      113           0
  682         0        0       1177        0       13           0
  684         0        0         70        0        4           0
  685         0        0       2712        0      371           0
  689         0        0        732        0        4           0
  695         0        0       1114        0        5           0
  697         0        0        216        0        1           0
  698         0        0         12        0        0           0
  699         0        0       1959        0      157           0
  700         0        0          0        0   398008           0
  801         0        0          0        0     6576       21423
  802         0        0          0        0     8492           0
  811         0        0          0        0      570           0
  812         0        0          0        0      490           0
  813         0        0          0        0     1112           0
  814         0        0          0        0      141           0
  815         0        0          0        0      112           0
  816         0        0          0        0       56           0
  817         0        0          0        0       50           0
  818         0        0          0        0      236           0
  819         0        0          0        0       38           0
  821         0        0          0        0      257           0
  822         0        0          0        0       27           0
  823         0        0          0        0       76           0
  824         0        0          0        0       76           0
  825         0        0          0        0        0           0
  826         0        0          0        0    23059           0
  830         0        0          0        0      583           0
  832         0        0          0        0       49           0
  833         0        0          0        0       20           0
  834         0        0          0        0       57           0
  835         0        0          0        0       29           0
  836         0        0          0        0       10           0
  837         0        0          0        0       24           0
  838         0        0          0        0       19           0
  841         0        0          0        0       28           0
  842         0        0          0        0       23           0
  845         0        0          0        0     2140           0
  851         0        0          0        0       67           0
  852         0        0          0        0       39           0
  854         0        0          0        0       52           0
  855         0        0         30        0       14           0
  856         0        0          0        0     2594           0
  861         0        0          0        0       53           0
  862         0        0          0        0       52           0
  863         0        0          0        0       26           0
  864         0        0          0        0      101           0
  865         0        0          0        0       72           0
  867         0        0          0        0       49           0
  868         0        0          0        0        9           0
  881         0        0          0        0       44           0
  882         0        0          0        0       34           0
  883         0        0          0        0      514           0
  884         0        0          0        0      140           0
  885         0        0          0        0      904           0
  886         0        0          0        0       28           0
  887         0        0          0      278        5           0
  890         0        0          0        0      528           0
  892         0        0          0        0      103           0
  893         0        0          0        0       84           0
  901         0        0          0        0     1468           0
  902         0        0          0        0      186           0
  903         0        0          0        0        3           0
  904         0        0          0        0      385           0
  905         0        0          0        0      167           0
  906         0        0          0        0       12           0
  907         0        0          0        0      711           0
  911         0        0          0        0      108           0
  912         0        0          0        0       55           0
  913         0        0          0        0       32           0
  914         0        0          0        0       56           0
  915         0        0          0        0       15           0
  916         0        0          0        0       83           0
  917         0        0          0        0       31           0
  920         0        0          0        0      128           0
  921         0        0          0        0       71           0
  922         0        0          0        0        3           0
  923         0        0          0        0       84           0
  925         0        0          0        0      269           0
  930         0        0          0        0        4           0
  931         0        0          0        0        4           0
  932         0        0          0        0       13           0
  933         0        0          0        0        0           0
  934         0        0          0        0        6           0
  935         0        0          0        0        2           0
  940         0        0          0        0        6           0
  941         0        0          0        0        9           0
  942         0        0          0        0        3           0
  943         0        0          0        0       77           0
  944         0        0          0        0       21           0
  950         0        0          0        0      112           0
  951         0        0          0        0        0           0
  952         0        0          0        0       20           0
  953         0        0          0        0        1           0
  954         0        0          0        0        5           0
  955         0        0          0        0        0           0
  960         0        0          0        0       81           0
  961         0        0          0        0        4           0
  962         0        0          0        0        1           0
  963         0        0          0        0      343           0
  964         0        0          0        0       18           0
  970         0        0          0        0        0           0
  971         0        0          0        0        1           0
  973         0        0          0        0       74           0
  974         0        0          0        0      196           0
  976         0        0          0        0      496           0
  980         0        0          0        0        1           0
  981         0        0          0        0        2           0
  982         0        0          0        0      120           0
  983         0        0          0        0      115           0
  984         0        0          0        0        1           0
  985         0        0          0        0      109           0
  990         0        0          0        0      284           0
  <NA>        0        0          0        0        0           0
      
       White-Indigenous White-Asian Black-Indigenous Black-Asian
  100                 0           0                0           0
  200                 0           0                0           0
  302                 0           0                0           0
  303                 0           0                0           0
  304                 0           0                0           0
  305                 0           0                0           0
  306                 0           0                0           0
  307                 0           0                0           0
  308                 0           0                0           0
  309                 0           0                0           0
  310                 0           0                0           0
  311                 0           0                0           0
  312                 0           0                0           0
  314                 0           0                0           0
  315                 0           0                0           0
  317                 0           0                0           0
  318                 0           0                0           0
  319                 0           0                0           0
  320                 0           0                0           0
  321                 0           0                0           0
  323                 0           0                0           0
  324                 0           0                0           0
  325                 0           0                0           0
  328                 0           0                0           0
  350                 0           0                0           0
  352                 0           0                0           0
  353                 0           0                0           0
  354                 0           0                0           0
  355                 0           0                0           0
  356                 0           0                0           0
  357                 0           0                0           0
  358                 0           0                0           0
  359                 0           0                0           0
  360                 0           0                0           0
  361                 0           0                0           0
  362                 0           0                0           0
  370                 0           0                0           0
  371                 0           0                0           0
  372                 0           0                0           0
  374                 0           0                0           0
  375                 0           0                0           0
  379                 0           0                0           0
  398                 0           0                0           0
  399                 0           0                0           0
  400                 0           0                0           0
  410                 0           0                0           0
  500                 0           0                0           0
  600                 0           0                0           0
  610                 0           0                0           0
  620                 0           0                0           0
  630                 0           0                0           0
  640                 0           0                0           0
  641                 0           0                0           0
  642                 0           0                0           0
  643                 0           0                0           0
  660                 0           0                0           0
  661                 0           0                0           0
  662                 0           0                0           0
  663                 0           0                0           0
  664                 0           0                0           0
  665                 0           0                0           0
  666                 0           0                0           0
  667                 0           0                0           0
  669                 0           0                0           0
  670                 0           0                0           0
  671                 0           0                0           0
  672                 0           0                0           0
  673                 0           0                0           0
  674                 0           0                0           0
  675                 0           0                0           0
  676                 0           0                0           0
  677                 0           0                0           0
  678                 0           0                0           0
  679                 0           0                0           0
  680                 0           0                0           0
  682                 0           0                0           0
  684                 0           0                0           0
  685                 0           0                0           0
  689                 0           0                0           0
  695                 0           0                0           0
  697                 0           0                0           0
  698                 0           0                0           0
  699                 0           0                0           0
  700                 0           0                0           0
  801                 0           0                0           0
  802             58798           0                0           0
  811                 0        4592                0           0
  812                 0        9886                0           0
  813                 0        9212                0           0
  814                 0        2146                0           0
  815                 0        4517                0           0
  816                 0        1639                0           0
  817                 0        2244                0           0
  818                 0       10819                0           0
  819                 0         194                0           0
  821              2783           0                0           0
  822               496           0                0           0
  823               567           0                0           0
  824              1142           0                0           0
  825                14           0                0           0
  826                 0           0                0           0
  830                 0           0             5135           0
  832                 0           0                0         477
  833                 0           0                0         463
  834                 0           0                0         793
  835                 0           0                0         613
  836                 0           0                0         414
  837                 0           0                0         706
  838                 0           0                0         244
  841                 0           0              576           0
  842                 0           0              174           0
  845                 0           0                0           0
  851                 0           0                0           0
  852                 0           0                0           0
  854                 0           0                0           0
  855                 0           0                0           0
  856                 0           0                0           0
  861                 0           0                0           0
  862                 0           0                0           0
  863                 0           0                0           0
  864                 0           0                0           0
  865                 0           0                0           0
  867                 0           0                0           0
  868                 0           0                0           0
  881                 0           0                0           0
  882                 0           0                0           0
  883                 0           0                0           0
  884                 0           0                0           0
  885                 0           0                0           0
  886                 0           0                0           0
  887                 0           0                0           0
  890                 0           0                0           0
  892                 0           0                0           0
  893                 0           0                0           0
  901                 0           0                0           0
  902                 0           0                0           0
  903                 0           0                0           0
  904                 0           0                0           0
  905                 0           0                0           0
  906                 0           0                0           0
  907                 0           0                0           0
  911                 0           0                0           0
  912                 0           0                0           0
  913                 0           0                0           0
  914                 0           0                0           0
  915                 0           0                0           0
  916                 0           0                0           0
  917                 0           0                0           0
  920                 0           0                0           0
  921                 0           0                0           0
  922                 0           0                0           0
  923                 0           0                0           0
  925                 0           0                0           0
  930                 0           0                0           0
  931                 0           0                0           0
  932                 0           0                0           0
  933                 0           0                0           0
  934                 0           0                0           0
  935                 0           0                0           0
  940                 0           0                0           0
  941                 0           0                0           0
  942                 0           0                0           0
  943                 0           0                0           0
  944                 0           0                0           0
  950                 0           0                0           0
  951                 0           0                0           0
  952                 0           0                0           0
  953                 0           0                0           0
  954                 0           0                0           0
  955                 0           0                0           0
  960                 0           0                0           0
  961                 0           0                0           0
  962                 0           0                0           0
  963                 0           0                0           0
  964                 0           0                0           0
  970                 0           0                0           0
  971                 0           0                0           0
  973                 0           0                0           0
  974                 0           0                0           0
  976                 0           0                0           0
  980                 0           0                0           0
  981                 0           0                0           0
  982                 0           0                0           0
  983                 0           0                0           0
  984                 0           0                0           0
  985                 0           0                0           0
  990                 0           0                0           0
  <NA>                0           0                0           0
      
       Asian-Indigenous     <NA>
  100                 0        0
  200                 0        0
  302                 0        0
  303                 0        0
  304                 0        0
  305                 0        0
  306                 0        0
  307                 0        0
  308                 0        0
  309                 0        0
  310                 0        0
  311                 0        0
  312                 0        0
  314                 0        0
  315                 0        0
  317                 0        0
  318                 0        0
  319                 0        0
  320                 0        0
  321                 0        0
  323                 0        0
  324                 0        0
  325                 0        0
  328                 0        0
  350                 0        0
  352                 0        0
  353                 0        0
  354                 0        0
  355                 0        0
  356                 0        0
  357                 0        0
  358                 0        0
  359                 0        0
  360                 0        0
  361                 0        0
  362                 0        0
  370                 0        0
  371                 0        0
  372                 0        0
  374                 0        0
  375                 0        0
  379                 0        0
  398                 0        0
  399                 0        0
  400                 0        0
  410                 0        0
  500                 0        0
  600                 0        0
  610                 0        0
  620                 0        0
  630                 0        0
  640                 0        0
  641                 0        0
  642                 0        0
  643                 0        0
  660                 0        0
  661                 0        0
  662                 0        0
  663                 0        0
  664                 0        0
  665                 0        0
  666                 0        0
  667                 0        0
  669                 0        0
  670                 0        0
  671                 0        0
  672                 0        0
  673                 0        0
  674                 0        0
  675                 0        0
  676                 0        0
  677                 0        0
  678                 0        0
  679                 0        0
  680                 0        0
  682                 0        0
  684                 0        0
  685                 0        0
  689                 0        0
  695                 0        0
  697                 0        0
  698                 0        0
  699                 0        0
  700                 0    17789
  801                 0        0
  802                 0        0
  811                 0        0
  812                 0        0
  813                 0        0
  814                 0        0
  815                 0        0
  816                 0        0
  817                 0        0
  818                 0        0
  819                 0        0
  821                 0        0
  822                 0        0
  823                 0        0
  824                 0        0
  825                 0        0
  826                 0     3546
  830                 0        0
  832                 0        0
  833                 0        0
  834                 0        0
  835                 0        0
  836                 0        0
  837                 0        0
  838                 0        0
  841                 0        0
  842                 0        0
  845                 0     1494
  851               220        0
  852               334        0
  854               285        0
  855                 0        0
  856                 0      244
  861               911        0
  862               358        0
  863               478        0
  864               843        0
  865              1545        0
  867               971        0
  868               501        0
  881                 0       14
  882                 0       12
  883                 0      325
  884                 0     1326
  885                 0     3413
  886                 0       64
  887                 0        0
  890                 0      213
  892                 0       58
  893                 0      282
  901                 0     3793
  902                 0      772
  903                 0       23
  904                 0      216
  905                 0      628
  906                 0       30
  907                 0      139
  911                 0     1344
  912                 0      286
  913                 0      490
  914                 0      504
  915                 0      272
  916                 0      220
  917                 0      114
  920                 0       84
  921                 0      291
  922                 0      156
  923                 0       68
  925                 0      425
  930                 0       23
  931                 0        3
  932                 0       14
  933                 0       13
  934                 0       53
  935                 0        4
  940                 0       16
  941                 0        3
  942                 0        0
  943                 0      452
  944                 0      503
  950                 0      306
  951                 0        7
  952                 0       18
  953                 0        6
  954                 0        8
  955                 0        1
  960                 0      373
  961                 0        1
  962                 0        0
  963                 0     2222
  964                 0      269
  970                 0        2
  971                 0        3
  973                 0      221
  974                 0      532
  976                 0     1180
  980                 0       14
  981                 0        2
  982                 0       76
  983                 0      275
  984                 0        2
  985                 0      207
  990                 0      455
  <NA>                0 10642642
Code
table(acs$HISPAND_SP, acs$race_sp, exclude=NULL)
      
          White    Black Indigenous    Asian   Latino White-Black
  0    10714385   836008     113930   762869        0       21423
  100         0        0          0        0  1009338           0
  200         0        0          0        0   132986           0
  300         0        0          0        0    77676           0
  411         0        0          0        0     5141           0
  412         0        0          0        0    34551           0
  413         0        0          0        0    20142           0
  414         0        0          0        0    13509           0
  415         0        0          0        0     6228           0
  416         0        0          0        0    57621           0
  417         0        0          0        0      991           0
  420         0        0          0        0    11641           0
  421         0        0          0        0     3955           0
  422         0        0          0        0     6068           0
  423         0        0          0        0    39184           0
  424         0        0          0        0    20690           0
  425         0        0          0        0      855           0
  426         0        0          0        0    22059           0
  427         0        0          0        0     2584           0
  428         0        0          0        0    12696           0
  431         0        0          0        0      754           0
  450         0        0          0        0    29443           0
  460         0        0          0        0    39248           0
  498         0        0          0        0    53751           0
  <NA>        0        0          0        0        0           0
      
       White-Indigenous White-Asian Black-Indigenous Black-Asian
  0               63800       45249             5885        3710
  100                 0           0                0           0
  200                 0           0                0           0
  300                 0           0                0           0
  411                 0           0                0           0
  412                 0           0                0           0
  413                 0           0                0           0
  414                 0           0                0           0
  415                 0           0                0           0
  416                 0           0                0           0
  417                 0           0                0           0
  420                 0           0                0           0
  421                 0           0                0           0
  422                 0           0                0           0
  423                 0           0                0           0
  424                 0           0                0           0
  425                 0           0                0           0
  426                 0           0                0           0
  427                 0           0                0           0
  428                 0           0                0           0
  431                 0           0                0           0
  450                 0           0                0           0
  460                 0           0                0           0
  498                 0           0                0           0
  <NA>                0           0                0           0
      
       Asian-Indigenous     <NA>
  0                6446    45899
  100                 0        0
  200                 0        0
  300                 0        0
  411                 0        0
  412                 0        0
  413                 0        0
  414                 0        0
  415                 0        0
  416                 0        0
  417                 0        0
  420                 0        0
  421                 0        0
  422                 0        0
  423                 0        0
  424                 0        0
  425                 0        0
  426                 0        0
  427                 0        0
  428                 0        0
  431                 0        0
  450                 0        0
  460                 0        0
  498                 0        0
  <NA>                0 10642642
Code
# check birthplace
summary(acs$bpl)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
      1       1       1    5430       1   71047    1615 
Code
summary(acs$bpl_sp)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
       1        1        1     6021        1    71047 10643539 
Code
# check language
summary(acs$lang)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   -1.0   100.0   100.0   477.3   100.0  7000.0 
Code
sum(acs$lang==-1)
[1] 26634
Code
summary(acs$lang_sp)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
      -1      100      100      486      100     7000 10642642 
Code
sum(acs$lang_sp==-1, na.rm=TRUE)
[1] 14032
Code
# check dur_mar
summary(acs$dur_mar)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
      0      12      24      26      39      83 6451766 
Code
# check immigrant generation
table(acs$bpl>1, acs$immig_gen, exclude=NULL)
       
             1st     1.25      1.5     1.75     2nd+     <NA>
  FALSE        0        0        0        0 21079605        0
  TRUE   2582497   412471   362296   424873        0        0
  <NA>         0        0        0        0        0     1615
Code
table(acs$bpl_sp>1, acs$immig_gen_sp, exclude=NULL)
       
             1st     1.25      1.5     1.75     2nd+     <NA>
  FALSE        0        0        0        0 11856380        0
  TRUE   1717835   240075   186011   219517        0        0
  <NA>         0        0        0        0        0 10643539
Code
# check marriage market
acs |>
  mutate(mar_market_type = str_sub(mar_market, 1, 1)) |>
  group_by(mar_market_type) |>
  summarize(n = n()) |>
  mutate(percent = 100 * n/sum(n))
# A tibble: 3 × 3
  mar_market_type        n percent
  <chr>              <int>   <dbl>
1 C                 629571    2.53
2 M               18248449   73.4 
3 P                5985337   24.1 
Code
options(max.print=99999)

Everything is coming up green lights at the moment.

Make restrictions

Now that I have coded and checked the ACS dataset, lets just restrict to the variables that I need to keep things tidy. I will also remove cases that are missing on race or race_sp because those are individuals who had a race outside of what I am considering here (other single or in combination and more than two races). I will also drop the relatively few cases that were missing birthplace. Dropping on spouse race_sp and bpl_sp has to first check to make sure its a valid case otherwise (given by a non-missing id).

Code
acs <- acs |>
  filter(!is.na(race) & !is.na(bpl)) |>
  filter(is.na(id_sp) | (!is.na(race_sp) & !is.na(bpl_sp))) |>
  select(mar_market, mar_stat, dur_mar, 
         id, sex, age, race, educ, lang, bpl, immig_gen, yr_usa,
         id_sp, sex_sp, age_sp, race_sp, educ_sp, lang_sp, bpl_sp, immig_gen_sp,
         yr_usa_sp)

I also want to eliminate individuals from the analysis who:

  • have been in the USA less than the marriage window.
  • Made an interstate move in the last five years
  • Are currently married longer than the marriage window.
  • Are married individuals in same-sex relationships
  • Are cohabitors - these are identified by a valid spouse id but not married, spouse present on mar_stat

Therefore, the only remaining people in the dataset are heterosexual married couples married for five years or less and single individuals, all of whom have been in the same “marriage market” for the last five years.

Code
acs <- acs |>
  filter((is.na(yr_usa) | yr_usa>years_mar) & 
           (is.na(yr_usa_sp) | yr_usa_sp>years_mar) &
           ((mar_stat!="Married, spouse present" & 
               mar_stat!="Married, spouse absent") | dur_mar<=years_mar) &
           !(!is.na(sex_sp) & sex==sex_sp) &
           !(mar_stat!="Married, spouse present" & !is.na(id_sp)))

# checks
summary(acs$yr_usa)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
       6       14       22       26       36       95 10359274 
Code
summary(acs$yr_usa_sp)
    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.     NA's 
       6       12       18       20       27       92 11454972 
Code
tapply(acs$dur_mar, acs$mar_stat, max)
Married, spouse present  Married, spouse absent               Separated 
                      5                       5                      79 
               Divorced                 Widowed           Never married 
                     82                      83                      NA 
Code
table(acs$sex, acs$sex_sp, exclude=NULL)
        
          Female    Male    <NA>
  Female       0  829320 5469011
  Male    829485       0 4532824
Code
acs |> 
  group_by(mar_stat, !is.na(id_sp)) |>
  summarize(n=n())
`summarise()` has grouped output by 'mar_stat'. You can override using the
`.groups` argument.
# A tibble: 6 × 3
# Groups:   mar_stat [6]
  mar_stat                `!is.na(id_sp)`       n
  <fct>                   <lgl>             <int>
1 Married, spouse present TRUE            1658805
2 Married, spouse absent  FALSE            148067
3 Separated               FALSE            411033
4 Divorced                FALSE           2326503
5 Widowed                 FALSE           1666182
6 Never married           FALSE           5450050

Create marriage market data

Now, I am ready to create the union and male/female alternate datasets that I will feed into fakeunion to get my marriage market data.

Code
# create actual union data
unions <- acs |>
  filter(sex=="Male" & sex_sp=="Female" & !is.na(id_sp) & 
           mar_stat=="Married, spouse present")

# check that they are all hetero
table(unions$sex, unions$sex_sp, exclude=NULL)
      
       Female
  Male 829485
Code
# check the marital status 
table(unions$mar_stat)

Married, spouse present  Married, spouse absent               Separated 
                 829485                       0                       0 
               Divorced                 Widowed           Never married 
                      0                       0                       0 
Code
# check marriage duration
summary(unions$dur_mar)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.00    1.00    3.00    2.71    4.00    5.00 
Code
# check years in the USA is past marriage duration
summary(unions$yr_usa)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
      6      12      18      21      27      92  726622 
Code
# ok now limit it to only necessary variables and rename
unions <- unions |>
  select(mar_market, id, age, race, educ, lang, bpl, immig_gen, 
         id_sp, age_sp, race_sp, educ_sp, lang_sp, bpl_sp, immig_gen_sp) |>
  rename(idh=id, ageh=age, raceh=race, educh=educ, langh=lang, bplh=bpl, 
         immig_genh=immig_gen,
         idw=id_sp, agew=age_sp, racew=race_sp, educw=educ_sp, langw=lang_sp, 
         bplw=bpl_sp, immig_genw=immig_gen_sp) 

# create alternate partner data
female_alt <- acs |>
  filter(sex=="Female") |>
  select(mar_market, id, age, race, educ, lang, bpl, immig_gen) |>
  rename(idw=id, agew=age, racew=race, educw=educ, langw=lang, bplw=bpl,
         immig_genw=immig_gen)

male_alt <- acs |>
  filter(sex=="Male") |>
  select(mar_market, id, age, race, educ, lang, bpl, immig_gen) |>
  rename(idh=id, ageh=age, raceh=race, educh=educ, langh=lang, bplh=bpl,
         immig_genh=immig_gen)

Now, that I have these datasets, I can feed them into the generateCouples function to create my marriage market data. I use the replicate function to create multiple marriage markets so I can pool results across multiple random imputations of fake partners.

Note that the generateCouples data cannot handle tibbles properly so I am casting these back to vanilla data.frames and then re-tibblizing the end product.

Code
# fakeunion does not handle tibbles well so convert to vanilla dfs
mar_markets <- replicate(n_samples,
                         generateCouples(n_fakes, as.data.frame(unions), 
                                         as.data.frame(male_alt), 
                                         as.data.frame(female_alt), 
                                         geo="mar_market", 
                                         verbose=FALSE),
                         simplify=FALSE)
Loading required package: wrswoR
Code
mar_markets <- lapply(mar_markets, as_tibble)

Lets do a summary on the first one just to make sure it all looks good.

Code
summary(mar_markets[[1]])
  mar_market          sampled            choice             group        
 Length:6635880     Length:6635880     Mode :logical   2012010 :      8  
 Class :character   Class :character   FALSE:5806395   4012010 :      8  
 Mode  :character   Mode  :character   TRUE :829485    5012014 :      8  
                                                       8012016 :      8  
                                                       9012010 :      8  
                                                       14022014:      8  
                                                       (Other) :6635832  
      idh                 ageh                    raceh         educh        
 Min.   :2.012e+06   Min.   :18.00   White           :4695007   LHS: 627805  
 1st Qu.:3.493e+11   1st Qu.:28.00   Latino          : 888651   HS :2510322  
 Median :6.980e+11   Median :35.00   Black           : 654990   SC :1615682  
 Mean   :6.986e+11   Mean   :39.27   Asian           : 223321   C  :1882071  
 3rd Qu.:1.061e+12   3rd Qu.:49.00   Indigenous      :  68666                
 Max.   :1.428e+12   Max.   :97.00   White-Indigenous:  39504                
                                     (Other)         :  65741                
     langh             bplh       immig_genh          idw           
 Min.   :  -1.0   Min.   :    1   1st : 371083   Min.   :1.012e+06  
 1st Qu.: 100.0   1st Qu.:    1   1.25: 124613   1st Qu.:3.488e+11  
 Median : 100.0   Median :    1   1.5 : 118683   Median :6.975e+11  
 Mean   : 381.8   Mean   : 3756   1.75: 140756   Mean   :6.985e+11  
 3rd Qu.: 100.0   3rd Qu.:    1   2nd+:5880745   3rd Qu.:1.061e+12  
 Max.   :7000.0   Max.   :71047                  Max.   :1.428e+12  
                                                                    
      agew                    racew         educw             langw       
 Min.   :15.00   White           :4693313   LHS: 534456   Min.   :  -1.0  
 1st Qu.:27.00   Latino          : 869926   HS :2131725   1st Qu.: 100.0  
 Median :35.00   Black           : 635904   SC :1737409   Median : 100.0  
 Mean   :41.21   Asian           : 263183   C  :2232290   Mean   : 402.7  
 3rd Qu.:52.00   Indigenous      :  67570                 3rd Qu.: 100.0  
 Max.   :97.00   White-Indigenous:  39616                 Max.   :7000.0  
                 (Other)         :  66368                                 
      bplw       immig_genw    
 Min.   :    1   1st : 416026  
 1st Qu.:    1   1.25: 107242  
 Median :    1   1.5 : 116966  
 Mean   : 4017   1.75: 141057  
 3rd Qu.:    1   2nd+:5854589  
 Max.   :71047                 
                               

It should be all good to go.

I have also found that fitting the fullest model of multiracial-to-multiracial intermarriage is proving difficult and takes a long time. So, we are going to estimate this model using a reduced marriage market of just multiracial individuals. That model will only be different than a full model because the control variables will be estimated differently, but should be otherwise quite close.

Code
unions_multi <- unions |>
  filter(str_detect(raceh, "-") & str_detect(racew, "-")) |>
  mutate(raceh=fct_drop(raceh), racew=fct_drop(racew))

male_alt_multi <- male_alt |>
  filter(str_detect(raceh, "-")) |>
  mutate(raceh=fct_drop(raceh))

female_alt_multi <- female_alt |>
  filter(str_detect(racew, "-")) |>
  mutate(racew=fct_drop(racew))

mar_markets_multi <- replicate(n_samples,
                         generateCouples(n_fakes, 
                                         as.data.frame(unions_multi), 
                                         as.data.frame(male_alt_multi), 
                                         as.data.frame(female_alt_multi), 
                                         geo="mar_market", 
                                         verbose=FALSE),
                         simplify=FALSE)
Warning in generateCouples(n_fakes, as.data.frame(unions_multi),
as.data.frame(male_alt_multi), : The following areas had less than the required
sample for men and women and the entire list was drawn: C.12.91.2018,
C.13.51.2013, C.13.51.2014, C.16.19.2018, C.19.13.2011, C.19.153.2011,
C.19.163.2012, C.19.163.2015, C.23.11.2016, C.24.43.2012, C.37.49.2015,
C.37.49.2017, C.37.85.2013, C.37.85.2017, C.38.17.2017, C.41.19.2010,
C.45.51.2010, C.47.179.2012, C.48.441.2010, C.48.441.2015, C.48.441.2017,
C.48.441.2018, C.55.25.2017, C.55.9.2015, C.6.23.2012, M.11500.2015,
M.12020.2010, M.12100.2019, M.12220.2015, M.12620.2014, M.12620.2016,
M.12700.2017, M.12980.2010, M.13980.2013, M.14020.2010, M.15540.2016,
M.15980.2012, M.16580.2011, M.16620.2015, M.16620.2017, M.16860.2013,
M.17660.2015, M.17660.2018, M.17780.2010, M.17780.2019, M.18580.2018,
M.19460.2011, M.19460.2012, M.19500.2017, M.20100.2013, M.20940.2012,
M.21140.2014, M.22220.2010, M.22500.2017, M.22500.2018, M.22660.2017,
M.23580.2013, M.24140.2017, M.24780.2012, M.25220.2010, M.25260.2016,
M.25860.2010, M.25940.2012, M.27180.2017, M.27900.2019, M.28420.2010,
M.28700.2011, M.29180.2010, M.29180.2011, M.29700.2015, M.31700.2013,
M.31900.2015, M.33780.2014, M.33860.2019, M.34740.2011, M.35660.2011,
M.37620.2016, M.37620.2018, M.39380.2011, M.39540.2017, M.40980.2015,
M.40980.2016, M.46220.2018, M.49700.2017, M.49740.2015, P.1.2500.2010,
P.1.500.2012, P.1.500.2013, P.1.500.2014, P.12.500.2017, P.12.6300.2012,
P.13.100.2012, P.13.100.2016, P.13.1200.2017, P.13.1500.2014, P.13.200.2011,
P.13.2200.2012, P.13.2500.2015, P.13.2800.2011, P.13.2800.2014, P.13.3200.2011,
P.13.3200.2013, P.13.4100.2011, P.13.4200.2012, P.13.700.2012, P.13.800.2013,
P.16.1300.2014, P.16.200.2011, P.17.200.2011, P.17.300.2016, P.17.600.2015,
P.17.700.2011, P.17.700.2012, P.17.900.2011, P.17.900.2014, P.18.1300.2019,
P.18.2600.2011, P.18.3100.2013, P.18.3200.2013, P.18.3400.2019, P.18.600.2014,
P.18.700.2013, P.18.800.2016, P.19.1300.2018, P.19.500.2010, P.19.700.2017,
P.19.800.2017, P.20.100.2014, P.20.100.2019, P.20.1200.2013, P.20.1200.2015,
P.20.1200.2018, P.20.900.2010, P.20.900.2016, P.21.100.2011, P.21.100.2015,
P.21.1400.2014, P.21.2000.2015, P.21.400.2019, P.21.600.2011, P.22.1200.2010,
P.22.300.2018, P.22.600.2016, P.24.100.2016, P.24.1300.2015, P.24.1500.2014,
P.26.100.2019, P.26.1700.2010, P.26.1702.2012, P.26.1703.2014, P.26.2200.2016,
P.26.2200.2018, P.26.600.2019, P.26.700.2011, P.27.100.2016, P.27.200.2014,
P.27.400.2018, P.27.600.2011, P.27.800.2018, P.28.500.2013, P.28.700.2015,
P.29.100.2018, P.29.1200.2010, P.29.1400.2018, P.29.2200.2011, P.29.2200.2019,
P.29.2300.2015, P.29.2400.2017, P.29.300.2012, P.29.700.2010, P.29.700.2015,
P.30.200.2019, P.30.300.2017, P.30.400.2019, P.30.500.2014, P.30.700.2019,
P.31.100.2014, P.31.500.2012, P.32.400.2010, P.33.500.2014, P.35.100.2017,
P.35.100.2019, P.35.1100.2012, P.35.1200.2012, P.36.200.2013, P.36.2402.2019,
P.36.2500.2018, P.36.2702.2012, P.36.2702.2018, P.37.1000.2015, P.37.2400.2013,
P.37.2400.2017, P.37.3300.2013, P.37.3500.2011, P.37.3900.2011, P.37.3900.2016,
P.37.4400.2016, P.37.4500.2017, P.37.5100.2012, P.37.5100.2017, P.37.5200.2015,
P.37.700.2017, P.38.200.2016, P.38.300.2011, P.39.100.2013, P.39.2700.2017,
P.39.3500.2015, P.39.3700.2012, P.39.4500.2016, P.39.4700.2010, P.39.4900.2015,
P.39.5100.2017, P.40.100.2010, P.40.601.2014, P.41.300.2013, P.41.800.2011,
P.42.1100.2018, P.42.1900.2013, P.42.300.2016, P.42.3702.2014, P.42.600.2010,
P.45.1200.2011, P.45.1300.2015, P.45.400.2018, P.45.800.2012, P.45.800.2019,
P.46.200.2011, P.46.300.2010, P.46.300.2018, P.46.400.2011, P.46.400.2013,
P.46.600.2015, P.47.1100.2011, P.47.1100.2013, P.47.1700.2010, P.47.1900.2013,
P.47.1900.2015, P.47.200.2010, P.47.200.2011, P.47.200.2016, P.47.2200.2014,
P.47.2800.2011, P.47.2800.2013, P.47.2800.2018, P.48.100.2018, P.48.1000.2019,
P.48.1100.2010, P.48.1200.2016, P.48.1700.2017, P.48.1700.2018, P.48.2600.2012,
P.48.3601.2012, P.48.3601.2015, P.48.3900.2018, P.48.4000.2012, P.48.4000.2015,
P.48.5000.2014, P.48.600.2015, P.48.6200.2010, P.48.6200.2013, P.49.21001.2014,
P.5.1300.2010, P.5.1300.2013, P.5.1400.2011, P.5.1400.2018, P.5.1500.2017,
P.5.1500.2019, P.5.1700.2019, P.5.1800.2011, P.5.2000.2012, P.5.300.2012,
P.5.300.2017, P.5.400.2017, P.5.600.2015, P.5.700.2011, P.5.800.2012,
P.50.200.2012, P.50.300.2011, P.51.1600.2011, P.51.400.2011, P.51.51084.2012,
P.51.51084.2013, P.51.51085.2013, P.51.51097.2012, P.51.51105.2013,
P.51.51125.2015, P.53.10702.2013, P.53.10702.2015, P.53.10702.2016,
P.53.11200.2012, P.53.11200.2018, P.53.11900.2015, P.53.300.2010,
P.54.400.2017, P.54.600.2013, P.54.900.2010, P.55.1300.2014, P.55.1400.2015,
P.55.55101.2018, P.56.300.2012, P.56.400.2012, P.56.500.2018, P.6.3300.2013,
P.6.3300.2016, P.8.600.2014, P.8.802.2011, P.8.802.2017
Warning in generateCouples(n_fakes, as.data.frame(unions_multi),
as.data.frame(male_alt_multi), : The following areas had less than the required
sample for men and women and the entire list was drawn: C.12.91.2018,
C.13.51.2013, C.13.51.2014, C.16.19.2018, C.19.13.2011, C.19.153.2011,
C.19.163.2012, C.19.163.2015, C.23.11.2016, C.24.43.2012, C.37.49.2015,
C.37.49.2017, C.37.85.2013, C.37.85.2017, C.38.17.2017, C.41.19.2010,
C.45.51.2010, C.47.179.2012, C.48.441.2010, C.48.441.2015, C.48.441.2017,
C.48.441.2018, C.55.25.2017, C.55.9.2015, C.6.23.2012, M.11500.2015,
M.12020.2010, M.12100.2019, M.12220.2015, M.12620.2014, M.12620.2016,
M.12700.2017, M.12980.2010, M.13980.2013, M.14020.2010, M.15540.2016,
M.15980.2012, M.16580.2011, M.16620.2015, M.16620.2017, M.16860.2013,
M.17660.2015, M.17660.2018, M.17780.2010, M.17780.2019, M.18580.2018,
M.19460.2011, M.19460.2012, M.19500.2017, M.20100.2013, M.20940.2012,
M.21140.2014, M.22220.2010, M.22500.2017, M.22500.2018, M.22660.2017,
M.23580.2013, M.24140.2017, M.24780.2012, M.25220.2010, M.25260.2016,
M.25860.2010, M.25940.2012, M.27180.2017, M.27900.2019, M.28420.2010,
M.28700.2011, M.29180.2010, M.29180.2011, M.29700.2015, M.31700.2013,
M.31900.2015, M.33780.2014, M.33860.2019, M.34740.2011, M.35660.2011,
M.37620.2016, M.37620.2018, M.39380.2011, M.39540.2017, M.40980.2015,
M.40980.2016, M.46220.2018, M.49700.2017, M.49740.2015, P.1.2500.2010,
P.1.500.2012, P.1.500.2013, P.1.500.2014, P.12.500.2017, P.12.6300.2012,
P.13.100.2012, P.13.100.2016, P.13.1200.2017, P.13.1500.2014, P.13.200.2011,
P.13.2200.2012, P.13.2500.2015, P.13.2800.2011, P.13.2800.2014, P.13.3200.2011,
P.13.3200.2013, P.13.4100.2011, P.13.4200.2012, P.13.700.2012, P.13.800.2013,
P.16.1300.2014, P.16.200.2011, P.17.200.2011, P.17.300.2016, P.17.600.2015,
P.17.700.2011, P.17.700.2012, P.17.900.2011, P.17.900.2014, P.18.1300.2019,
P.18.2600.2011, P.18.3100.2013, P.18.3200.2013, P.18.3400.2019, P.18.600.2014,
P.18.700.2013, P.18.800.2016, P.19.1300.2018, P.19.500.2010, P.19.700.2017,
P.19.800.2017, P.20.100.2014, P.20.100.2019, P.20.1200.2013, P.20.1200.2015,
P.20.1200.2018, P.20.900.2010, P.20.900.2016, P.21.100.2011, P.21.100.2015,
P.21.1400.2014, P.21.2000.2015, P.21.400.2019, P.21.600.2011, P.22.1200.2010,
P.22.300.2018, P.22.600.2016, P.24.100.2016, P.24.1300.2015, P.24.1500.2014,
P.26.100.2019, P.26.1700.2010, P.26.1702.2012, P.26.1703.2014, P.26.2200.2016,
P.26.2200.2018, P.26.600.2019, P.26.700.2011, P.27.100.2016, P.27.200.2014,
P.27.400.2018, P.27.600.2011, P.27.800.2018, P.28.500.2013, P.28.700.2015,
P.29.100.2018, P.29.1200.2010, P.29.1400.2018, P.29.2200.2011, P.29.2200.2019,
P.29.2300.2015, P.29.2400.2017, P.29.300.2012, P.29.700.2010, P.29.700.2015,
P.30.200.2019, P.30.300.2017, P.30.400.2019, P.30.500.2014, P.30.700.2019,
P.31.100.2014, P.31.500.2012, P.32.400.2010, P.33.500.2014, P.35.100.2017,
P.35.100.2019, P.35.1100.2012, P.35.1200.2012, P.36.200.2013, P.36.2402.2019,
P.36.2500.2018, P.36.2702.2012, P.36.2702.2018, P.37.1000.2015, P.37.2400.2013,
P.37.2400.2017, P.37.3300.2013, P.37.3500.2011, P.37.3900.2011, P.37.3900.2016,
P.37.4400.2016, P.37.4500.2017, P.37.5100.2012, P.37.5100.2017, P.37.5200.2015,
P.37.700.2017, P.38.200.2016, P.38.300.2011, P.39.100.2013, P.39.2700.2017,
P.39.3500.2015, P.39.3700.2012, P.39.4500.2016, P.39.4700.2010, P.39.4900.2015,
P.39.5100.2017, P.40.100.2010, P.40.601.2014, P.41.300.2013, P.41.800.2011,
P.42.1100.2018, P.42.1900.2013, P.42.300.2016, P.42.3702.2014, P.42.600.2010,
P.45.1200.2011, P.45.1300.2015, P.45.400.2018, P.45.800.2012, P.45.800.2019,
P.46.200.2011, P.46.300.2010, P.46.300.2018, P.46.400.2011, P.46.400.2013,
P.46.600.2015, P.47.1100.2011, P.47.1100.2013, P.47.1700.2010, P.47.1900.2013,
P.47.1900.2015, P.47.200.2010, P.47.200.2011, P.47.200.2016, P.47.2200.2014,
P.47.2800.2011, P.47.2800.2013, P.47.2800.2018, P.48.100.2018, P.48.1000.2019,
P.48.1100.2010, P.48.1200.2016, P.48.1700.2017, P.48.1700.2018, P.48.2600.2012,
P.48.3601.2012, P.48.3601.2015, P.48.3900.2018, P.48.4000.2012, P.48.4000.2015,
P.48.5000.2014, P.48.600.2015, P.48.6200.2010, P.48.6200.2013, P.49.21001.2014,
P.5.1300.2010, P.5.1300.2013, P.5.1400.2011, P.5.1400.2018, P.5.1500.2017,
P.5.1500.2019, P.5.1700.2019, P.5.1800.2011, P.5.2000.2012, P.5.300.2012,
P.5.300.2017, P.5.400.2017, P.5.600.2015, P.5.700.2011, P.5.800.2012,
P.50.200.2012, P.50.300.2011, P.51.1600.2011, P.51.400.2011, P.51.51084.2012,
P.51.51084.2013, P.51.51085.2013, P.51.51097.2012, P.51.51105.2013,
P.51.51125.2015, P.53.10702.2013, P.53.10702.2015, P.53.10702.2016,
P.53.11200.2012, P.53.11200.2018, P.53.11900.2015, P.53.300.2010,
P.54.400.2017, P.54.600.2013, P.54.900.2010, P.55.1300.2014, P.55.1400.2015,
P.55.55101.2018, P.56.300.2012, P.56.400.2012, P.56.500.2018, P.6.3300.2013,
P.6.3300.2016, P.8.600.2014, P.8.802.2011, P.8.802.2017
Warning in generateCouples(n_fakes, as.data.frame(unions_multi),
as.data.frame(male_alt_multi), : The following areas had less than the required
sample for men and women and the entire list was drawn: C.12.91.2018,
C.13.51.2013, C.13.51.2014, C.16.19.2018, C.19.13.2011, C.19.153.2011,
C.19.163.2012, C.19.163.2015, C.23.11.2016, C.24.43.2012, C.37.49.2015,
C.37.49.2017, C.37.85.2013, C.37.85.2017, C.38.17.2017, C.41.19.2010,
C.45.51.2010, C.47.179.2012, C.48.441.2010, C.48.441.2015, C.48.441.2017,
C.48.441.2018, C.55.25.2017, C.55.9.2015, C.6.23.2012, M.11500.2015,
M.12020.2010, M.12100.2019, M.12220.2015, M.12620.2014, M.12620.2016,
M.12700.2017, M.12980.2010, M.13980.2013, M.14020.2010, M.15540.2016,
M.15980.2012, M.16580.2011, M.16620.2015, M.16620.2017, M.16860.2013,
M.17660.2015, M.17660.2018, M.17780.2010, M.17780.2019, M.18580.2018,
M.19460.2011, M.19460.2012, M.19500.2017, M.20100.2013, M.20940.2012,
M.21140.2014, M.22220.2010, M.22500.2017, M.22500.2018, M.22660.2017,
M.23580.2013, M.24140.2017, M.24780.2012, M.25220.2010, M.25260.2016,
M.25860.2010, M.25940.2012, M.27180.2017, M.27900.2019, M.28420.2010,
M.28700.2011, M.29180.2010, M.29180.2011, M.29700.2015, M.31700.2013,
M.31900.2015, M.33780.2014, M.33860.2019, M.34740.2011, M.35660.2011,
M.37620.2016, M.37620.2018, M.39380.2011, M.39540.2017, M.40980.2015,
M.40980.2016, M.46220.2018, M.49700.2017, M.49740.2015, P.1.2500.2010,
P.1.500.2012, P.1.500.2013, P.1.500.2014, P.12.500.2017, P.12.6300.2012,
P.13.100.2012, P.13.100.2016, P.13.1200.2017, P.13.1500.2014, P.13.200.2011,
P.13.2200.2012, P.13.2500.2015, P.13.2800.2011, P.13.2800.2014, P.13.3200.2011,
P.13.3200.2013, P.13.4100.2011, P.13.4200.2012, P.13.700.2012, P.13.800.2013,
P.16.1300.2014, P.16.200.2011, P.17.200.2011, P.17.300.2016, P.17.600.2015,
P.17.700.2011, P.17.700.2012, P.17.900.2011, P.17.900.2014, P.18.1300.2019,
P.18.2600.2011, P.18.3100.2013, P.18.3200.2013, P.18.3400.2019, P.18.600.2014,
P.18.700.2013, P.18.800.2016, P.19.1300.2018, P.19.500.2010, P.19.700.2017,
P.19.800.2017, P.20.100.2014, P.20.100.2019, P.20.1200.2013, P.20.1200.2015,
P.20.1200.2018, P.20.900.2010, P.20.900.2016, P.21.100.2011, P.21.100.2015,
P.21.1400.2014, P.21.2000.2015, P.21.400.2019, P.21.600.2011, P.22.1200.2010,
P.22.300.2018, P.22.600.2016, P.24.100.2016, P.24.1300.2015, P.24.1500.2014,
P.26.100.2019, P.26.1700.2010, P.26.1702.2012, P.26.1703.2014, P.26.2200.2016,
P.26.2200.2018, P.26.600.2019, P.26.700.2011, P.27.100.2016, P.27.200.2014,
P.27.400.2018, P.27.600.2011, P.27.800.2018, P.28.500.2013, P.28.700.2015,
P.29.100.2018, P.29.1200.2010, P.29.1400.2018, P.29.2200.2011, P.29.2200.2019,
P.29.2300.2015, P.29.2400.2017, P.29.300.2012, P.29.700.2010, P.29.700.2015,
P.30.200.2019, P.30.300.2017, P.30.400.2019, P.30.500.2014, P.30.700.2019,
P.31.100.2014, P.31.500.2012, P.32.400.2010, P.33.500.2014, P.35.100.2017,
P.35.100.2019, P.35.1100.2012, P.35.1200.2012, P.36.200.2013, P.36.2402.2019,
P.36.2500.2018, P.36.2702.2012, P.36.2702.2018, P.37.1000.2015, P.37.2400.2013,
P.37.2400.2017, P.37.3300.2013, P.37.3500.2011, P.37.3900.2011, P.37.3900.2016,
P.37.4400.2016, P.37.4500.2017, P.37.5100.2012, P.37.5100.2017, P.37.5200.2015,
P.37.700.2017, P.38.200.2016, P.38.300.2011, P.39.100.2013, P.39.2700.2017,
P.39.3500.2015, P.39.3700.2012, P.39.4500.2016, P.39.4700.2010, P.39.4900.2015,
P.39.5100.2017, P.40.100.2010, P.40.601.2014, P.41.300.2013, P.41.800.2011,
P.42.1100.2018, P.42.1900.2013, P.42.300.2016, P.42.3702.2014, P.42.600.2010,
P.45.1200.2011, P.45.1300.2015, P.45.400.2018, P.45.800.2012, P.45.800.2019,
P.46.200.2011, P.46.300.2010, P.46.300.2018, P.46.400.2011, P.46.400.2013,
P.46.600.2015, P.47.1100.2011, P.47.1100.2013, P.47.1700.2010, P.47.1900.2013,
P.47.1900.2015, P.47.200.2010, P.47.200.2011, P.47.200.2016, P.47.2200.2014,
P.47.2800.2011, P.47.2800.2013, P.47.2800.2018, P.48.100.2018, P.48.1000.2019,
P.48.1100.2010, P.48.1200.2016, P.48.1700.2017, P.48.1700.2018, P.48.2600.2012,
P.48.3601.2012, P.48.3601.2015, P.48.3900.2018, P.48.4000.2012, P.48.4000.2015,
P.48.5000.2014, P.48.600.2015, P.48.6200.2010, P.48.6200.2013, P.49.21001.2014,
P.5.1300.2010, P.5.1300.2013, P.5.1400.2011, P.5.1400.2018, P.5.1500.2017,
P.5.1500.2019, P.5.1700.2019, P.5.1800.2011, P.5.2000.2012, P.5.300.2012,
P.5.300.2017, P.5.400.2017, P.5.600.2015, P.5.700.2011, P.5.800.2012,
P.50.200.2012, P.50.300.2011, P.51.1600.2011, P.51.400.2011, P.51.51084.2012,
P.51.51084.2013, P.51.51085.2013, P.51.51097.2012, P.51.51105.2013,
P.51.51125.2015, P.53.10702.2013, P.53.10702.2015, P.53.10702.2016,
P.53.11200.2012, P.53.11200.2018, P.53.11900.2015, P.53.300.2010,
P.54.400.2017, P.54.600.2013, P.54.900.2010, P.55.1300.2014, P.55.1400.2015,
P.55.55101.2018, P.56.300.2012, P.56.400.2012, P.56.500.2018, P.6.3300.2013,
P.6.3300.2016, P.8.600.2014, P.8.802.2011, P.8.802.2017
Warning in generateCouples(n_fakes, as.data.frame(unions_multi),
as.data.frame(male_alt_multi), : The following areas had less than the required
sample for men and women and the entire list was drawn: C.12.91.2018,
C.13.51.2013, C.13.51.2014, C.16.19.2018, C.19.13.2011, C.19.153.2011,
C.19.163.2012, C.19.163.2015, C.23.11.2016, C.24.43.2012, C.37.49.2015,
C.37.49.2017, C.37.85.2013, C.37.85.2017, C.38.17.2017, C.41.19.2010,
C.45.51.2010, C.47.179.2012, C.48.441.2010, C.48.441.2015, C.48.441.2017,
C.48.441.2018, C.55.25.2017, C.55.9.2015, C.6.23.2012, M.11500.2015,
M.12020.2010, M.12100.2019, M.12220.2015, M.12620.2014, M.12620.2016,
M.12700.2017, M.12980.2010, M.13980.2013, M.14020.2010, M.15540.2016,
M.15980.2012, M.16580.2011, M.16620.2015, M.16620.2017, M.16860.2013,
M.17660.2015, M.17660.2018, M.17780.2010, M.17780.2019, M.18580.2018,
M.19460.2011, M.19460.2012, M.19500.2017, M.20100.2013, M.20940.2012,
M.21140.2014, M.22220.2010, M.22500.2017, M.22500.2018, M.22660.2017,
M.23580.2013, M.24140.2017, M.24780.2012, M.25220.2010, M.25260.2016,
M.25860.2010, M.25940.2012, M.27180.2017, M.27900.2019, M.28420.2010,
M.28700.2011, M.29180.2010, M.29180.2011, M.29700.2015, M.31700.2013,
M.31900.2015, M.33780.2014, M.33860.2019, M.34740.2011, M.35660.2011,
M.37620.2016, M.37620.2018, M.39380.2011, M.39540.2017, M.40980.2015,
M.40980.2016, M.46220.2018, M.49700.2017, M.49740.2015, P.1.2500.2010,
P.1.500.2012, P.1.500.2013, P.1.500.2014, P.12.500.2017, P.12.6300.2012,
P.13.100.2012, P.13.100.2016, P.13.1200.2017, P.13.1500.2014, P.13.200.2011,
P.13.2200.2012, P.13.2500.2015, P.13.2800.2011, P.13.2800.2014, P.13.3200.2011,
P.13.3200.2013, P.13.4100.2011, P.13.4200.2012, P.13.700.2012, P.13.800.2013,
P.16.1300.2014, P.16.200.2011, P.17.200.2011, P.17.300.2016, P.17.600.2015,
P.17.700.2011, P.17.700.2012, P.17.900.2011, P.17.900.2014, P.18.1300.2019,
P.18.2600.2011, P.18.3100.2013, P.18.3200.2013, P.18.3400.2019, P.18.600.2014,
P.18.700.2013, P.18.800.2016, P.19.1300.2018, P.19.500.2010, P.19.700.2017,
P.19.800.2017, P.20.100.2014, P.20.100.2019, P.20.1200.2013, P.20.1200.2015,
P.20.1200.2018, P.20.900.2010, P.20.900.2016, P.21.100.2011, P.21.100.2015,
P.21.1400.2014, P.21.2000.2015, P.21.400.2019, P.21.600.2011, P.22.1200.2010,
P.22.300.2018, P.22.600.2016, P.24.100.2016, P.24.1300.2015, P.24.1500.2014,
P.26.100.2019, P.26.1700.2010, P.26.1702.2012, P.26.1703.2014, P.26.2200.2016,
P.26.2200.2018, P.26.600.2019, P.26.700.2011, P.27.100.2016, P.27.200.2014,
P.27.400.2018, P.27.600.2011, P.27.800.2018, P.28.500.2013, P.28.700.2015,
P.29.100.2018, P.29.1200.2010, P.29.1400.2018, P.29.2200.2011, P.29.2200.2019,
P.29.2300.2015, P.29.2400.2017, P.29.300.2012, P.29.700.2010, P.29.700.2015,
P.30.200.2019, P.30.300.2017, P.30.400.2019, P.30.500.2014, P.30.700.2019,
P.31.100.2014, P.31.500.2012, P.32.400.2010, P.33.500.2014, P.35.100.2017,
P.35.100.2019, P.35.1100.2012, P.35.1200.2012, P.36.200.2013, P.36.2402.2019,
P.36.2500.2018, P.36.2702.2012, P.36.2702.2018, P.37.1000.2015, P.37.2400.2013,
P.37.2400.2017, P.37.3300.2013, P.37.3500.2011, P.37.3900.2011, P.37.3900.2016,
P.37.4400.2016, P.37.4500.2017, P.37.5100.2012, P.37.5100.2017, P.37.5200.2015,
P.37.700.2017, P.38.200.2016, P.38.300.2011, P.39.100.2013, P.39.2700.2017,
P.39.3500.2015, P.39.3700.2012, P.39.4500.2016, P.39.4700.2010, P.39.4900.2015,
P.39.5100.2017, P.40.100.2010, P.40.601.2014, P.41.300.2013, P.41.800.2011,
P.42.1100.2018, P.42.1900.2013, P.42.300.2016, P.42.3702.2014, P.42.600.2010,
P.45.1200.2011, P.45.1300.2015, P.45.400.2018, P.45.800.2012, P.45.800.2019,
P.46.200.2011, P.46.300.2010, P.46.300.2018, P.46.400.2011, P.46.400.2013,
P.46.600.2015, P.47.1100.2011, P.47.1100.2013, P.47.1700.2010, P.47.1900.2013,
P.47.1900.2015, P.47.200.2010, P.47.200.2011, P.47.200.2016, P.47.2200.2014,
P.47.2800.2011, P.47.2800.2013, P.47.2800.2018, P.48.100.2018, P.48.1000.2019,
P.48.1100.2010, P.48.1200.2016, P.48.1700.2017, P.48.1700.2018, P.48.2600.2012,
P.48.3601.2012, P.48.3601.2015, P.48.3900.2018, P.48.4000.2012, P.48.4000.2015,
P.48.5000.2014, P.48.600.2015, P.48.6200.2010, P.48.6200.2013, P.49.21001.2014,
P.5.1300.2010, P.5.1300.2013, P.5.1400.2011, P.5.1400.2018, P.5.1500.2017,
P.5.1500.2019, P.5.1700.2019, P.5.1800.2011, P.5.2000.2012, P.5.300.2012,
P.5.300.2017, P.5.400.2017, P.5.600.2015, P.5.700.2011, P.5.800.2012,
P.50.200.2012, P.50.300.2011, P.51.1600.2011, P.51.400.2011, P.51.51084.2012,
P.51.51084.2013, P.51.51085.2013, P.51.51097.2012, P.51.51105.2013,
P.51.51125.2015, P.53.10702.2013, P.53.10702.2015, P.53.10702.2016,
P.53.11200.2012, P.53.11200.2018, P.53.11900.2015, P.53.300.2010,
P.54.400.2017, P.54.600.2013, P.54.900.2010, P.55.1300.2014, P.55.1400.2015,
P.55.55101.2018, P.56.300.2012, P.56.400.2012, P.56.500.2018, P.6.3300.2013,
P.6.3300.2016, P.8.600.2014, P.8.802.2011, P.8.802.2017
Warning in generateCouples(n_fakes, as.data.frame(unions_multi),
as.data.frame(male_alt_multi), : The following areas had less than the required
sample for men and women and the entire list was drawn: C.12.91.2018,
C.13.51.2013, C.13.51.2014, C.16.19.2018, C.19.13.2011, C.19.153.2011,
C.19.163.2012, C.19.163.2015, C.23.11.2016, C.24.43.2012, C.37.49.2015,
C.37.49.2017, C.37.85.2013, C.37.85.2017, C.38.17.2017, C.41.19.2010,
C.45.51.2010, C.47.179.2012, C.48.441.2010, C.48.441.2015, C.48.441.2017,
C.48.441.2018, C.55.25.2017, C.55.9.2015, C.6.23.2012, M.11500.2015,
M.12020.2010, M.12100.2019, M.12220.2015, M.12620.2014, M.12620.2016,
M.12700.2017, M.12980.2010, M.13980.2013, M.14020.2010, M.15540.2016,
M.15980.2012, M.16580.2011, M.16620.2015, M.16620.2017, M.16860.2013,
M.17660.2015, M.17660.2018, M.17780.2010, M.17780.2019, M.18580.2018,
M.19460.2011, M.19460.2012, M.19500.2017, M.20100.2013, M.20940.2012,
M.21140.2014, M.22220.2010, M.22500.2017, M.22500.2018, M.22660.2017,
M.23580.2013, M.24140.2017, M.24780.2012, M.25220.2010, M.25260.2016,
M.25860.2010, M.25940.2012, M.27180.2017, M.27900.2019, M.28420.2010,
M.28700.2011, M.29180.2010, M.29180.2011, M.29700.2015, M.31700.2013,
M.31900.2015, M.33780.2014, M.33860.2019, M.34740.2011, M.35660.2011,
M.37620.2016, M.37620.2018, M.39380.2011, M.39540.2017, M.40980.2015,
M.40980.2016, M.46220.2018, M.49700.2017, M.49740.2015, P.1.2500.2010,
P.1.500.2012, P.1.500.2013, P.1.500.2014, P.12.500.2017, P.12.6300.2012,
P.13.100.2012, P.13.100.2016, P.13.1200.2017, P.13.1500.2014, P.13.200.2011,
P.13.2200.2012, P.13.2500.2015, P.13.2800.2011, P.13.2800.2014, P.13.3200.2011,
P.13.3200.2013, P.13.4100.2011, P.13.4200.2012, P.13.700.2012, P.13.800.2013,
P.16.1300.2014, P.16.200.2011, P.17.200.2011, P.17.300.2016, P.17.600.2015,
P.17.700.2011, P.17.700.2012, P.17.900.2011, P.17.900.2014, P.18.1300.2019,
P.18.2600.2011, P.18.3100.2013, P.18.3200.2013, P.18.3400.2019, P.18.600.2014,
P.18.700.2013, P.18.800.2016, P.19.1300.2018, P.19.500.2010, P.19.700.2017,
P.19.800.2017, P.20.100.2014, P.20.100.2019, P.20.1200.2013, P.20.1200.2015,
P.20.1200.2018, P.20.900.2010, P.20.900.2016, P.21.100.2011, P.21.100.2015,
P.21.1400.2014, P.21.2000.2015, P.21.400.2019, P.21.600.2011, P.22.1200.2010,
P.22.300.2018, P.22.600.2016, P.24.100.2016, P.24.1300.2015, P.24.1500.2014,
P.26.100.2019, P.26.1700.2010, P.26.1702.2012, P.26.1703.2014, P.26.2200.2016,
P.26.2200.2018, P.26.600.2019, P.26.700.2011, P.27.100.2016, P.27.200.2014,
P.27.400.2018, P.27.600.2011, P.27.800.2018, P.28.500.2013, P.28.700.2015,
P.29.100.2018, P.29.1200.2010, P.29.1400.2018, P.29.2200.2011, P.29.2200.2019,
P.29.2300.2015, P.29.2400.2017, P.29.300.2012, P.29.700.2010, P.29.700.2015,
P.30.200.2019, P.30.300.2017, P.30.400.2019, P.30.500.2014, P.30.700.2019,
P.31.100.2014, P.31.500.2012, P.32.400.2010, P.33.500.2014, P.35.100.2017,
P.35.100.2019, P.35.1100.2012, P.35.1200.2012, P.36.200.2013, P.36.2402.2019,
P.36.2500.2018, P.36.2702.2012, P.36.2702.2018, P.37.1000.2015, P.37.2400.2013,
P.37.2400.2017, P.37.3300.2013, P.37.3500.2011, P.37.3900.2011, P.37.3900.2016,
P.37.4400.2016, P.37.4500.2017, P.37.5100.2012, P.37.5100.2017, P.37.5200.2015,
P.37.700.2017, P.38.200.2016, P.38.300.2011, P.39.100.2013, P.39.2700.2017,
P.39.3500.2015, P.39.3700.2012, P.39.4500.2016, P.39.4700.2010, P.39.4900.2015,
P.39.5100.2017, P.40.100.2010, P.40.601.2014, P.41.300.2013, P.41.800.2011,
P.42.1100.2018, P.42.1900.2013, P.42.300.2016, P.42.3702.2014, P.42.600.2010,
P.45.1200.2011, P.45.1300.2015, P.45.400.2018, P.45.800.2012, P.45.800.2019,
P.46.200.2011, P.46.300.2010, P.46.300.2018, P.46.400.2011, P.46.400.2013,
P.46.600.2015, P.47.1100.2011, P.47.1100.2013, P.47.1700.2010, P.47.1900.2013,
P.47.1900.2015, P.47.200.2010, P.47.200.2011, P.47.200.2016, P.47.2200.2014,
P.47.2800.2011, P.47.2800.2013, P.47.2800.2018, P.48.100.2018, P.48.1000.2019,
P.48.1100.2010, P.48.1200.2016, P.48.1700.2017, P.48.1700.2018, P.48.2600.2012,
P.48.3601.2012, P.48.3601.2015, P.48.3900.2018, P.48.4000.2012, P.48.4000.2015,
P.48.5000.2014, P.48.600.2015, P.48.6200.2010, P.48.6200.2013, P.49.21001.2014,
P.5.1300.2010, P.5.1300.2013, P.5.1400.2011, P.5.1400.2018, P.5.1500.2017,
P.5.1500.2019, P.5.1700.2019, P.5.1800.2011, P.5.2000.2012, P.5.300.2012,
P.5.300.2017, P.5.400.2017, P.5.600.2015, P.5.700.2011, P.5.800.2012,
P.50.200.2012, P.50.300.2011, P.51.1600.2011, P.51.400.2011, P.51.51084.2012,
P.51.51084.2013, P.51.51085.2013, P.51.51097.2012, P.51.51105.2013,
P.51.51125.2015, P.53.10702.2013, P.53.10702.2015, P.53.10702.2016,
P.53.11200.2012, P.53.11200.2018, P.53.11900.2015, P.53.300.2010,
P.54.400.2017, P.54.600.2013, P.54.900.2010, P.55.1300.2014, P.55.1400.2015,
P.55.55101.2018, P.56.300.2012, P.56.400.2012, P.56.500.2018, P.6.3300.2013,
P.6.3300.2016, P.8.600.2014, P.8.802.2011, P.8.802.2017
Code
mar_markets_multi <- lapply(mar_markets_multi, as_tibble)

Check that we have no monoracial people here:

Code
summary(mar_markets_multi[[1]]$raceh)
     White-Black White-Indigenous      White-Asian Black-Indigenous 
            2586             6625             3578             1079 
     Black-Asian Asian-Indigenous 
             403              673 
Code
summary(mar_markets_multi[[1]]$racew)
     White-Black White-Indigenous      White-Asian Black-Indigenous 
            2486             6802             3529              978 
     Black-Asian Asian-Indigenous 
             425              724 
Code
save(unions, male_alt, female_alt,
     file = here("data", "data_constructed", "unions_alts.RData"))
save(mar_markets, mar_markets_multi, 
     file = here("data", "data_constructed", "markets.RData"))
Code
timestamp()
##------ Wed Apr 23 12:35:14 2025 ------##