---
title: "RESPONDENTS’ PREFERRED SURVEY TOPICS: MEASUREMENT AND PREVALENCE"
subtitle: "Replication Files: Study 1"
author: "Tobias Gummer, Saskia Bartholomäus, and Bernd Weiss"
date: "19.01.2026"
output:
  html_document:
    theme: united
    toc: true
    toc_depth: 3
    toc_float:
      collapsed: true
      smooth_scroll: true
---

***
## Balance Test
 
```{r loading response dataset, message=FALSE, warning=FALSE}
# Loading Datasets
load("data/balance.RData")
```

Age in Years
 
```{r balance test age, message=FALSE, warning=FALSE}
bartlett.test(i_age ~ vb_explain, data = balance)

tab <- map_df(list(t.test(balance$i_age ~ balance$vb_quest, var.equal = TRUE, alternative = "two.sided")), tidy)

tab[c("estimate", "statistic", "p.value", "conf.low", "conf.high", "method")] %>% 
  kbl(align = "llllll", col.names = c("Difference in Means", "t", "p.value", "conf.low", "conf.high", "Method"), digits = 3, caption = "Balance Test: Age in Years") %>%
  kable_styling()

rm(tab)
```
 
Gender (w/o diverse persons)
 
```{r balance test gender, message=FALSE, warning=FALSE}
balance$i_gender[balance$i_gender == 3] <- NA
balance$i_gender <- as_factor(balance$i_gender)
balance$vb_explain <- as_factor(balance$vb_explain)

tab <- map_df(list(chisq.test(balance$i_gender, balance$vb_explain)), tidy)

tab[c("statistic", "p.value", "parameter", "method")] %>% 
  kbl(align = "llll", col.names = c("Chisq", "p.value", "df", "Method"), digits = 3, caption = "Balance Test: Gender (excluding diverse persons)") %>%
  kable_styling()

rm(tab)
```
 
Education (by category)
 
```{r balance test education, message=FALSE, warning=FALSE}
balance$i_education <- as_factor(balance$i_education)

tab <- map_df(list(chisq.test(balance$i_education, balance$vb_explain)), tidy)

tab[c("statistic", "p.value", "parameter", "method")] %>% 
  kbl(align = "llll", col.names = c("Chisq", "p.value", "df", "Method"), digits = 3, caption = "Balance Test: Education (by category)") %>%
  kable_styling()

tab <- table(balance$i_education, balance$vb_quest)
tab_df <- as.data.frame.matrix(tab)
rownames(tab_df) <- c("Low", "Intermediate", "High")

kable(tab_df, align = "llll", col.names = c("without Example", "with Example"), row.names = TRUE, caption = "Number of Respondents by Education and Treatment") %>%
  kable_styling()

rm(tab)
```
 
Residence in Germany
 
```{r balance test east germany, message=FALSE, warning=FALSE}
balance$i_east <- as_factor(balance$i_east)

tab <- map_df(list(chisq.test(balance$i_east, balance$vb_explain)), tidy)

tab[c("statistic", "p.value", "parameter", "method")] %>% 
  kbl(align = "llll", col.names = c("Chisq", "p.value", "df", "Method"), digits = 3, caption = "Balance Test: Residence in Germany (by state)") %>%
  kable_styling()

rm(tab, balance)
```
***
## Descriptive Results 
 
```{r loading subset, message=FALSE, warning=FALSE}
# Loading Datasets
load("data/subset.RData")
```
 
Experimental Group
 
```{r experimental groups, message=FALSE, warning=FALSE}
sumtable(subset, vars = "vb_explain", label = "Questionnaire", out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Age in Years
 
```{r age in years, message=FALSE, warning=FALSE}
sumtable(subset, vars = "i_age", label = "Age in Years", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")

sumtable(subset, vars = "age_group", label = "Age Group", out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Gender
 
```{r gender, message=FALSE, warning=FALSE}
sumtable(subset, vars = "i_gender", label = "Gender", out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Education
 
```{r education, message=FALSE, warning=FALSE}
sumtable(subset, vars = "i_education", label = "Education", out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Eastern Germany
 
```{r east germany, message=FALSE, warning=FALSE}
sumtable(subset, vars = "i_east", label = "Residence in Germany", out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Interest in Survey
 
```{r age in years, message=FALSE, warning=FALSE}
sumtable(subset, vars = "s_interesting", label = "Interestingness of the Survey", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Acquiescence
 
```{r acqu, message=FALSE, warning=FALSE}
sumtable(subset, vars = "acquiescence", label = "Acquiescence", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Extreme
 
```{r extreme, message=FALSE, warning=FALSE}
sumtable(subset, vars = "extreme", label = "Extreme Responding", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Midpoint
 
```{r midpoint, message=FALSE, warning=FALSE}
sumtable(subset, vars = "midpoint", label = "Midpoint Responding", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Item Nonresponse
 
```{r item na, message=FALSE, warning=FALSE}
sumtable(subset, vars = "na", label = "Item Nonresponse", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```
 
Comprehension
 
```{r comp, message=FALSE, warning=FALSE}
sumtable(subset, vars = "i_comp", label = "Comprehension", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```

Correct Assessment 

```{r comp, message=FALSE, warning=FALSE}
sumtable(subset, vars = "matrix_mean", label = "Correct Assessment", add.median = TRUE, digits = 3, out = "kable") %>% 
  kableExtra::kable_styling(bootstrap_options = "basic")
```


