Library

library(car)
## Lade nötiges Paket: carData
library(psych)
## 
## Attache Paket: 'psych'
## Das folgende Objekt ist maskiert 'package:car':
## 
##     logit
library(ggplot2)
## 
## Attache Paket: 'ggplot2'
## Die folgenden Objekte sind maskiert von 'package:psych':
## 
##     %+%, alpha
library(formr)
library(codebook)
## 
## Attache Paket: 'codebook'
## Die folgenden Objekte sind maskiert von 'package:formr':
## 
##     aggregate_and_document_scale, expired, rescue_attributes,
##     reverse_labelled_values
## Das folgende Objekt ist maskiert 'package:psych':
## 
##     bfi
library(dplyr)
## 
## Attache Paket: 'dplyr'
## Die folgenden Objekte sind maskiert von 'package:formr':
## 
##     first, last
## Das folgende Objekt ist maskiert 'package:car':
## 
##     recode
## Die folgenden Objekte sind maskiert von 'package:stats':
## 
##     filter, lag
## Die folgenden Objekte sind maskiert von 'package:base':
## 
##     intersect, setdiff, setequal, union

Data

Load selected data based on 00_dataimport

fulldata_selected = read.csv(file = "fulldata_selected.csv")[,-1]

Inspect Data

colnames(fulldata_selected)
##  [1] "political_orientation"           "age"                            
##  [3] "interest_single"                 "interest_sexrel"                
##  [5] "interest_nonmonrel"              "interest_monrel"                
##  [7] "pref_politicalsim"               "pref_ethnicalsim"               
##  [9] "pref_religioussim"               "pref_level_kind"                
## [11] "pref_level_supportive"           "pref_level_attractive_body"     
## [13] "pref_level_attractive_face"      "pref_level_financially_secure"  
## [15] "pref_level_successful_ambitious" "pref_level_confident"           
## [17] "pref_level_assertive"            "pref_level_intelligence"        
## [19] "pref_level_educated"             "imp_age"                        
## [21] "ideal_age"                       "imp_height"                     
## [23] "ideal_height"                    "country"                        
## [25] "language"                        "sex"                            
## [27] "sexual_orientation"              "relationship"                   
## [29] "relationship1"                   "relationship2"                  
## [31] "relationship3"                   "relationship4"                  
## [33] "relationship5"                   "answer_accuracy"
fulldata_selected_wrangled = fulldata_selected

Age

Participants younger than 18 were able to insert age but the survey was ended for them afterwards.

table(fulldata_selected_wrangled$age)
## 
##          0          1          2          5          8         10         11 
##         12          5          4          2          1         13        121 
##         12         13         14         15         16         17         18 
##        615       1701       3225       5361       7594       7984      14137 
##         19         20         21         22         23         24         25 
##       6613       5217       4535       3753       3341       2997       2833 
##         26         27         28         29         30         31         32 
##       2619       2432       2275       2022       1917       1578       1483 
##         33         34         35         36         37         38         39 
##       1265       1152       1052        949        779        721        607 
##         40         41         42         43         44         45         46 
##        610        464        494        408        323        317        231 
##         47         48         49         50         51         52         53 
##        214        167        112        103         61         57         30 
##         54         55         56         57         58         59         60 
##         27         32         20         15         16          8         12 
##         61         62         63         64         65         66         67 
##          5          6          8         11          5         11          6 
##         68         69         70         71         73         75         76 
##          7          3          8          6          2          2          1 
##         77         78         80         85        100        111        116 
##          1          2          1          1          1          1          1 
##        160        175        183        210        222        223        247 
##          1          1          1          1          1          1          1 
##        293        447        789       1516   36015310 5090897866 
##          1          1          1          1          1          1

Set all numbers > 100 as missing:

sum(fulldata_selected_wrangled$age > 100)
## [1] 15
# This means that age is set as missing for 15 people

fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(age = ifelse(age > 100, NA, age))

table(is.na(fulldata_selected_wrangled$age))
## 
## FALSE  TRUE 
## 94723    15
table(fulldata_selected_wrangled$age < 18)
## 
## FALSE  TRUE 
## 68085 26638
# 26638 people were not allowed to participate in the survey because they were younger than 18

Political Orientation

Political Orientation item should range from 0 to 6

fulldata_selected_wrangled %>%
  select("political_orientation") %>%
  lapply(table)
## $political_orientation
## 
##     0     1     2     3     4     5     6 
##  6354  8870 11049 18306  5148  1984  1364
qplot(fulldata_selected_wrangled$political_orientation)
## Warning: `qplot()` was deprecated in ggplot2 3.4.0.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41663 rows containing non-finite outside the scale range
## (`stat_bin()`).

Preferred Relationship Options

Interest in being single, interest in sexual (non-romantic) relationships, interest in non-monogamous relationships and interest in monogamous relationships items should range from 0 to 6

fulldata_selected_wrangled %>%
  select(starts_with("interest_")) %>%
  lapply(table)
## $interest_single
## 
##     0     1     2     3     4     5     6 
## 17549  7474  7922 10540  5402  2738  1972 
## 
## $interest_sexrel
## 
##     0     1     2     3     4     5     6 
## 18336  6631  7148  8171  5716  3575  4005 
## 
## $interest_nonmonrel
## 
##     0     1     2     3     4     5     6 
## 32054  5979  4297  4668  2738  1624  2075 
## 
## $interest_monrel
## 
##     0     1     2     3     4     5     6 
##  3667  1039  1442  4249  5718  9801 27557
qplot(fulldata_selected_wrangled$interest_single)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41141 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$interest_sexrel)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41156 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$interest_nonmonrel)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41303 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$interest_monrel)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41265 rows containing non-finite outside the scale range
## (`stat_bin()`).

Political, Ethnical, and Religious Similarity

Preferences for political, ethnical and religious similarity items should range from 0 to 6

fulldata_selected_wrangled %>%
  select("pref_politicalsim", "pref_ethnicalsim", "pref_religioussim") %>%
  lapply(table)
## $pref_politicalsim
## 
##     0     1     2     3     4     5     6 
## 10261  3146  5875 11468 12349 10190  8242 
## 
## $pref_ethnicalsim
## 
##     0     1     2     3     4     5     6 
##  2068  2387  3579 15778  6382  3748  2926 
## 
## $pref_religioussim
## 
##     0     1     2     3     4     5     6 
## 17076  4528  6521  9558  8245  6440  9137
qplot(fulldata_selected_wrangled$pref_politicalsim)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 33207 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_ethnicalsim)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 57870 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_religioussim)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 33233 rows containing non-finite outside the scale range
## (`stat_bin()`).

Ideal Partner Preferences

All ideal partner preference items should range from 0 to 6

fulldata_selected_wrangled %>%
  select(starts_with("pref_")) %>%
  select(-pref_politicalsim, -pref_ethnicalsim, -pref_religioussim) %>%
  lapply(table)
## $pref_level_kind
## 
##     0     1     2     3     4     5     6 
##     9    29   193  1713  9293 20726 32604 
## 
## $pref_level_supportive
## 
##     0     1     2     3     4     5     6 
##    22    41   204  2202 13705 23723 24858 
## 
## $pref_level_attractive_body
## 
##     0     1     2     3     4     5     6 
##   167  1024  4285 19092 24097 10152  3306 
## 
## $pref_level_attractive_face
## 
##     0     1     2     3     4     5     6 
##    77   747  2617 12363 22965 17006  7027 
## 
## $pref_level_financially_secure
## 
##     0     1     2     3     4     5     6 
##   213   739  2885 13220 21693 15961  7915 
## 
## $pref_level_successful_ambitious
## 
##     0     1     2     3     4     5     6 
##   111   495  1988 10604 22153 17865 10877 
## 
## $pref_level_confident
## 
##     0     1     2     3     4     5     6 
##    24   138   853  7622 21269 17942 16707 
## 
## $pref_level_assertive
## 
##     0     1     2     3     4     5     6 
##   119   482  2492 15755 25253 14572  5786 
## 
## $pref_level_intelligence
## 
##     0     1     2     3     4     5     6 
##    18    76   347  4461 18515 25057 16041 
## 
## $pref_level_educated
## 
##     0     1     2     3     4     5     6 
##   112   299  1198  7865 19824 19876 14603
qplot(fulldata_selected_wrangled$pref_level_kind)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 30171 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_supportive)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 29983 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_attractive_body)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 32615 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_attractive_face)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 31936 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_financially_secure)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 32112 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_successful_ambitious)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 30645 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_confident)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 30183 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_assertive)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 30279 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_intelligence)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 30223 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_educated)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 30961 rows containing non-finite outside the scale range
## (`stat_bin()`).

fulldata_selected_wrangled %>%
  select(starts_with("pref_")) %>%
  select(-pref_politicalsim, -pref_ethnicalsim, -pref_religioussim) %>%
  md_pattern()
## # A tibble: 6 × 13
##   description         pref_level_supportive pref_level_kind pref_level_confident
##   <chr>                               <dbl>           <dbl>                <dbl>
## 1 Missing values per…                 29983           30171                30183
## 2 Missing values in …                     1               1                    1
## 3 Missing values in …                     0               0                    0
## 4 Missing values in …                     1               1                    1
## 5 Missing values in …                     1               1                    1
## 6 298 other, less fr…                   206             208                  186
## # ℹ 9 more variables: pref_level_intelligence <dbl>,
## #   pref_level_assertive <dbl>, pref_level_successful_ambitious <dbl>,
## #   pref_level_educated <dbl>, pref_level_attractive_face <dbl>,
## #   pref_level_financially_secure <dbl>, pref_level_attractive_body <dbl>,
## #   var_miss <dbl>, n_miss <dbl>

Ideal Age and Ideal Height

Importance Age

Item should range from 0 to 6

fulldata_selected_wrangled %>%
  select("imp_age") %>%
  lapply(table)
## $imp_age
## 
##     0     1     2     3     4     5     6 
##  3289  2823  6362 12278 16690  7816  3978
qplot(fulldata_selected_wrangled$imp_age)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41502 rows containing non-finite outside the scale range
## (`stat_bin()`).

Ideal Age

This item is in open format style

fulldata_selected_wrangled %>%
  select("ideal_age") %>%
  lapply(table)
## $ideal_age
## 
##    0   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24 
##    1  161    4   12    5   12   25   82  197 2184 2996 4294 2805 3040 2811 2238 
##   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40 
## 3879 2031 1939 2497 1076 3399  685 1463 1069  679 2183  674  507  796  240 1179 
##   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56 
##  142  350  266  173  698  134  116  174   51  288   24   56   32   15   77   15 
##   57   58   59   60   62   64   65   67   68   69   70   71   75   77   80   85 
##   10   15    3   24    6    2    6    2    3    2    3    2    1    1    1    1 
##   88   90   92   96   98   99  100 
##    1    1    1    1    1    1   11
qplot(fulldata_selected_wrangled$ideal_age)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 46865 rows containing non-finite outside the scale range
## (`stat_bin()`).

Variable ideal_age was not restricted to a reasonable number, thus numbers larger than 100 were possible. To deal with this we will set all numbers >= 100 as missing.

sum(fulldata_selected_wrangled$ideal_age > 100, na.rm = T)
## [1] 0
fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(ideal_age = ifelse(ideal_age > 100, NA, ideal_age))
          
table(is.na(fulldata_selected_wrangled$ideal_age))
## 
## FALSE  TRUE 
## 47873 46865
fulldata_selected_wrangled %>%
  select(ideal_age) %>%
  lapply(table)
## $ideal_age
## 
##    0   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24 
##    1  161    4   12    5   12   25   82  197 2184 2996 4294 2805 3040 2811 2238 
##   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40 
## 3879 2031 1939 2497 1076 3399  685 1463 1069  679 2183  674  507  796  240 1179 
##   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56 
##  142  350  266  173  698  134  116  174   51  288   24   56   32   15   77   15 
##   57   58   59   60   62   64   65   67   68   69   70   71   75   77   80   85 
##   10   15    3   24    6    2    6    2    3    2    3    2    1    1    1    1 
##   88   90   92   96   98   99  100 
##    1    1    1    1    1    1   11
qplot(fulldata_selected_wrangled$ideal_age)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 46865 rows containing non-finite outside the scale range
## (`stat_bin()`).

Importance Height

Item should range from 0 to 6

fulldata_selected_wrangled %>%
  select("imp_height") %>%
  lapply(table)
## $imp_height
## 
##     0     1     2     3     4     5     6 
##  4577  2763  5069  9928 15262  9445  5846
qplot(fulldata_selected_wrangled$imp_height)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 41848 rows containing non-finite outside the scale range
## (`stat_bin()`).

Ideal Height

Item has the options: much shorter than me, shorter than me, around the same height as me, taller than me, much taller than me

table(fulldata_selected_wrangled$ideal_height)
## 
##                              around the same height as me 
##                        46295                         5741 
##         much shorter than me          much taller than me 
##                           98                         4546 
##              shorter than me               taller than me 
##                          940                        37118
fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(ideal_height = ifelse(ideal_height == "", NA, ideal_height),
         ideal_height_numeric = as.factor(ideal_height))

fulldata_selected_wrangled$ideal_height_numeric = 
  dplyr::recode(fulldata_selected_wrangled$ideal_height_numeric,
         'much shorter than me' = -2,'shorter than me' = -1,
         'around the same height as me' = 0, 'taller than me' = 1,
         'much taller than me' = 2, .default = NULL, .missing = NULL)

table(fulldata_selected_wrangled$ideal_height)
## 
## around the same height as me         much shorter than me 
##                         5741                           98 
##          much taller than me              shorter than me 
##                         4546                          940 
##               taller than me 
##                        37118
class(fulldata_selected_wrangled$ideal_height_numeric)
## [1] "numeric"
levels(fulldata_selected_wrangled$ideal_height_numeric)
## NULL
fulldata_selected_wrangled %>%
  select("ideal_height_numeric") %>%
  lapply(table)
## $ideal_height_numeric
## 
##    -2    -1     0     1     2 
##    98   940  5741 37118  4546
qplot(fulldata_selected_wrangled$ideal_height_numeric)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 46295 rows containing non-finite outside the scale range
## (`stat_bin()`).

fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(ideal_height = ideal_height_numeric) %>%
  select(-ideal_height_numeric)

Country

fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(country = ifelse(country == "Korea, South",
                          "South Korea",
                          country),
         country = ifelse(country == "Congo, Democratic Republic of the",
                          "Congo, Republic of the",
                          country))

x = table(fulldata_selected_wrangled$country)
table(is.na(fulldata_selected_wrangled$country))
## 
## FALSE 
## 94738

Language

Chinese, Danish, English, French, German, Japanese, Portuguese, Russian, Spanish, Italian

table(fulldata_selected_wrangled$language)
## 
##    chinese     danish    english     french     german    italian   japanese 
##        441       2316      24387      18483      13346       6512       1577 
## portuguese    russian    spanish 
##       6450       1455      19771
table(is.na(fulldata_selected_wrangled$country))
## 
## FALSE 
## 94738

Sex

Categories: Woman; Genderqueer/Nonbinary; Man; None of the above; Prefer not to say; Other

table(fulldata_selected_wrangled$sex)
## 
##                       Genderqueer/Nonbinary                   Man 
##                 26638                   840                  2055 
##     None of the above                 Other     Prefer not to say 
##                    58                    43                   225 
##                 Woman 
##                 64879
# Set missing values as NA
fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(sex = as.character(sex),
         sex = ifelse(sex == "", NA, sex),
         sex = factor(sex))

table(fulldata_selected_wrangled$sex)
## 
## Genderqueer/Nonbinary                   Man     None of the above 
##                   840                  2055                    58 
##                 Other     Prefer not to say                 Woman 
##                    43                   225                 64879
table(is.na(fulldata_selected_wrangled$sex))
## 
## FALSE  TRUE 
## 68100 26638

Sexual Orientation

heterosexual; Lesbian/Gay/Homosexual; Bisexual/Pansexual; Queer; Asexual; Prefer not to say; Other

table(fulldata_selected_wrangled$sexual_orientation)
## 
##                                       Asexual     Bisexual/Pansexual 
##                  26638                    562                   9605 
## Lesbian/Gay/Homosexual                  Other      Prefer not to say 
##                   1508                    313                    634 
##                  Queer  Straight/Heterosexual 
##                    832                  54646
# Set missing values as NA
fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(sexual_orientation = as.character(sexual_orientation),
         sexual_orientation = ifelse(sexual_orientation == "", NA, sexual_orientation),
         sexual_orientation = factor(sexual_orientation))

table(fulldata_selected_wrangled$sexual_orientation)
## 
##                Asexual     Bisexual/Pansexual Lesbian/Gay/Homosexual 
##                    562                   9605                   1508 
##                  Other      Prefer not to say                  Queer 
##                    313                    634                    832 
##  Straight/Heterosexual 
##                  54646
table(is.na(fulldata_selected_wrangled$sexual_orientation))
## 
## FALSE  TRUE 
## 68100 26638

Relationship Variable

table(fulldata_selected_wrangled$relationship) #No romantic or sexual relationships during the past 3 months
## 
## False  True 
## 78064 16674
table(fulldata_selected_wrangled$relationship1) #Other
## 
## False  True 
## 94434   304
table(fulldata_selected_wrangled$relationship2) #Short-term (casual) sexual relationship (e.g. hookups or one-night-stands)
## 
## False  True 
## 88348  6390
table(fulldata_selected_wrangled$relationship3) #New (less than 1 month old) romantic and/or sexual relationship 
## 
## False  True 
## 89708  5030
table(fulldata_selected_wrangled$relationship4) #Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship
## 
## False  True 
## 85838  8900
table(fulldata_selected_wrangled$relationship5)#Long-term committed/exclusive sexual relationship with one or more partners
## 
## False  True 
## 63392 31346
fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(relationship = ifelse(relationship == "True",
                               "No romantic or sexual relationships during the past 3 months, ",
                               ""),
         relationship = ifelse(relationship1 == "True",
                               paste(relationship,
                                     "Other, "),
                               relationship),
         relationship = ifelse(relationship2 == "True",
                               paste(relationship,
                                     "Short-term (casual) sexual relationship (e.g. hookups or one-night-stands), "),
                               relationship),
         relationship = ifelse(relationship3 == "True",
                               paste(relationship,
                                     "New (less than 1 month old) romantic and/or sexual relationship, "),
                               relationship),
         relationship = ifelse(relationship4 == "True",
                               paste(relationship,
                                     "Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship, "),
                               relationship),
         relationship = ifelse(relationship5 == "True", 
                               paste(relationship,
                                     "Long-term committed/exclusive sexual relationship with one or more partners, "), 
                               relationship),
         relationship = ifelse(relationship == "", NA, relationship))

table(fulldata_selected_wrangled$relationship)
## 
##                                                                                                                                                                                                                                                                                                             Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                     29995 
##                                                                                                                                                                                                                                                                                                                         New (less than 1 month old) romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                      3704 
##                                                                                                                                                                                                                                           New (less than 1 month old) romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                       200 
##                                                                                                                                                                                                                           New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                       214 
##                                                                                                                                             New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                        35 
##                                                                                                                                                                                                                                                                                             Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                      7289 
##                                                                                                                                                                                                               Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                       484 
##                                                                                                                                                                                                                                                                                                     Other,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                       128 
##                                                                                                                                                                                                                                                                                                                 Other,  New (less than 1 month old) romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                        17 
##                                                                                                                                                                                                                                   Other,  New (less than 1 month old) romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         2 
##                                                                                                                                                                                                                   Other,  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
##                                                                                                                                                                                                                                                                                     Other,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                        33 
##                                                                                                                                                                                                       Other,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         2 
##                                                                                                                                                                                                                                                                                                      Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  
##                                                                                                                                                                                                                                                                                                                                                                                        32 
##                                                                                                                                                                                                                        Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
##                                                                                                                                                                                                                                    Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                         2 
##                                                                                                                                                      Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
##                                                                                                                                      Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
##                                                        Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
##                                                                                                                                                                                                        Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                         5 
##                                                                                                                                                                                                                                                                                                              Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  
##                                                                                                                                                                                                                                                                                                                                                                                      4544 
##                                                                                                                                                                                                                                Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                       273 
##                                                                                                                                                                                                                                            Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                       496 
##                                                                                                                                                              Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                        38 
##                                                                                                                                              Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                       195 
##                                                                Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                        24 
##                                                                                                                                                                                                                Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                       481 
##                                                                                                                                  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                        59 
##                                                                                                                                                                                                                                                                                                                            No romantic or sexual relationships during the past 3 months,  
##                                                                                                                                                                                                                                                                                                                                                                                     16137 
##                                                                                                                                                                                                                                              No romantic or sexual relationships during the past 3 months,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                        85 
##                                                                                                                                                                                                                                                          No romantic or sexual relationships during the past 3 months,  New (less than 1 month old) romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                        71 
##                                                                                                                                                                            No romantic or sexual relationships during the past 3 months,  New (less than 1 month old) romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         4 
##                                                                                                                                                            No romantic or sexual relationships during the past 3 months,  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                         4 
##                                                                              No romantic or sexual relationships during the past 3 months,  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
##                                                                                                                                                                                                                              No romantic or sexual relationships during the past 3 months,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                        55 
##                                                                                                                                                No romantic or sexual relationships during the past 3 months,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         4 
##                                                                                                                                                                                                                                                                                                                    No romantic or sexual relationships during the past 3 months,  Other,  
##                                                                                                                                                                                                                                                                                                                                                                                        74 
##                                                                                                                                                                                                                                      No romantic or sexual relationships during the past 3 months,  Other,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         2 
##                                                                                                                                                                                                                                       No romantic or sexual relationships during the past 3 months,  Other,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  
##                                                                                                                                                                                                                                                                                                                                                                                         2 
##                                                                                                                                                                                                                                               No romantic or sexual relationships during the past 3 months,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  
##                                                                                                                                                                                                                                                                                                                                                                                       202 
##                                                                                                                                                                 No romantic or sexual relationships during the past 3 months,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         4 
##                                                                                                                                                                             No romantic or sexual relationships during the past 3 months,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                        16 
##                                                                                               No romantic or sexual relationships during the past 3 months,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         1 
## No romantic or sexual relationships during the past 3 months,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  New (less than 1 month old) romantic and/or sexual relationship,  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  Long-term committed/exclusive sexual relationship with one or more partners,  
##                                                                                                                                                                                                                                                                                                                                                                                         2 
##                                                                                                                                                 No romantic or sexual relationships during the past 3 months,  Short-term (casual) sexual relationship (e.g. hookups or one-night-stands),  Ongoing (longer than 1 month) uncommitted/non-exclusive romantic and/or sexual relationship,  
##                                                                                                                                                                                                                                                                                                                                                                                        10
# Check whether command worked correctly
table(fulldata_selected_wrangled$relationship %contains% "No romantic or sexual relationships during the past 3 months") 
## 
## FALSE  TRUE 
## 48257 16674

Answer Accuracy

I took the survey seriously; please use my information in the study.; I did not answer seriously, please disregard my information; I choose not to answer

table(fulldata_selected_wrangled$answer_accuracy)
## 
##                                                                      
##                                                                33689 
##                                              I choose not to answer. 
##                                                                 1336 
##         I did not answer seriously; please disregard my information. 
##                                                                  734 
## I took the survey seriously; please use my information in the study. 
##                                                                58979
# Set missing values as NA
fulldata_selected_wrangled = fulldata_selected_wrangled %>%
  mutate(answer_accuracy = as.character(answer_accuracy),
         answer_accuracy = ifelse(answer_accuracy == "", NA, answer_accuracy),
         answer_accuracy = factor(answer_accuracy))

table(fulldata_selected_wrangled$answer_accuracy)
## 
##                                              I choose not to answer. 
##                                                                 1336 
##         I did not answer seriously; please disregard my information. 
##                                                                  734 
## I took the survey seriously; please use my information in the study. 
##                                                                58979
table(is.na(fulldata_selected_wrangled$answer_accuracy))
## 
## FALSE  TRUE 
## 61049 33689
fulldata_selected_wrangled %>%
  select(sex, answer_accuracy) %>%
  md_pattern()
## # A tibble: 4 × 5
##   description                     sex answer_accuracy var_miss n_miss
##   <chr>                         <dbl>           <dbl>    <dbl>  <dbl>
## 1 Missing values in 0 variables     1               1        0  61049
## 2 Missing values per variable   26638           33689    60327  60327
## 3 Missing values in 2 variables     0               0        2  26638
## 4 Missing values in 1 variables     1               0        1   7051

Creating new Variables for Ideal Partner Preferences

fulldata_selected_wrangled = fulldata_selected_wrangled %>% 
  mutate(pref_level_kind_supportive = (pref_level_kind + pref_level_supportive)/2,
         pref_level_attractiveness = (pref_level_attractive_body +
                                        pref_level_attractive_face)/2,
         pref_level_financially_secure_successful_ambitious = (pref_level_financially_secure + pref_level_successful_ambitious)/2,
         pref_level_confident_assertive = (pref_level_confident + pref_level_assertive)/2, 
         pref_level_intelligence_educated = (pref_level_intelligence + pref_level_educated)/2)

table(fulldata_selected_wrangled$pref_level_kind_supportive)
## 
##     1   1.5     2   2.5     3   3.5     4   4.5     5   5.5     6 
##     5     5    27    86   346  1276  4385  9485 15801 15765 16482
table(fulldata_selected_wrangled$pref_level_attractiveness)
## 
##     0   0.5     1   1.5     2   2.5     3   3.5     4   4.5     5   5.5     6 
##    26    38   294   514  1429  2353  8528  9893 15006 10768  7628  2884  1973
table(fulldata_selected_wrangled$pref_level_financially_secure_successful_ambitious)
## 
##     0   0.5     1   1.5     2   2.5     3   3.5     4   4.5     5   5.5     6 
##    15    22    77   236   755  1812  4958  9082 13177 12733 10168  5313  3337
table(fulldata_selected_wrangled$pref_level_confident_assertive)
## 
##     0   0.5     1   1.5     2   2.5     3   3.5     4   4.5     5   5.5     6 
##     1     5    22   106   329  1110  4433  9205 14201 13471 11027  6166  3461
table(fulldata_selected_wrangled$pref_level_intelligence_educated)
## 
##     0   0.5     1   1.5     2   2.5     3   3.5     4   4.5     5   5.5     6 
##     4     5    21    71   186   532  2196  4916 10967 12853 14678  8858  7989
qplot(fulldata_selected_wrangled$pref_level_kind_supportive)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 31075 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_attractiveness)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 33404 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_financially_secure_successful_ambitious)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 33053 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_confident_assertive)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 31201 rows containing non-finite outside the scale range
## (`stat_bin()`).

qplot(fulldata_selected_wrangled$pref_level_intelligence_educated)
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 31462 rows containing non-finite outside the scale range
## (`stat_bin()`).

Save Data

write.csv(fulldata_selected_wrangled, file = "fulldata_selected_wrangled.csv")
LS0tDQp0aXRsZTogPGZvbnQgY29sb3I9IiM2NkMyQTUiPkRhdGEgV3JhbmdsaW5nPC9mb250Pg0KY3NsOiBhcGEtY3VzdG9tLW5vLWlzc3VlLmNzbA0Kb3V0cHV0OiANCiAgaHRtbF9kb2N1bWVudDoNCiAgICBjb2RlX2ZvbGRpbmc6ICJzaG93Ig0KZWRpdG9yX29wdGlvbnM6IA0KICBjaHVua19vdXRwdXRfdHlwZTogY29uc29sZQ0KLS0tDQoNCiMjIHsudGFic2V0fQ0KDQojIyMgTGlicmFyeQ0KYGBge3IgTGlicmFyeX0NCmxpYnJhcnkoY2FyKQ0KbGlicmFyeShwc3ljaCkNCmxpYnJhcnkoZ2dwbG90MikNCmxpYnJhcnkoZm9ybXIpDQpsaWJyYXJ5KGNvZGVib29rKQ0KbGlicmFyeShkcGx5cikNCmBgYA0KDQoNCiMjIyBEYXRhDQpMb2FkIHNlbGVjdGVkIGRhdGEgYmFzZWQgb24gMDBfZGF0YWltcG9ydA0KYGBge3IgRGF0YX0NCmZ1bGxkYXRhX3NlbGVjdGVkID0gcmVhZC5jc3YoZmlsZSA9ICJmdWxsZGF0YV9zZWxlY3RlZC5jc3YiKVssLTFdDQpgYGANCg0KDQojIyMgSW5zcGV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b25zaGlwIA0KdGFibGUoZnVsbGRhdGFfc2VsZWN0ZWRfd3JhbmdsZWQkcmVsYXRpb25zaGlwNCkgI09uZ29pbmcgKGxvbmdlciB0aGFuIDEgbW9udGgpIHVuY29tbWl0dGVkL25vbi1leGNsdXNpdmUgcm9tYW50aWMgYW5kL29yIHNleHVhbCByZWxhdGlvbnNoaXANCnRhYmxlKGZ1bGxkYXRhX3NlbGVjdGVkX3dyYW5nbGVkJHJlbGF0aW9uc2hpcDUpI0xvbmctdGVybSBjb21taXR0ZWQvZXhjbHVzaXZlIHNleHVhbCByZWxhdGlvbnNoaXAgd2l0aCBvbmUgb3IgbW9yZSBwYXJ0bmVycw0KDQpmdWxsZGF0YV9zZWxlY3RlZF93cmFuZ2xlZCA9IGZ1bGxkYXRhX3NlbGVjdGVkX3dyYW5nbGVkICU+JQ0KICBtdXRhdGUocmVsYXRpb25zaGlwID0gaWZlbHNlKHJlbGF0aW9uc2hpcCA9PSAiVHJ1ZSIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk5vIHJvbWFudGljIG9yIHNleHVhbCByZWxhdGlvbnNoaXBzIGR1cmluZyB0aGUgcGFzdCAzIG1vbnRocywgIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiIiksDQogICAgICAgICByZWxhdGlvbnNoaXAgPSBpZmVsc2UocmVsYXRpb25zaGlwMSA9PSAiVHJ1ZSIsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzdGUocmVsYXRpb25zaGlwLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJPdGhlciwgIiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwKSwNCiAgICAgICAgIHJlbGF0aW9uc2hpcCA9IGlmZWxzZShyZWxhdGlvbnNoaXAyID09ICJUcnVlIiwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXN0ZShyZWxhdGlvbnNoaXAsDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlNob3J0LXRlcm0gKGNhc3VhbCkgc2V4dWFsIHJlbGF0aW9uc2hpcCAoZS5nLiBob29rdXBzIG9yIG9uZS1uaWdodC1zdGFuZHMpLCAiKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXApLA0KICAgICAgICAgcmVsYXRpb25zaGlwID0gaWZlbHNlKHJlbGF0aW9uc2hpcDMgPT0gIlRydWUiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhc3RlKHJlbGF0aW9uc2hpcCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiTmV3IChsZXNzIHRoYW4gMSBtb250aCBvbGQpIHJvbWFudGljIGFuZC9vciBzZXh1YWwgcmVsYXRpb25zaGlwLCAiKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWxhdGlvbnNoaXApLA0KICAgICAgICAgcmVsYXRpb25zaGlwID0gaWZlbHNlKHJlbGF0aW9uc2hpcDQgPT0gIlRydWUiLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhc3RlKHJlbGF0aW9uc2hpcCwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiT25nb2luZyAobG9uZ2VyIHRoYW4gMSBtb250aCkgdW5jb21taXR0ZWQvbm9uLWV4Y2x1c2l2ZSByb21hbnRpYyBhbmQvb3Igc2V4dWFsIHJlbGF0aW9uc2hpcCwgIiksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVsYXRpb25zaGlwKSwNCiAgICAgICAgIHJlbGF0aW9uc2hpcCA9IGlmZWxzZShyZWxhdGlvbnNoaXA1ID09ICJUcnVlIiwgDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFzdGUocmVsYXRpb25zaGlwLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJMb25nLXRlcm0gY29tbWl0d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