1. DATA

# The file is saved in Latin-1, so the encoding is set to read names like Éwé
language <- read.csv("data/stex.csv", fileEncoding = "latin1")

Name and source

“Big data suggest strong constraints of linguistic similarity on adult language learning” The data set is called stex.csv. It was posted by Job Schepens, Roeland van Hout, and T. Florian Jaeger. I downloaded it on October 11, 2026.

Collector and purpose

The data was collected by the Dutch exam board (CvTE) and compiled by Schepens, van Hout, and Jaeger. It comes from raw data with fully anonymized results on the State Examination of Dutch as a Second Language. The data was collected to examine the linguistic similarities between the learner’s native language and the new language.

Collection

Every row in the dataset represents the first official testing score of a unique learner. The columns contain the information as based on questionnaires filled in at the time of the exam. From 1992 to 2006, learner’s education was measured by means of a side-by-side matrix question in the learner’s questionnaire, so years of education was estimated. From 2006 onward, the question about learners’ education was directly asked.

Licence and permissions

The data is shared on Zenodo under a Creative Commons Attribution 4.0 International (CC BY 4.0) licence. This means anyone may copy, share, and adapt the data for any purpose, including commercially, as long as they give appropriate credit to the original authors (Schepens, van Hout, and Jaeger), link to the licence, and indicate if changes were made. This report credits the authors in the Citation, below, and does not change any values in the data.

Structure

There are 50,235 rows and 16 columns. The names of the columns are as follows: L1, C, L1L2, L2, AaA, LoR, Edu.day, Sex, Family, ISO639.3, Enroll, Speaking, morph, lex, new_feat, new_sounds.

Column Meaning Stored as Units Range or levels
L1 Learner’s first (native) language chr 70 languages; documentation treats it as categorical
C Learner’s country of birth chr 119 countries
L1L2 First language and best additional language (besides Dutch) combined chr 737 combinations
L2 Best additional language besides Dutch chr 44 levels; “Monolingual” if none
AaA Age at arrival in the Netherlands int years 0 to 88, median 26
LoR Length of residence in the Netherlands int years 0 to 59, median 3
Edu.day Amount of daily education int ordinal code 1 (low) to 4 (very high); stored as a number but really an ordered category; 9 NA
Sex Learner’s gender chr Female, Male
Family Language family of the first language chr 14 families
ISO639.3 Ethnologue code for the first language chr 70 codes
Enroll Secondary-school gross enrollment rate in birth country, year of arrival int percent 8 to 148
Speaking STEX speaking proficiency score int STEX scale points 270 to 685, median 516
morph Morphological distance between first language and Dutch num unitless distance -0.017 to 0.327; 1,809 NA
lex Lexical distance between first language and Dutch num unitless distance 0.010 to 0.595, median 0.399
new_feat Phonological distance: number of new sound features int count of features 6 to 32; 2,016 NA
new_sounds Phonological distance: number of new sound categories int count of sounds 13 to 27; 2,016 NA

Missing values

There are 9 missing values in ‘Edu.day’, 1,809 in ‘morph’, 2,016 in ‘new_feat’, and 2,016 in ‘new_sounds’. Every other column is complete. In the CSV file, a missing value is written as NA. The missing values follow a pattern, since they pertain to whole languages rather than individual learners. For instance, Afrikaans or Pashto have no ‘morph’ value, and Chinese or Danish has no ‘new_feat’ or ‘new_sounds’ value. The missing education values are scattered across different languages and countries with no pattern, suggesting unanswered questionnaire items.

Known issues

According to the source documentation, ‘Edu.day’ was estimated from a matrix questionnaire before 2006 and then directly asked afterwards, and the file has no year column to tell this apart. Also, everyone in the file chose to take the state exam, so the results describe exam takers, not all immigrants to the Netherlands. 9 of the languages have fewer than 30 learners, so the average score data is much less reliable than the larger groups. Lastly, there are 883 rows that are completely identical. Since there are no learner IDs, it is difficult to tell if this is a repeat or not.

Changes you made

# read.csv("data/stex.csv", fileEncoding = "latin1")

The file is saved in Latin-1, not UTF-8, so the language name Éwé may display incorrectly unless the file is read with fileEncoding = “latin1”. Also, the rows missing morph were left out of the model’s data, and Family was stored as a factor. No values were changed.

Citation

The source says to cite all versions by using the DOI: Job Schepens, Roeland van Hout, & T. Florian Jaeger. (2019). Dataset for: “Big data suggest strong constraints of linguistic similarity on adult language learning” [Dataset]. Zenodo. https://doi.org/10.5281/zenodo.2863533

2. RESEARCH QUESTION AND HYPOTHESES

Background

Adults moving to a new country differ in how well they acquire and learn the language. If there are patterns between the learner’s native language and how well they learn the new one, it may inform teachers and policymakers who needs support. It would allow for more equitable learning programs or lengths if it is expected for certain groups to be at different levels. Report 1 showed the pattern in group means, while this regression asks whether lexical distance still predicts an individual learner’s score once morphological distance is held fixed.

The question

Among learners taking the Dutch State Examination (STEX), is the lexical distance between a learner’s first language and Dutch (unitless, 0 = identical) related to their STEX speaking score (points), when the morphological distance between the two languages (unitless) is held fixed?

Hypotheses

\(H_0\): The true slope of lex is 0, with morph in the model.

\(H_A\): With morph held fixed, the true slope of lex is not 0. We expect it to be negative, because a first language that is lexically further from Dutch shares fewer cognates.

3. VARIABLES OF INTEREST

# One table of the rows observed on every model variable; every model uses it.
# L1 is kept to sort and group residuals; Family is a candidate group predictor.
model_data <- language |>
  select(L1, Family, Speaking, lex, morph) |>
  drop_na(Speaking, lex, morph) |>
  mutate(Family = factor(Family),
         Family = relevel(Family, ref = "Indo-European"))  
nrow(model_data)
## [1] 48426
nrow(language) - nrow(model_data)
## [1] 1809
  • Speaking: STEX speaking proficiency score. Outcome. Continuous (stored as integer), in STEX scale points. Range 270 – 685, mean 517.4, SD 38.
  • lex: lexical distance between the first language and Dutch. Predictor of interest. Continuous (numeric), unitless (0 = identical vocabularies). Range 0.037 – 0.595, mean 0.411, SD 0.189. There is one value per language.
  • morph: morphological distance between the first language and Dutch. Other predictor. Continuous (numeric), unitless. Range -0.017 – 0.327, mean 0.05, SD 0.057.
  • Family: language family of the first language. Nominal, stored as a factor, 13 levels.
Family Learners
Indo-European 33171
Afro-Asiatic 7150
Altaic 2912
Austro-Asiatic 182
Austronesian 1819
Dravidian 28
Japanese 278
Kartvelian 117
Korean 64
Niger-Congo 430
Sino-Tibetan 913
Tai-Kadai 265
Uralic 1097

4. DATA WRANGLING

The code that builds model_data is shown in Section 3, because the variable summaries are computed on those rows. The model uses 48,426 of 50,235 rows. The 1,809 dropped rows are missing morph, which is missing for whole languages, so 14 languages leave the model entirely. Family is stored as a factor with Indo-European as the reference group. No transformations were made before the first model.

5. EXPLORATORY ANALYSIS

ggplot(model_data, aes(x = Speaking)) +
  geom_histogram(binwidth = 10) +
  labs(x = "STEX speaking score (points)", y = "Learners",
       title = "Speaking score distribution")

ggplot(model_data, aes(x = lex, y = Speaking)) +
  geom_jitter(alpha = 0.1, width = 0.003) +
  geom_smooth(method = "lm", se = FALSE) +
  labs(x = "Lexical distance from Dutch (unitless)",
       y = "STEX speaking score (points)")

ggplot(model_data, aes(x = morph, y = Speaking)) +
  geom_jitter(alpha = 0.1, width = 0.003) +
  geom_smooth(method = "lm", se = FALSE) +
  labs(x = "Morphological distance from Dutch (unitless)",
       y = "STEX speaking score (points)")

model_data |>
  select(Speaking, lex, morph) |>
  cor(method = "spearman") |>
  kable(digits = 2, caption = "Spearman correlations")
Spearman correlations
Speaking lex morph
Speaking 1.00 -0.43 -0.41
lex -0.43 1.00 0.70
morph -0.41 0.70 1.00

The outcome’s shape is roughly symmetric. The histogram has a longer lower tail with scores down to 270, but these are within the test’s range so they are kept. There is no curve in the scatterplots. There are vertical stripes for the predictors, and this is because every learner of one language shares a single lex value. They are similar height from left to right. lex and morph are closely related, with \(\rho\) = 0.70, so I need to watch the VIF. I used the Spearman correlation because lex is bunched at a shared maximum value, so the rank correlation is safer.

6. THE FIRST MODEL

first_model <- lm(Speaking ~ lex + morph, data = model_data)
first_summary <- summary(first_model)
first_f <- first_summary$fstatistic
kable(coef(first_summary), digits = 3)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 552.575 0.377 1466.163 0
lex -78.107 1.017 -76.806 0
morph -60.501 3.407 -17.759 0

lex is the predictor of interest. morph is included because morphological distance also measures how far a first language is from Dutch, and it is correlated with lex, so leaving it out would let lex take credit for its effect. \(R^2\) = 0.202, adjusted \(R^2\) = 0.202, \(F\)(2, 48,423) = 6,122.7, \(p\) < 0.001. The intercept, lex, and morph all have p < 0.05. The coefficients are interpreted for the final model (Section 9).

7. CHECKING THE MODEL

model_data <- model_data |>
  mutate(predicted = fitted(first_model),
         residual  = residuals(first_model))

ggplot(model_data, aes(x = predicted, y = residual)) +
  geom_point(alpha = 0.1) +
  geom_hline(yintercept = 0) +
  labs(x = "Predicted speaking score (points)", y = "Residual (points)")

Linearity: There is no curve, so the linearity assumption is met.

ggplot(model_data, aes(x = residual, y = reorder(L1, residual, median))) +
  geom_boxplot(outlier.size = 0.3) +
  geom_vline(xintercept = 0) +
  labs(x = "Residual (points)", y = "First language") +
  theme(axis.text.y = element_text(size = 5))

sorted_data <- arrange(model_data, L1)
sorted_model <- lm(Speaking ~ lex + morph, data = sorted_data)
dw <- dwtest(sorted_model)
dw
## 
##  Durbin-Watson test
## 
## data:  sorted_model
## DW = 1.8895, p-value < 2.2e-16
## alternative hypothesis: true autocorrelation is greater than 0

The rows are one learner each, but learners come in groups by their first language. lex and morph vary only between the 56 languages. The rows were sorted by first language. DW = 1.89, p < 0.001. The null hypothesis is that neighboring residuals are uncorrelated. The assumption is not met, so the standard errors are too small.

bp <- bptest(first_model)
bp
## 
##  studentized Breusch-Pagan test
## 
## data:  first_model
## BP = 58.86, df = 2, p-value = 1.655e-13

BP = 58.9, df = 2, p < 0.001. The null hypothesis is equal variance at every value of the predictors. The test rejects the null hypothesis, so the assumption is not met, and the standard errors could be too large or too small. In the residual plot above, there is no clear funnel as the stripes are about the same height. Clustered residuals make the standard errors too small, and unequal spread on its own can push them either way.

ggplot(model_data, aes(sample = residual)) +
  stat_qq(alpha = 0.2) + stat_qq_line() +
  labs(x = "Theoretical quantiles", y = "Residual (points)")

# shapiro.test() accepts at most 5,000 values, so test a random sample
set.seed(3100)
sw <- shapiro.test(sample(model_data$residual, 5000))
sw
## 
##  Shapiro-Wilk normality test
## 
## data:  sample(model_data$residual, 5000)
## W = 0.98947, p-value < 2.2e-16

W = 0.989, p < 0.001. The null hypothesis is that the residuals come from a normal distribution. and since the p is small, the null is rejected, so normality is not met. The Shapiro-Wilk was run on a random 5,000 because of the function’s limit. The Q-Q plot shows the points following the line closely in the middle, but leaving it at both ends. Therefore, the assumption is not met, but with about 48,000 rows the p values are still close to right.

lex_on_morph <- lm(lex ~ morph, data = model_data)
vif_by_hand <- 1 / (1 - summary(lex_on_morph)$r.squared)
vif(first_model)
##      lex    morph 
## 1.560078 1.560078

VIF = 1.56 for both. That is well under 5, so the overlap is moderate: the SE is about \(\sqrt{1.56} \approx 1.25\) times larger than it would be with unrelated predictors.

model_data <- model_data |>
  mutate(cook = cooks.distance(first_model),
         dffits = dffits(first_model),
         dfbetas_interest = dfbetas(first_model)[, "lex"])
n <- nrow(model_data)
p <- length(coef(first_model))
model_data <- model_data |>
  mutate(past_all = cook > 4 / n &
           abs(dffits) > 2 * sqrt(p / n) &
           abs(dfbetas_interest) > 2 / sqrt(n))
model_data |>
  summarize(past_cook = sum(cook > 4 / n),
            past_dffits = sum(abs(dffits) > 2 * sqrt(p / n)),
            past_dfbetas = sum(abs(dfbetas_interest) > 2 / sqrt(n)),
            past_all = sum(past_all))
##   past_cook past_dffits past_dfbetas past_all
## 1      2658        2658         3677     2108

There are 2,658 past Cook’s distance, 2,658 past DFFITS, 3,677 past DFBETAS, and 2,108 past all three.

model_data |>
  filter(past_all) |>
  count(L1, sort = TRUE) |>
  head(10) |>
  kable(col.names = c("First language", "Learners past all three rules"))
First language Learners past all three rules
German 645
English 294
Chinese 270
Turkish 201
Hungarian 177
Arabic 175
Vietnamese 48
Finnish 43
Persian 32
Tagalog 26

The ten first languages with the most learners past all three rules are German, English, Chinese, Turkish, Hungarian, Arabic, Vietnamese, Finnish, Persian, and Tagalog.

language_table <- model_data |>
  group_by(L1, Family) |>
  summarize(learners = n(),
            lex = first(lex),
            morph = first(morph),
            mean_score = mean(Speaking),
            mean_residual = mean(residual),
            past_all_three = sum(past_all),
            .groups = "drop")

datatable(language_table, rownames = FALSE, filter = "top") |>
  formatRound(c("lex", "morph"), 3) |>
  formatRound(c("mean_score", "mean_residual"), 1)

Search for a language or sort a column to check the residual boxplot and the list of languages past all three influence rules.

8. REMEDIATION

# Unequal variance: same coefficients, heteroskedasticity-robust (HC3) SEs
robust <- coeftest(first_model, vcov = vcovHC(first_model, type = "HC3"))
robust
## 
## t test of coefficients:
## 
##              Estimate Std. Error  t value  Pr(>|t|)    
## (Intercept) 552.57488    0.38838 1422.776 < 2.2e-16 ***
## lex         -78.10737    1.07772  -72.475 < 2.2e-16 ***
## morph       -60.50073    3.44978  -17.538 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Independence: add the language family as a group predictor.
# (L1 itself can't be added: lex and morph have one value per language)
family_model <- lm(Speaking ~ lex + morph + Family, data = model_data)
compare_lex <- function(model, name, vc = vcov(model)) {
  est <- coef(model)["lex"]; se <- sqrt(vc["lex", "lex"])
  tibble(Model = name, lex = est, SE = se,
         p = 2 * pt(-abs(est / se), df.residual(model)),
         R2 = summary(model)$r.squared, n = nobs(model))
}
sens <- bind_rows(
  compare_lex(first_model, "First model"),
  compare_lex(first_model, "First model, HC3 SEs",
              vcovHC(first_model, type = "HC3")),
  compare_lex(family_model, "Plus Family"),
  compare_lex(refit, "Without influential rows")
) 
kable(sens, digits = 3)
Model lex SE p R2 n
First model -78.107 1.017 0 0.202 48426
First model, HC3 SEs -78.107 1.078 0 0.202 48426
Plus Family -78.538 1.558 0 0.222 48426
Without influential rows -76.909 0.955 0 0.220 46318
  • Robust standard errors: the coefficient is identical because only the standard errors are recomputed. Its SE changes from 1.017 to 1.078, and p stays below 0.001. \(R^2\) is unchanged because it is the same model.
  • Family: With language family held fixed, the slope of lex is -78.54 (first model: -78.11), p < 0.001, \(R^2\) 0.222. The slope of lex essentially does not change with language family held fixed, so the relationship between lexical distance and speaking score is not explained by which family a learner’s first language belongs to. Therefore, I kept the first model as the final model as independence remained not met with this remedy.
  • Influence: I left out the 2,108 observations past all three rules which left 46,318 rows. I did this because this is a check of how much the result depends on them, since these were real observations rather than errors. The coefficient of lex changes from -78.11 to -76.91, and its p stays below 0.001. \(R^2\) changes from 0.202 to 0.22. The answer to the question does not depend on these observations since the slope is still very similar and negative with a p-value < 0.001.
# Grid of lex values used here and for the prediction slider in Section 9
lex_grid <- round(seq(min(model_data$lex), max(model_data$lex),
                      length.out = 25), 3)

# Predictions with morph at its median, from both models
switch_grid <- tibble(lex = lex_grid, morph = median(model_data$morph))
switch_lines <- bind_rows(
  mutate(switch_grid, model = "All rows (final model)",
         predicted = predict(first_model, switch_grid)),
  mutate(switch_grid, model = "Without influential rows",
         predicted = predict(refit, switch_grid))
)

switch_plot <- ggplot(switch_lines,
                      aes(x = lex, y = predicted, color = model)) +
  geom_line() +
  labs(x = "Lexical distance from Dutch (unitless)",
       y = "Predicted STEX speaking score (points)", color = NULL)

ggplotly(switch_plot)

Click a model in the legend to hide or show it. The two lines have nearly the same slope, so the answer does not depend on the influential rows.

9. THE FINAL MODEL AND ITS INTERPRETATION

final_model <- first_model   
final_summary <- summary(final_model)
final_f <- final_summary$fstatistic
kable(coef(final_summary), digits = 3,
      caption = "Final model coefficients (robust SEs in Section 8)")
Final model coefficients (robust SEs in Section 8)
Estimate Std. Error t value Pr(>|t|)
(Intercept) 552.575 0.377 1466.163 0
lex -78.107 1.017 -76.806 0
morph -60.501 3.407 -17.759 0
no_lex <- lm(Speaking ~ morph, data = model_data)  # same rows
delta_r2 <- final_summary$r.squared - summary(no_lex)$r.squared
lex_anova <- anova(no_lex, final_model)
lex_anova
## Analysis of Variance Table
## 
## Model 1: Speaking ~ morph
## Model 2: Speaking ~ lex + morph
##   Res.Df      RSS Df Sum of Sq      F    Pr(>F)    
## 1  48424 62571062                                  
## 2  48423 55776030  1   6795032 5899.2 < 2.2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  • Fit: \(R^2\) 0.202, adjusted \(R^2\) 0.202, residual SE 33.9 points, and F(2, 48,423) = 6,122.7, p < 0.001.
  • lex: With morphological distance held fixed, learners whose first language is 0.1 further from Dutch lexically are predicted to score 7.8 points lower on average.
  • morph: With lexical distance held fixed, a first language 0.1 further from Dutch in morphological distance goes with a predicted score of about 6.1 points lower.
  • Intercept: The predicted score when lex = 0 and morph = 0, which would be a language identical to Dutch, is 552.6. lex starts at 0.037 and morph starts at -0.017, so this is at the very edge of the data.
  • \(H_0\): t = -76.81, p < 0.001. The p value is the probability of a slope at least this far from 0 if the true slope were 0. That probability is tiny, so we reject \(H_0\). With robust standard errors, t = -72.5, p < 0.001.
  • What lex adds: \(R^2\) without lex 0.105, with lex 0.202, \(\Delta R^2\) = 0.097. The F test of the two models is F(1, 48,423) = 5,899.2, p < 0.001, which matches the t test for lex because F = t².
  • Assumptions for the final model: Linearity is met. Independence is not met. Adding language family did not change the lex slope, and it cannot remove the grouping by first language, so the standard errors are likely too small. Equal variance was handled by the robust standard errors. Normality was not met but it is unimportant for data with such a high n.
# morph held at its 25th, 50th, and 75th percentiles
morph_held <- round(quantile(model_data$morph, c(0.25, 0.5, 0.75)), 3)

pred_grid <- expand_grid(lex = lex_grid, morph = morph_held)
pred_grid$predicted <- predict(final_model, newdata = pred_grid)
pred_grid <- pred_grid |>
  mutate(morph_label = paste("morph =", morph),
         hover = paste0("lex = ", lex, "<br>morph = ", morph,
                        "<br>Predicted score = ", round(predicted, 1)))

pred_plot <- ggplot(pred_grid,
                    aes(x = lex, y = predicted, color = morph_label)) +
  geom_line(aes(group = morph_label)) +
  geom_point(aes(frame = lex, text = hover), size = 3) +
  labs(x = "Lexical distance from Dutch (unitless)",
       y = "Predicted STEX speaking score (points)",
       color = "Morphological distance held at")

ggplotly(pred_plot, tooltip = "text") |>
  animation_opts(frame = 500, transition = 0, redraw = FALSE) |>
  animation_slider(currentvalue = list(prefix = "Lexical distance: "))

Drag the slider to set lexical distance, and hover over a point to read the predicted score. With morph held fixed, each 0.1 increase in lex lowers the prediction by about 7.8 points.

10. DISCUSSION

  • Summary: With morphological distance held fixed, learners whose first language is 0.1 further from Dutch lexically are predicted to score 7.8 points lower on average. With p < 0.001, we reject the \(H_0\) of the true slope being 0.
  • Implications: Based on these results, language schools could set different standards for different groups of learners, and by setting these expectations, could make the learning environments more equitable. For learners whose first language is lexically distant from Dutch, who might need more preparation or assistance to reach the same speaking score, they could have different course lengths or support planned. However, individuals may differ, and since these results are not causal, this would be a guide for planning, not for specific judgments.
  • Limitations: The slope of lex cannot show that lexical distance causes lower scores, and there could be other variables related such as age at arrival or education. A limitation specific to the data is that lexical distance has a single value per language, and 35 of the 70 languages share the maximum value, so the measure cannot tell apart most of the languages that are lexically unrelated to Dutch. With only about 56 distinct lex values, the effective sample is languages, not 48,426 learners, which is why independence failed. A limitation specific to the design is that the learners chose to take the state exam, so these results describe the exam takers, not all immigrants.
  • Future Direction: This analysis could be expanded on by adding age at arrival (AaA) as a predictor. Language groups may arrive at different ages and this may impact speaking score. Adding AaA tests whether the lex slope holds up with age held fixed. Another option would be a mixed model by giving a random intercept for L1. This would give each language its own baseline, so the SE for lex would reflect the number of languages instead of 48,000 learners.

11. GENERATIVE AI DISCLOSURE

I used Claude Generative AI to assist on this analysis report. Used on (5) to help me describe the Spearman correlation. Also helped me understand why I need to watch the VIF. Used on (6) to help me with the inline r. Used on (7) for the inline code in independence, equal variance, normality, VIF checks. Helped me interpret the equal variance. Used it to help me craft the random Shapiro-Wilk test since there were too many observations in my data to do so normally, as well as tweak the Family remedy. I used it to help me create the table for which observations were past all three rules, so that I could name them specifically. Used on (8) to help me with the robust standard errors remedy. Helped me with the sensitivity table, and then saving it so that I could cite it. Also helped me with the inline r. Used on (9) to help me with the inline r. Also helped me interpret the t test and what the p value chance meant for \(H_0\). Used on (10) to help me craft a future direction of the mixed model that would give a random intercept for L1. At the end, Claude helped debug the knit errors, especially with the unicode characters and the degrees of freedom printing incorrectly, for which it suggested adding lines to my setup chunk. Used Claude to assist with the interactive elements of the site, by helping me construct the plotly and DT code and debugging when I ran into errors with them.