Study

Study to be published in Mankind Quarterly:

Study files

Available on OSF.

Data sources:

Startup

Load packages and set options.

options(digits = 2)
library(pacman)
p_load(mediation, kirkegaard, readr, rms, lavaan)

Data

Load data and merge with existing dataset. This is a little tricky because we have to use the gendered versions of the names to merge, but we don’t necessarily want these for other purposes.

#ad hoc gender function
genderize = function(x, gender = NULL, remove = F) {
  if (remove) {
   x = str_replace(x, " \\(.+\\)", "")
   x = str_replace(x, "_.$", "")
  } else {
    #check missing
    if (is.null(gender)) stop("`gender` was NULL!")

    #identify gender
    .gender = (gender == "Male" | gender == 1)
    
    #make a vec to add
    .gender_str = if_else(.gender, true = "_M", false = "_F", missing = "_?")
    
    #add
    x = x + .gender_str 
  }
  
  x
}

#load main name data from previous study
kirk_tran = read_rds("data/kirkegaard_tranberg_2015.rds") %>% 
  #rename name to firstname
  rename(
    firstname = name
  ) %>% 
  #remove gender tag from firstnames
  mutate(
    firstname = genderize(firstname, remove = T),
    firstname_gendered = genderize(firstname, gender)
  )

#Thomas
thomas_data = read_csv("data/thomas_firstnames_data.csv") %>% 
  #remove na name
  filter(!is.na(firstname)) %>% 
  #fix gender
  mutate(
    firstname_gendered = genderize(firstname, sex)
  )
## Parsed with column specification:
## cols(
##   sex = col_double(),
##   firstname = col_character(),
##   region = col_character(),
##   IQ_raw = col_double(),
##   n = col_double()
## )
#merge names in Thomas' data
thomas_data %<>% plyr::ddply("firstname", .fun = function(.d) {
  #assert equal sex
  assert_that(kirkegaard::all_elements_the_same(.d$sex))
  
  #use first row as default values
  ..d = .d[1, ]
  
  #calc wtd mean IQ
  ..d$IQ_raw = wtd_mean(.d$IQ_raw, .d$n)
  
  #sum n
  ..d$n = sum(.d$n)
  
  #out
  ..d
})

#sample sizes for IQ data
#total
thomas_data$n %>% sum()
## [1] 65137
#descrip
thomas_data$n %>% describe()
##    vars   n mean  sd median trimmed mad min  max range skew kurtosis se
## X1    1 265  246 429     65     132  58  21 2140  2119  2.6      6.5 26
#recode sex
thomas_data$sex = if_else(thomas_data$sex == 1, true = "male", false = "female")

#sex dist
thomas_data$sex %>% table2()
## # A tibble: 3 x 3
##   Group  Count Percent
##   <chr>  <dbl>   <dbl>
## 1 male     226    85.3
## 2 female    39    14.7
## 3 <NA>       0     0
#any duplicates in thomas' data?
assert_that(!any(duplicated(thomas_data$firstname)))
## [1] TRUE
#merge data
d = full_join(kirk_tran, thomas_data %>% select(-firstname), by = c("firstname_gendered" = "firstname_gendered"))

#synonyms
d$S = d$S.both.no.age
d$CA = d$IQ_raw %>% standardize()
d$sqrtn = sqrt(d$n)
d$nonwestern = (d$region != "W Europe")
d %>% filter(!is.na(nonwestern)) %>% .$nonwestern %>% table2()
## # A tibble: 3 x 3
##   Group Count Percent
##   <chr> <dbl>   <dbl>
## 1 FALSE   255   96.2 
## 2 TRUE     10    3.77
## 3 <NA>      0    0
d$male = d$sex == "male"

#conver to IQ, assuming Danish = 100, 15
#data from previous study
d$IQ = (((d$IQ_raw - 42.79833641) / 9.832409119) * 15) + 100
d$IQ_std = d$CA

#descrip
d$IQ %>% describe()
##    vars   n mean  sd median trimmed mad min max range skew kurtosis  se
## X1    1 265   97 4.9     98      98 4.1  76 107    31 -1.2      2.8 0.3
d$male %>% describe()
##    vars   n mean   sd median trimmed mad min max range skew kurtosis   se
## X1    1 265 0.85 0.35      1    0.94   0   0   1     1   -2      1.9 0.02

Note that the S scores are standardized at the firstname level, not the individual level. An S score of -2 does NOT mean that the group mean is on the 2th centile of society. However, the IQs are scaled to individual-level Danish norms, so they do have the usual interpretation. It’s not easy to rescale the S scores.

Plot cognitive ability x S

Now we are ready to examine the relationship between the mean cognitive ability and S score of each first name.

#labels for reuse
S_ylab = ylab("Average S\n(general socioeconomic factor based on 5 indicators; z-score)")
CA_xlab = xlab("Average IQ on Danish military test (Danish norms)")

#plot
GG_scatter(d, "IQ", "S", case_names = "firstname", color = "gender") +
  scale_color_manual("Sex", values = c("Red", "Blue")) +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S.png")

GG_scatter(d, "IQ", "S", case_names = "firstname", weights = sqrt(d$n), color = "gender", alpha = .2) +
  scale_color_manual("Sex", values = c("Red", "Blue")) +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S_wtd.png")

#S by sex
GG_denhist(d, "S", group = "gender") + scale_x_continuous("S\n(generalized social status scored from 5 indicators)")
## Warning in GG_denhist(d, "S", group = "gender"): There were groups without
## any data. These were removed
## Scale for 'x' is already present. Adding another scale for 'x', which
## will replace the existing scale.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

GG_save("figs/S_sex.png")
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
#IQ by western status
#which names?
d %>% filter(nonwestern) %>% pull(firstname)
##  [1] "Ahmet"    "Mohamad"  "Mehmet"   "Ahmed"    "Mohammed" "Mustafa" 
##  [7] "Ahmad"    "Mohamed"  "Mohammad" "Ali"
#distribution
GG_denhist(d, "IQ", "nonwestern")
## Warning in GG_denhist(d, "IQ", "nonwestern"): Grouping variable contained
## missing values. These were removed. If you want an NA group, convert to
## explicit value.
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

#numbers
describeBy(d$IQ, d$nonwestern)
## 
##  Descriptive statistics by group 
## group: FALSE
##    vars   n mean  sd median trimmed mad min max range  skew kurtosis   se
## X1    1 255   98 3.9     98      98 3.6  86 107    20 -0.19     -0.2 0.24
## -------------------------------------------------------- 
## group: TRUE
##    vars  n mean  sd median trimmed mad min max range  skew kurtosis  se
## X1    1 10   82 3.4     82      82 3.6  76  87    11 -0.27     -1.3 1.1
plyr::ddply(d, "nonwestern", function(dd) {
  tibble(
    n = nrow(dd),
    mean = wtd.mean(dd$IQ),
    wmean = wtd.mean(dd$IQ, dd$number)
  )
})
##   nonwestern    n mean wmean
## 1      FALSE  255   98    98
## 2       TRUE   10   82    81
## 3         NA 2093  NaN   NaN

We see a good correspondance. One would in fact expect this to be near perfect if it wasn’t for a few problems:

  1. The first names have limited sample size, down to 25. This should be improved by weighting the datapoints, but in this case it actually depreciated the fit a bit.
  2. The cognitive data concern differnet age groups within each first name. The cognitive data concern people entering military service around 2005, whereas the social data concern all persons with that name. While one can expect name averages to be quite stable, they are not entirely stable over time (cf. The Son also Rises).
  3. The military recruits are mostly self-selected, so there may be selection bias.

By region

We can also see that there’s some outliers in the bottom which are obviously Muslim names. We can remove these since we have estimated geographical origin too.

#plot with geo colors
GG_scatter(d, "IQ", "S", case_names = "firstname", color = "region", weights = "sqrtn") +
  scale_color_discrete("Region of origin") +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S_region.png")

#excluding nonwestern
d %>% filter(!nonwestern) %>% 
  GG_scatter("IQ", "S", case_names = "firstname", weights = "sqrtn") +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S_WEurope.png")

d %>% filter(!nonwestern) %>% 
  GG_scatter("IQ", "S", case_names = "firstname") +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S_WEurope_unwtd.png")

#nonwestern only
d %>% filter(nonwestern) %>% 
  GG_scatter("IQ", "S", case_names = "firstname", weights = "sqrtn") +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S_nonwestern.png")

d %>% filter(nonwestern) %>% 
  GG_scatter("IQ", "S", case_names = "firstname") +
  CA_xlab +
  S_ylab

GG_save("figs/CA_S_nonwestern_unwtd.png")

#numbers
describeBy(d$S, d$nonwestern)
## 
##  Descriptive statistics by group 
## group: FALSE
##    vars   n mean   sd median trimmed  mad   min max range  skew kurtosis
## X1    1 254 0.74 0.47   0.78    0.75 0.47 -0.59 2.2   2.8 -0.04    -0.02
##      se
## X1 0.03
## -------------------------------------------------------- 
## group: TRUE
##    vars  n mean   sd median trimmed mad  min  max range  skew kurtosis
## X1    1 10 -1.9 0.38   -1.8    -1.8 0.4 -2.5 -1.4   1.1 -0.39     -1.4
##      se
## X1 0.12
plyr::ddply(d, "nonwestern", function(dd) {
  tibble(
    n = nrow(dd),
    mean = wtd.mean(dd$S),
    wmean = wtd.mean(dd$S, dd$number)
  )
})
##   nonwestern    n  mean wmean
## 1      FALSE  255  0.74  0.93
## 2       TRUE   10 -1.85 -1.84
## 3         NA 2093 -0.10  0.46

In other words, we see that Muslim immigrant names are increasing the cognitive and social inequality, as modeled by Kirkegaard and Tranberg (2015).

Regressions

#regression by sex
model1 = rms::ols(S ~ IQ_std, data = d, weights = sqrtn)
model1
## Frequencies of Missing Values Due to Each Variable
##         S    IQ_std (weights) 
##       455      2093      2093 
## 
## Linear Regression Model
##  
##  rms::ols(formula = S ~ IQ_std, data = d, weights = sqrtn)
##  
##  
##                 Model Likelihood     Discrimination    
##                    Ratio Test           Indexes        
##  Obs     264    LR chi2    140.45    R2       0.413    
##  sigma1.5203    d.f.            1    R2 adj   0.410    
##  d.f.    262    Pr(> chi2) 0.0000    g        0.475    
##  
##  Residuals
##  
##       Min       1Q   Median       3Q      Max 
##  -1.62062 -0.37594 -0.05183  0.24766  1.27846 
##  
##  
##            Coef   S.E.   t     Pr(>|t|)
##  Intercept 0.7188 0.0269 26.71 <0.0001 
##  IQ_std    0.4458 0.0329 13.57 <0.0001 
## 
model2 = rms::ols(S ~ IQ_std, data = d %>% filter(!nonwestern), weights = sqrtn)
model2
## Frequencies of Missing Values Due to Each Variable
##         S    IQ_std (weights) 
##         1         0         0 
## 
## Linear Regression Model
##  
##  rms::ols(formula = S ~ IQ_std, data = d %>% filter(!nonwestern), 
##      weights = sqrtn)
##  
##  
##                 Model Likelihood     Discrimination    
##                    Ratio Test           Indexes        
##  Obs     254    LR chi2     50.01    R2       0.179    
##  sigma1.3757    d.f.            1    R2 adj   0.175    
##  d.f.    252    Pr(> chi2) 0.0000    g        0.242    
##  
##  Residuals
##  
##       Min       1Q   Median       3Q      Max 
##  -1.55086 -0.37058 -0.06407  0.22950  1.03405 
##  
##  
##            Coef   S.E.   t     Pr(>|t|)
##  Intercept 0.7684 0.0251 30.60 <0.0001 
##  IQ_std    0.2726 0.0368  7.41 <0.0001 
## 
model3 = rms::ols(S ~ IQ_std + nonwestern, data = d, weights = sqrtn)
model3
## Frequencies of Missing Values Due to Each Variable
##          S     IQ_std nonwestern  (weights) 
##        455       2093       2093       2093 
## 
## Linear Regression Model
##  
##  rms::ols(formula = S ~ IQ_std + nonwestern, data = d, weights = sqrtn)
##  
##  
##                 Model Likelihood     Discrimination    
##                    Ratio Test           Indexes        
##  Obs     264    LR chi2    201.10    R2       0.533    
##  sigma1.3579    d.f.            2    R2 adj   0.530    
##  d.f.    261    Pr(> chi2) 0.0000    g        0.419    
##  
##  Residuals
##  
##       Min       1Q   Median       3Q      Max 
##  -1.55191 -0.36400 -0.05903  0.21491  1.03153 
##  
##  
##             Coef    S.E.   t     Pr(>|t|)
##  Intercept   0.7681 0.0248 31.00 <0.0001 
##  IQ_std      0.2746 0.0360  7.62 <0.0001 
##  nonwestern -1.7301 0.2107 -8.21 <0.0001 
## 
model4 = rms::ols(S ~ IQ_std * nonwestern, data = d, weights = sqrtn)
model4
## Frequencies of Missing Values Due to Each Variable
##          S     IQ_std nonwestern  (weights) 
##        455       2093       2093       2093 
## 
## Linear Regression Model
##  
##  rms::ols(formula = S ~ IQ_std * nonwestern, data = d, weights = sqrtn)
##  
##  
##                 Model Likelihood     Discrimination    
##                    Ratio Test           Indexes        
##  Obs     264    LR chi2    201.26    R2       0.533    
##  sigma1.3601    d.f.            3    R2 adj   0.528    
##  d.f.    260    Pr(> chi2) 0.0000    g        0.417    
##  
##  Residuals
##  
##       Min       1Q   Median       3Q      Max 
##  -1.55086 -0.35662 -0.06407  0.21443  1.03405 
##  
##  
##                      Coef    S.E.   t     Pr(>|t|)
##  Intercept            0.7684 0.0248 30.95 <0.0001 
##  IQ_std               0.2726 0.0364  7.49 <0.0001 
##  nonwestern          -1.3816 0.8889 -1.55 0.1213  
##  IQ_std * nonwestern  0.1098 0.2721  0.40 0.6868  
## 
model5 = rms::ols(S ~ nonwestern, data = d, weights = sqrtn)
model5
## Frequencies of Missing Values Due to Each Variable
##          S nonwestern  (weights) 
##        455       2093       2093 
## 
## Linear Regression Model
##  
##  rms::ols(formula = S ~ nonwestern, data = d, weights = sqrtn)
##  
##  
##                 Model Likelihood     Discrimination    
##                    Ratio Test           Indexes        
##  Obs     264    LR chi2    148.01    R2       0.429    
##  sigma1.4987    d.f.            1    R2 adj   0.427    
##  d.f.    262    Pr(> chi2) 0.0000    g        0.195    
##  
##  Residuals
##  
##       Min       1Q   Median       3Q      Max 
##  -1.40538 -0.38410 -0.02692  0.25536  1.38287 
##  
##  
##             Coef    S.E.   t      Pr(>|t|)
##  Intercept   0.8108 0.0266  30.44 <0.0001 
##  nonwestern -2.6608 0.1896 -14.03 <0.0001 
## 
#path model
path_model = "
IQ_std ~ nonwestern
S ~ IQ_std + nonwestern
"

path_fit = sem(path_model, data = d)
parameterestimates(path_fit)
##          lhs op        rhs    est    se   z pvalue ci.lower ci.upper
## 1     IQ_std  ~ nonwestern -3.285 0.251 -13      0   -3.777   -2.793
## 2          S  ~     IQ_std  0.238 0.034   7      0    0.171    0.304
## 3          S  ~ nonwestern -1.811 0.178 -10      0   -2.159   -1.463
## 4     IQ_std ~~     IQ_std  0.607 0.053  11      0    0.503    0.710
## 5          S ~~          S  0.184 0.016  11      0    0.153    0.216
## 6 nonwestern ~~ nonwestern  0.036 0.000  NA     NA    0.036    0.036
#mediation package
#recode type
d$nonwestern2 = d$nonwestern %>% as.numeric()
mediate_fit = mediation::mediate(
  model.m = lm(IQ_std ~ nonwestern2, data = d), 
  model.y = lm(S ~ nonwestern2 + IQ_std, data = d), 
  treat = 'nonwestern2', 
  mediator = 'IQ_std',
  boot = TRUE, 
  sims = 500,
  dropobs = T
  )

summary(mediate_fit)
## 
## Causal Mediation Analysis 
## 
## Nonparametric Bootstrap Confidence Intervals with the Percentile Method
## 
##                Estimate 95% CI Lower 95% CI Upper p-value    
## ACME             -0.782       -1.072        -0.54  <2e-16 ***
## ADE              -1.811       -2.130        -1.53  <2e-16 ***
## Total Effect     -2.593       -2.841        -2.36  <2e-16 ***
## Prop. Mediated    0.301        0.209         0.40  <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Sample Size Used: 264 
## 
## 
## Simulations: 500

List of names

Sorted by social status.

d %>% 
  filter(!is.na(IQ)) %>% 
  arrange(-IQ) %>% 
  select(firstname, gender, IQ, S, n) %>% 
  as_tibble() %>% 
  print(n = Inf)
## # A tibble: 265 x 5
##     firstname   gender    IQ          S     n
##     <chr>       <chr>  <dbl>      <dbl> <dbl>
##   1 Nils        Male   107.    1.07        25
##   2 Viktor      Male   106.    0.866       30
##   3 Tor         Male   106.    0.639       25
##   4 Jonatan     Male   106.    0.283       65
##   5 Lauge       Male   106.    2.13        22
##   6 Esben       Male   105.    1.08       170
##   7 Malte       Male   105.    0.753       89
##   8 William     Male   105.    1.56        54
##   9 Aske        Male   105.    0.173      107
##  10 Bastian     Male   105.    0.807       35
##  11 Asger       Male   105.    1.65       136
##  12 Johannes    Male   105.    1.08       117
##  13 Erik        Male   105.    0.773      114
##  14 Pelle       Male   104.    0.581       44
##  15 Gustav      Male   104.    2.19        75
##  16 Malthe      Male   104.    1.33        71
##  17 Bjarke      Male   104.    0.973      160
##  18 Anton       Male   104.    1.82        81
##  19 Ida         Female 104.    0.967       28
##  20 Markus      Male   103.    0.899       45
##  21 Johan       Male   103.    1.02       205
##  22 August      Male   103.    1.75        24
##  23 Hjalte      Male   103.    0.779       34
##  24 Kristina    Female 103.    0.558       28
##  25 Ditte       Female 103.    0.301       21
##  26 Niels       Male   103.    1.18       349
##  27 Tue         Male   102.    0.710       42
##  28 Matias      Male   102.    1.11        87
##  29 Carl        Male   102.    1.19        42
##  30 Signe       Female 102.    0.688       30
##  31 Steen       Male   102.    1.24        36
##  32 Lau         Male   102.    1.40        29
##  33 Oskar       Male   102.    1.39        46
##  34 Magnus      Male   102.    1.24       302
##  35 Jonathan    Male   102.    0.442      197
##  36 Ulrik       Male   102.    1.53       103
##  37 Anja        Female 102.    0.982       26
##  38 Kåre        Male   102.    0.976       23
##  39 Thorbjørn   Male   102.    1.05        37
##  40 Filip       Male   102.    0.721       55
##  41 Troels      Male   102.    0.905      193
##  42 Jens        Male   102.    1.27       484
##  43 Sigurd      Male   102.    1.20        45
##  44 Laurits     Male   102.    1.82        35
##  45 Lukas       Male   102.    0.534       74
##  46 Jakob       Male   102.    1.21       726
##  47 Asbjørn     Male   102.    1.38       106
##  48 Jeppe       Male   101.    1.21       630
##  49 Marie       Female 101.    0.218       34
##  50 Andreas     Male   101.    0.825     1268
##  51 Kristoffer  Male   101.    0.717      325
##  52 Frederik    Male   101.    1.41      1129
##  53 Caspar      Male   101.    0.305       27
##  54 Hans        Male   101.    0.968      160
##  55 Joakim      Male   101.    1.09       103
##  56 Sune        Male   101.    0.682      145
##  57 Marcus      Male   101.    1.09       116
##  58 Tore        Male   101.    0.569       25
##  59 Adrian      Male   101.   -0.595       27
##  60 Christoffer Male   101.    0.875      481
##  61 Emil        Male   101.    0.926     1020
##  62 Aleksander  Male   100.   -0.147       41
##  63 Silas       Male   100.    0.359       43
##  64 Oliver      Male   100.    1.10       256
##  65 Poul        Male   100.    0.838       46
##  66 Mette       Female 100.    1.28        69
##  67 Matthias    Male   100.    0.559       36
##  68 Joachim     Male   100.    0.933      182
##  69 Uffe        Male   100.    1.33        22
##  70 Maja        Female 100.    0.697       29
##  71 Julian      Male   100.   -0.179       45
##  72 Laura       Female 100.    0.853       21
##  73 Ruben       Male    99.8   0.971       30
##  74 Aksel       Male    99.8   1.34        21
##  75 Bjørn       Male    99.8   0.807      144
##  76 Rune        Male    99.8   0.487      340
##  77 Flemming    Male    99.8   1.07        44
##  78 Christian   Male    99.7   1.12      2042
##  79 Søren       Male    99.7   1.39      1064
##  80 Louis       Male    99.5   0.796       59
##  81 Philip      Male    99.5   0.987      360
##  82 Peder       Male    99.5   1.32        36
##  83 Alexander   Male    99.5   0.741      741
##  84 Tobias      Male    99.5   0.745      593
##  85 Mathias     Male    99.5   1.15      1619
##  86 Rasmus      Male    99.5   0.934     2140
##  87 Peter       Male    99.5   1.24       961
##  88 Adam        Male    99.4   0.0963      69
##  89 Mikael      Male    99.4   1.00       148
##  90 Kristian    Male    99.4   1.14       808
##  91 Charlotte   Female  99.4   1.15        33
##  92 Anna        Female  99.4   0.135       31
##  93 Katrine     Female  99.2   0.556       30
##  94 Svend       Male    99.2   0.482       45
##  95 Anders      Male    99.2   1.14      1824
##  96 Sean        Male    99.1   0.276       33
##  97 Robin       Male    99.1   0.159       48
##  98 Lucas       Male    99.1   1.03        59
##  99 Sofie       Female  98.9   0.659       31
## 100 Anne        Female  98.9   0.936       56
## 101 Toke        Male    98.8   0.336       47
## 102 Samuel      Male    98.8  -0.314       37
## 103 Christopher Male    98.8   0.441      175
## 104 Niklas      Male    98.8   0.647      344
## 105 Simone      Female  98.8   0.345       30
## 106 Nikolaj     Male    98.8   1.02       783
## 107 Sebastian   Male    98.8   0.710      625
## 108 Cecilie     Female  98.8   0.465       40
## 109 Stephan     Male    98.6   0.391       62
## 110 Thor        Male    98.6   0.794      127
## 111 Carina      Female  98.6   0.431       22
## 112 Stig        Male    98.6   1.06        59
## 113 David       Male    98.6   0.162      297
## 114 Victor      Male    98.5   0.830      157
## 115 Nanna       Female  98.5   0.663       48
## 116 Julie       Female  98.5   0.500       51
## 117 Mads        Male    98.5   1.24      2011
## 118 Nickolai    Male    98.3   0.900       30
## 119 Theis       Male    98.3   0.523      135
## 120 Simon       Male    98.3   0.716     1567
## 121 Claus       Male    98.3   1.43       246
## 122 Maria       Female  98.3   0.301       86
## 123 Christina   Female  98.2   0.701       52
## 124 Kris        Male    98.2   0.918       59
## 125 Janus       Male    98.2   0.531       80
## 126 Oscar       Male    98.2   1.61        42
## 127 Alex        Male    98.2   0.931      170
## 128 Karl        Male    98.2   0.921       28
## 129 Sarah       Female  98.2   0.0473      29
## 130 Lasse       Male    98.2   0.957     1155
## 131 Jacob       Male    98.2   1.33      1000
## 132 Jonas       Male    98.2   0.532     1548
## 133 Nikolai     Male    98.0   0.844       90
## 134 Julius      Male    98.0   0.716       40
## 135 Thomas      Male    98.0   1.06      1551
## 136 Henrik      Male    98.0   1.47       550
## 137 Lennart     Male    97.9   0.677       47
## 138 Trine       Female  97.9   1.04        53
## 139 Mikkel      Male    97.9   0.804     1695
## 140 Jon         Male    97.7   0.449       97
## 141 Morten      Male    97.7   1.14      1717
## 142 Nicolai     Male    97.7   0.901      833
## 143 Niclas      Male    97.6   0.840      159
## 144 Marco       Male    97.6   0.154      107
## 145 Mick        Male    97.4   0.339       54
## 146 Rolf        Male    97.4   0.670       38
## 147 Pernille    Female  97.4   0.929       63
## 148 Kian        Male    97.3   0.669       22
## 149 Jes         Male    97.3   1.26        27
## 150 Mie         Female  97.3   0.697       23
## 151 Torben      Male    97.3   1.51        74
## 152 Jesper      Male    97.3   1.28      1260
## 153 Hasse       Male    97.1   0.724       26
## 154 Mia         Female  97.1   0.471       50
## 155 Benjamin    Male    97.0   0.401      486
## 156 Casper      Male    97.0   0.707     1006
## 157 Ole         Male    97.0   1.10        95
## 158 Bjarne      Male    96.8   1.18        31
## 159 Martin      Male    96.8   0.886     2056
## 160 Jørgen      Male    96.8   0.883       30
## 161 Lars        Male    96.8   1.50       542
## 162 Nicholai    Male    96.6   0.445       25
## 163 Robert      Male    96.5   0.249       48
## 164 Kasper      Male    96.5   0.514     1733
## 165 Mikki       Male    96.3  NA           21
## 166 Nicolas     Male    96.3  -0.00208     59
## 167 Jannik      Male    96.3   0.754      178
## 168 Phillip     Male    96.3   0.774       95
## 169 Line        Female  96.3   0.805       69
## 170 Klaus       Male    96.2   1.50       123
## 171 Daniel      Male    96.2   0.0677    1406
## 172 Henning     Male    96.2   0.924       23
## 173 Camilla     Female  96.2   0.428      112
## 174 Jan         Male    96.2   1.06       126
## 175 Marc        Male    96.0   0.283      287
## 176 Nicklas     Male    96.0   0.472      610
## 177 Dan         Male    95.9   0.644      173
## 178 Stine       Female  95.9   0.570       48
## 179 Louise      Female  95.9   0.612      100
## 180 Pierre      Male    95.7  -0.127       21
## 181 Nicholas    Male    95.7   0.365       91
## 182 Chris       Male    95.7   0.824      193
## 183 Nicolaj     Male    95.7   1.01       274
## 184 Max         Male    95.7   1.25        74
## 185 Steffen     Male    95.7   0.943      538
## 186 Rikke       Female  95.7   1.26        43
## 187 Michael     Male    95.7   0.926     1238
## 188 Stefan      Male    95.4   0.366      415
## 189 Nichlas     Male    95.3   0.869      142
## 190 Tom         Male    95.3   0.909       28
## 191 Kenneth     Male    95.3   0.715      613
## 192 Kim         Male    95.3   0.981      426
## 193 Leon        Male    95.1   0.482       26
## 194 Mark        Male    95.1   0.277      548
## 195 Mickey      Male    95.0  -0.322       37
## 196 Glenn       Male    95.0   0.788       56
## 197 Danny       Male    95.0   0.125      102
## 198 Tomas       Male    94.8   0.347       21
## 199 Kent        Male    94.8   1.32        58
## 200 Carsten     Male    94.8   1.45       121
## 201 Tim         Male    94.7   0.584      155
## 202 Nicky       Male    94.5  -0.140       37
## 203 Ronnie      Male    94.5   0.235       62
## 204 Elias       Male    94.5   0.246       24
## 205 Michelle    Female  94.5  -0.0518      41
## 206 Patrick     Male    94.5   0.117      866
## 207 Karsten     Male    94.5   1.56        92
## 208 Sara        Female  94.4   0.113       29
## 209 Bo          Male    94.4   1.24       104
## 210 Jeff        Male    94.2   0.256       35
## 211 Ricki       Male    94.1  -0.0388      25
## 212 Jim         Male    94.1   0.676       34
## 213 Per         Male    94.1   1.19       118
## 214 Kenni       Male    93.9   0.0343      92
## 215 Malene      Female  93.9   1.05        41
## 216 Heidi       Female  93.9   1.08        23
## 217 Steffan     Male    93.7   0.228      105
## 218 Paw         Male    93.7   0.646       50
## 219 Jimmi       Male    93.7   0.492      101
## 220 Rene        Male    93.7   0.752      393
## 221 Allan       Male    93.7   1.05       146
## 222 André       Male    93.6   0.269       86
## 223 Nick        Male    93.4   0.000856   323
## 224 Kevin       Male    93.4   0.110      211
## 225 Tommy       Male    93.4   0.958       98
## 226 Jimmy       Male    93.0   0.424       62
## 227 Frank       Male    93.0   0.984       71
## 228 Jannick     Male    92.8   0.370      109
## 229 Steven      Male    92.7   0.0944      65
## 230 Dennis      Male    92.5   0.386      697
## 231 John        Male    92.5   0.685       62
## 232 Nicki       Male    92.4   0.0215      93
## 233 Brian       Male    92.4   1.15       185
## 234 Andre       Male    92.2   0.207       31
## 235 Dannie      Male    92.1   0.653       25
## 236 Sandra      Female  92.1  -0.209       24
## 237 Charlie     Male    91.9   0.317       36
## 238 Danni       Male    91.9  -0.107      145
## 239 Andy        Male    91.8   0.857       23
## 240 Miki        Male    91.5  -0.0236      25
## 241 Ken         Male    91.3   0.829       23
## 242 Michel      Male    91.2  -0.234       23
## 243 Stephanie   Female  91.2  -0.310       21
## 244 Claes       Male    91.0   0.864       32
## 245 Sonny       Male    90.8  -0.0135      40
## 246 Jeanette    Female  90.8   0.856       22
## 247 Johnny      Male    90.8   0.656       48
## 248 Kenny       Male    90.7   0.418       60
## 249 Jack        Male    90.4   0.560       77
## 250 Mike        Male    90.1   0.0940     415
## 251 Micki       Male    89.8   0.516       28
## 252 Ronni       Male    88.9   0.395       73
## 253 Kennet      Male    88.6   0.790       29
## 254 Sabrina     Female  87.3  -0.127       21
## 255 Ahmet       Male    86.6  -1.38        24
## 256 Rico        Male    86.3   1.00        22
## 257 Mustafa     Male    84.4  -1.50        25
## 258 Mohammed    Male    84.3  -1.74        28
## 259 Mehmet      Male    83.8  -1.57        29
## 260 Ali         Male    83.5  -1.79        69
## 261 Ahmed       Male    81.4  -2.29        27
## 262 Mohamad     Male    79.6  -2.13        30
## 263 Mohammad    Male    79.2  -1.51        83
## 264 Ahmad       Male    78.6  -2.05        81
## 265 Mohamed     Male    75.7  -2.53        37

Versions

sessionInfo()
## R version 3.5.3 (2019-03-11)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Linux Mint 19.1
## 
## Matrix products: default
## BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
## LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] lavaan_0.6-3       rms_5.1-3          SparseM_1.77      
##  [4] kirkegaard_2018.05 metafor_2.0-0      psych_1.8.12      
##  [7] magrittr_1.5       assertthat_0.2.1   weights_1.0       
## [10] mice_3.4.0         gdata_2.18.0       Hmisc_4.2-0       
## [13] Formula_1.2-3      survival_2.43-3    lattice_0.20-38   
## [16] forcats_0.4.0      stringr_1.4.0      dplyr_0.8.0.1     
## [19] purrr_0.3.2        readr_1.3.1        tidyr_0.8.3       
## [22] tibble_2.1.1       ggplot2_3.1.1      tidyverse_1.2.1   
## [25] mediation_4.4.6    sandwich_2.5-0     mvtnorm_1.0-10    
## [28] Matrix_1.2-17      MASS_7.3-51.1      pacman_0.5.0      
## 
## loaded via a namespace (and not attached):
##  [1] TH.data_1.0-10      minqa_1.2.4         colorspace_1.4-1   
##  [4] htmlTable_1.13.1    base64enc_0.1-3     rstudioapi_0.10    
##  [7] MatrixModels_0.4-1  fansi_0.4.0         lubridate_1.7.4    
## [10] xml2_1.2.0          codetools_0.2-16    splines_3.5.3      
## [13] mnormt_1.5-5        knitr_1.22          jsonlite_1.6       
## [16] nloptr_1.2.1        broom_0.5.2         cluster_2.0.8      
## [19] curry_0.1.1         compiler_3.5.3      httr_1.4.0         
## [22] backports_1.1.4     lazyeval_0.2.2      cli_1.1.0          
## [25] acepack_1.4.1       htmltools_0.3.6     quantreg_5.38      
## [28] tools_3.5.3         gtable_0.3.0        glue_1.3.1         
## [31] Rcpp_1.0.1          cellranger_1.1.0    nlme_3.1-139       
## [34] multilevel_2.6      xfun_0.6            lme4_1.1-21        
## [37] rvest_0.3.3         lpSolve_5.6.13      gtools_3.8.1       
## [40] polspline_1.1.14    pan_1.6             zoo_1.8-4          
## [43] scales_1.0.0        hms_0.4.2           parallel_3.5.3     
## [46] RColorBrewer_1.1-2  psychometric_2.2    yaml_2.2.0         
## [49] gridExtra_2.3       rpart_4.1-13        latticeExtra_0.6-28
## [52] stringi_1.4.3       checkmate_1.9.1     boot_1.3-20        
## [55] rlang_0.3.4         pkgconfig_2.0.2     evaluate_0.13      
## [58] labeling_0.3        htmlwidgets_1.3     tidyselect_0.2.5   
## [61] plyr_1.8.4          R6_2.4.0            generics_0.0.2     
## [64] mitml_0.3-7         multcomp_1.4-10     pillar_1.3.1       
## [67] haven_2.1.0         foreign_0.8-70      withr_2.1.2        
## [70] nnet_7.3-12         modelr_0.1.4        crayon_1.3.4       
## [73] jomo_2.6-7          utf8_1.1.4          rmarkdown_1.12     
## [76] grid_3.5.3          readxl_1.3.1        data.table_1.12.2  
## [79] pbivnorm_0.6.0      digest_0.6.18       stats4_3.5.3       
## [82] munsell_0.5.0