1 Purpose

In this R Markdown file we analyze the response frequency. This software is free for private, non-commercial use only. Please contact the authors for commercial usage.

2 Summary

This code analyzes the response frequency, including differences in responses by block, component, task sequence, attribute order, object location, and ten respondent characteristics (5 demographic and 5 SES).

3 Load the libraries

setwd("C:/Users/maksat/Box Sync/USF PC/EuroQol/Kaisen task/paper1/Wave 1/markdown")
# clear memory
rm(list = ls())
# use libraries
library(gtsummary) # for tbl_summary command
library(reshape2) # for command mint and dcast
library(dplyr) # for command rename
library(huxtable) # for command as_hux_table
library(knitr) # for command kable
library(kableExtra)

4 Data Notation

Below, we present data notations and definitions of new variables created.

4.1 Subject and task index

subject, i = 1 to N; task, t = 1 to T;

T1 is the number of coma comparison tasks and paired comparison tasks including warmup

T2 is the number of kaizen tasks including warmup

4.2 Demographic variables

‘age_range’ is an indicator variable for respondent age range
1: 18 and 34 years of age
2: 35 and 54 years of age
3: 55+

‘female’
0: male/other
1: female

‘hispanic’ is an indicator variable for hispanic respondents
1: hispanic
0: not hispanic

‘race’ will be categorized as following:
1 White alone
2 Black or African American alone
3 Other

‘region’ is an indicator variable for the US regions
1 Northeast region of the US
2 Midwest region of the US
3 South region of the US
4 West region of the US

4.3 Socioeconomic status (SES) variables

‘parent’ is an indicator variable for type of parenting
1 the respondent is a parent
0 the respondent is not a parent

‘marital’ is a categorical variable for mariatal status
1 married
2 never married
3 other

‘edu’ is an indicator variable
1: high school or less
2: associate/some college
3: bachelors or more

‘income’ is a categorical variable for respondent’s income
1 Less than 49,999 USD
2 50,000 USD to 99,999 USD
3 100,000 USD or more

‘community’ is a categorical variable for where respondents reside
1 urban
2 suburban/don’t know/not sure
3 rural

‘comment_cat’ is a categorical variable for survey comments
1 informative
2 non-informative positive
3 non-informative negative
4 non-informative neutral/none/nothing/no
5 missing

5 Specify the settings

# specify the setting
N = 314 ## number of survey record
Z = 230 ## number of variables per record
Z1 = 131 ## the number of respondent-specific variables 
Z2 = 28  ## the number of task-specific variables
Z3 = 71  ## the number of temporal variables (e.g., page times)  
T1 = 17 ## number of paired comparisons per respondent
T2 = 11 ## number of kaizen tasks per respondent
spec = c(N, Z, Z1, Z2, Z3, T1, T2)  ## summary of setting specification

6 Specify the functions

# function to analyze choices by component sequence and block
choice_vs_compseq_by_question_and_block <- function(variable1, variable2, data) {
  ifelse(deparse(substitute(data)) == "pc2_it", 
  component_data <- data[data$task == variable1 & data$subjectindex == variable2,] %>%
  select(c(actual_choice, pc_cnum2)) %>% 
  mutate(actual_choice =  case_when(actual_choice == "0"~"0", 
                                        actual_choice == "1"~"1")) %>%
  tbl_summary(by = "pc_cnum2") %>% add_p(everything() ~ "chisq.test") %>% 
  as_hux_table(), 
  component_data <- data[data$task == variable1 & data$subjectindex == variable2,] %>%
  select(c(actual_choice, pc_cnum2)) %>% 
  tbl_summary(by = "pc_cnum2") %>% add_p(everything() ~ "chisq.test") %>% 
  as_hux_table())
  assign(paste(variable1, "_", "block", variable2, sep = ""), component_data, 
         envir = .GlobalEnv)
  print(paste(variable1, "_", "block", variable2, sep = ""))
  print(component_data)
 kable(component_data, align = "c", caption = paste("**", variable1, " and Task Sequence ", variable2, "**", sep = ""), row.names = FALSE, escape = FALSE, centering = T) %>% kable_styling()
}

# function to analyze choices by task sequence and block
choice_vs_taskseq_by_question_and_block <- function(variable1, variable2, data) {
  ifelse(deparse(substitute(data)) == "pc2_it", 
  component_data <- data[data$task == variable1 & data$subjectindex == variable2,] %>%
  select(c(actual_choice, tnum2)) %>% 
  mutate(actual_choice =  case_when(actual_choice == "0"~"0", 
                                         actual_choice == "1"~"1")) %>%
  tbl_summary(by = "tnum2") %>% add_p(everything() ~ "chisq.test") %>% 
         as_hux_table(), 
  component_data <- data[data$task == variable1 & data$subjectindex == variable2,] %>%
  select(c(actual_choice, tnum2)) %>% 
  tbl_summary(by = "tnum2") %>% add_p(everything() ~ "chisq.test") %>% 
         as_hux_table()) 
  assign(paste(variable1, "_", "taskseq", variable2, sep = ""), component_data, 
         envir = .GlobalEnv)
  print(paste(variable1, "_", "taskseq", variable2, sep = ""))
  print(t(component_data))
  #kable(component_data, align = "c", caption = paste("**", variable1, " and Task Sequence ",
  #variable2, "**", sep = ""), row.names = FALSE, escape = FALSE, centering = T)
}

# function to perform t-test by question and block
ttest_by_question_and_block <- function(variable1, variable2, data) {
  t_test = t.test(pc2_it$final_choice[pc2_it$task == variable1 & 
  pc2_it$subjectindex == variable2], mu = 0.5)
  print(paste(variable1, "_", "block", variable2, sep = ""))
  print(t_test$p.value)
}

# function to analyze straight-lining
straight_lining = function(variable, data) {
  component_data = data %>% select(subjectindex, quota, female, age_range, race, hispanic, 
  pc_cnum2, region, parent, marital, edu, income, community, variable) %>% 
  mutate_if(is.numeric, as.character) %>%
  tbl_summary(by = variable) %>% add_p(everything() ~ "chisq.test") %>% 
  as_hux_table()
  assign(paste(variable, sep = ""), component_data, envir = .GlobalEnv)
  print(variable)
  print(component_data)
}

# function to generate alternatives in kaizen tasks
generate_A <- function(a_i, alt1, alt2) {
  if (a_i %in% 0:4) {
    substr1 <- substr(alt1, 1, a_i)
    substr2 <- substr(alt2, a_i+1, a_i+1)
    substr3 <- substr(alt1, a_i+2, 5)
    return(paste(substr1, substr2, substr3, sep = ""))
  } else {
    return("-1")
  }
}

# function to generate alternatives in kaizen tasks
generate_A2 <- function(a_i, b_i, alt1, alt2) {
  if ((a_i %in% 0:4) & (b_i %in% 0:4)) {
    substr(alt1,a_i+1,a_i+1) <- substr(alt2, a_i+1, a_i+1)
    substr(alt1,b_i+1,b_i+1) <- substr(alt2, b_i+1, b_i+1)
    return(alt1)
  } else {
    return("-1")
  }
}

7 Load the Data

## load the respondent data
resp_i = read.csv("resp_i_231010.csv")
resp_i <- resp_i[resp_i$incomplete==0,] ## Only completes

# load the paired comparison data
pc_it = read.csv("pc_it_231010.csv")
pc_it <- pc_it[pc_it$incomplete==0,] ## Only completes

# load the kaizen task data
kz_it = read.csv("kz_it_231010.csv")
kz_it <- kz_it[kz_it$incomplete==0,] ## Only completes

8 Recode the Data

In this section we recode the data to create the variables defined above

8.1 Quota and demographic variables

# create 'quota'
resp_i$quota = apply(subset(resp_i, select = c(quota01:quota18)), 1,
                     function(x) ifelse(x[1]!="",as.integer(which(x == "yes")),""))

# create 'age_range' 
resp_i$age_range = as.numeric(cut(resp_i$G02Q02, breaks = c(18, 34, 54, 
      max(resp_i$G02Q02, na.rm = T)), labels = c(1, 2, 3), include.lowest = T))

# create 'female' 
resp_i$female = as.numeric(ifelse(resp_i$G02Q03 == "female", 1, 0))

# create 'race'
resp_i$race = apply((subset(resp_i, select = c(G02Q05.AO00.:G02Q05.AO14.)) 
               == "Yes")*1, 1, function(x) ifelse(sum(x) == 1 & x[1] == 1, 1,
               ifelse(sum(x) == 1 & x[2] == 1, 2, 3)))

# create 'hispanic' 
resp_i$hispanic = ifelse(substr(resp_i$G02Q04,1,1) == "y", 1, 0)

# create a list consisting of four US regions
states = subset(resp_i, select = c(id, G02Q01))
regions = list(
  northeast = c("Connecticut", "Maine", "Massachusetts", "New Hampshire", 
          "Rhode Island", "Vermont", "New York", "Pennsylvania", "New Jersey"),
  midwest = c("Indiana", "Illinois", "Michigan", "Ohio", "Wisconsin", "Iowa", 
          "Kansas", "Minnesota", "Missouri", "Nebraska", "North Dakota", 
          "South Dakota"),
  south = c("Delaware", "Washington, DC", "Florida", "Georgia", "Maryland", 
          "North Carolina", "South Carolina", "Virginia", "West Virginia", 
          "Alabama", "Kentucky", "Mississippi", "Tennessee", "Arkansas", 
          "Louisiana", "Oklahoma", "Texas"),
  west = c("Arizona", "Colorado", "Idaho", "New Mexico", "Montana", "Utah", 
          "Nevada", "Wyoming", "Alaska", "California", "Hawaii", "Oregon", 
          "Washington"))

# create a 0/1 variable or each state indicating which region they belong
for(region in names(regions)) {
  resp_i[region] = as.integer(as.logical(sapply(resp_i$G02Q01, 
                      function(x) any(trimws(x) %in% regions[[region]]))))}

# convert 0/1 to a categorical variable 
# (1: Northeast, 2: Midwest, 3: South, 4: West)
resp_i$region = apply(resp_i[,c("northeast", "midwest", "south", "west")], 1, 
      function(x) ifelse(x[1] == 1, 1, ifelse(x[2] == 1, 2, ifelse(x[3] == 1, 3, 
      ifelse(x[4] == 1, 4, "")))))

8.2 Socio-economic status (SES) variables

# create 'parent'
resp_i$parent = apply((subset(resp_i, select = c(G11Q02.SQ001.:G11Q02.SQ007.)) 
                 == "Yes")*1, 1, function(x) ifelse(any(1 %in% x[1:4]), 1, 0))

# create 'marital'
resp_i$marital = ifelse(resp_i$G11Q06 == "now married" | 
  resp_i$G11Q06 == "married", 1, ifelse(resp_i$G11Q06 == "never married", 2, 3))

# create 'edu'
resp_i$edu = ifelse(resp_i$G11Q07 == "less than 1st grade" | 
      resp_i$G11Q07 == "1st, 2nd, 3rd, or 4th grade" | resp_i$G11Q07 == 
      "5th or 6th grade" | resp_i$G11Q07 == "7th and 8th grade" | 
      resp_i$G11Q07 == "9th grade" | 
      resp_i$G11Q07 == "10th grade" | resp_i$G11Q07 == "11th grade" | 
      resp_i$G11Q07 == "12th grade no diploma" | 
      resp_i$G11Q07 == "high school graduate - high school diploma or equivalent", 1, 
      ifelse(resp_i$G11Q07 == "some college but no degree" | resp_i$G11Q07 == 
      "associate degree in college - occupation/vocation program" | 
      resp_i$G11Q07 == "associate degree in college - academic program", 2, 3))

# create 'income'
resp_i$income = ifelse(resp_i$G11Q08 == "under $10,000" | 
    resp_i$G11Q08 == "$10,000 to under $20,000" | 
    resp_i$G11Q08 == "$20,000 to under $30,000" | resp_i$G11Q08 == 
    "$30,000 to under $40,000" | resp_i$G11Q08 == "$40,000 to under $50,000", 1, 
    ifelse(resp_i$G11Q08 == "$50,000 to under $75,000" |  
    resp_i$G11Q08 == "$75,000 to under $100,000", 2, 3))

# create 'community'
resp_i$community = ifelse(resp_i$G11Q05 == "urban", 1, 
                   ifelse(resp_i$G11Q05 == "rural", 3, 2))

# merge task data with subjectindex quota and 5 demographic and 5 SES variables
resp_char = c("id", "subjectindex", "quota", "pc_cnum2", "female", "age_range", "race", 
              "hispanic", "region", "parent", "marital", "edu", "income", "community")
pc_it <- merge(pc_it, subset(resp_i, select = resp_char), by = "id", all.x = T)
kz_it <- merge(kz_it, subset(resp_i, select = resp_char), by = "id", all.x = T)

# Subset the tasks by component, excluding warmups 
cc2_it <- pc_it[ pc_it$tnum2 >1 & pc_it$tnum2 <= 6,]
pc2_it <- pc_it[ pc_it$tnum2 >7,]
kz2_it <- kz_it[ kz_it$tnum2 >1,]

9 Descriptive Analyses

In this section we perform chi-square test of independence to analyze differences in responses by block, component, task sequence, attribute order, object location, and ten respondent characteristics.

9.1 Component sequence

We first look at the association between component sequence and the warm-up responses for paired comparisons.

# assess whether warmup associated with component sequence in pc
chisq.test(data.frame(unclass(table(pc_it$final_choice[pc_it$task == "G07Q02"], 
                                    pc_it$pc_cnum2[pc_it$task == "G07Q02"]))))
## 
##  Pearson's Chi-squared test with Yates' continuity correction
## 
## data:  data.frame(unclass(table(pc_it$final_choice[pc_it$task == "G07Q02"],     pc_it$pc_cnum2[pc_it$task == "G07Q02"])))
## X-squared = 0.18228, df = 1, p-value = 0.6694

We now look at the association between component sequence and the warm-up responses for kaizen tasks. The first column on the table below represents the final choice (e.g., 0|1|2|3).

# assess whether warmup associated with component sequence in kz
wu_kz = kz_it[kz_it$task == "G09Q02",]
a = wu_kz %>% select(final_choice, pc_cnum2) %>% tbl_summary(by = "pc_cnum2") %>% 
  add_p(everything() ~ "chisq.test")

kable(a, align = "c", caption = "**Association between Component Sequence and the Warm-up Responses for Kaizen Tasks**", row.names = FALSE, escape = FALSE, centering = T)
Association between Component Sequence and the Warm-up Responses for Kaizen Tasks
Characteristic 2, N = 150 3, N = 164 p-value
final_choice NA NA 0.5
0|1|2|3 2 (1.3%) 2 (1.2%) NA
0|1|2|4 2 (1.3%) 7 (4.3%) NA
0|1|3|2 1 (0.7%) 2 (1.2%) NA
0|1|3|4 2 (1.3%) 2 (1.2%) NA
0|1|4|2 2 (1.3%) 0 (0%) NA
0|1|4|3 2 (1.3%) 1 (0.6%) NA
0|2|1|3 2 (1.3%) 2 (1.2%) NA
0|2|1|4 0 (0%) 1 (0.6%) NA
0|2|3|1 2 (1.3%) 6 (3.7%) NA
0|2|3|4 4 (2.7%) 5 (3.0%) NA
0|2|4|1 2 (1.3%) 4 (2.4%) NA
0|2|4|3 1 (0.7%) 3 (1.8%) NA
0|3|1|2 0 (0%) 1 (0.6%) NA
0|3|1|4 1 (0.7%) 1 (0.6%) NA
0|3|2|1 2 (1.3%) 0 (0%) NA
0|3|2|4 1 (0.7%) 1 (0.6%) NA
0|3|4|1 6 (4.0%) 1 (0.6%) NA
0|3|4|2 0 (0%) 1 (0.6%) NA
0|4|1|2 2 (1.3%) 0 (0%) NA
0|4|1|3 2 (1.3%) 1 (0.6%) NA
0|4|2|1 2 (1.3%) 2 (1.2%) NA
0|4|2|3 2 (1.3%) 5 (3.0%) NA
0|4|3|1 0 (0%) 3 (1.8%) NA
0|4|3|2 1 (0.7%) 2 (1.2%) NA
1|0|3|2 1 (0.7%) 1 (0.6%) NA
1|0|3|4 1 (0.7%) 2 (1.2%) NA
1|0|4|2 1 (0.7%) 4 (2.4%) NA
1|0|4|3 0 (0%) 2 (1.2%) NA
1|2|0|3 2 (1.3%) 2 (1.2%) NA
1|2|0|4 1 (0.7%) 1 (0.6%) NA
1|2|3|0 2 (1.3%) 1 (0.6%) NA
1|2|3|4 4 (2.7%) 5 (3.0%) NA
1|2|4|0 3 (2.0%) 0 (0%) NA
1|2|4|3 0 (0%) 2 (1.2%) NA
1|3|0|2 0 (0%) 1 (0.6%) NA
1|3|0|4 2 (1.3%) 0 (0%) NA
1|3|2|0 0 (0%) 1 (0.6%) NA
1|3|2|4 1 (0.7%) 0 (0%) NA
1|3|4|0 1 (0.7%) 0 (0%) NA
1|3|4|2 1 (0.7%) 3 (1.8%) NA
1|4|0|2 0 (0%) 2 (1.2%) NA
1|4|2|3 2 (1.3%) 1 (0.6%) NA
1|4|3|2 1 (0.7%) 3 (1.8%) NA
2|0|1|3 2 (1.3%) 2 (1.2%) NA
2|0|1|4 3 (2.0%) 2 (1.2%) NA
2|0|3|1 1 (0.7%) 0 (0%) NA
2|0|3|4 1 (0.7%) 2 (1.2%) NA
2|0|4|1 0 (0%) 2 (1.2%) NA
2|0|4|3 2 (1.3%) 2 (1.2%) NA
2|1|0|3 1 (0.7%) 0 (0%) NA
2|1|0|4 0 (0%) 1 (0.6%) NA
2|1|3|0 1 (0.7%) 2 (1.2%) NA
2|1|3|4 1 (0.7%) 1 (0.6%) NA
2|1|4|0 1 (0.7%) 0 (0%) NA
2|1|4|3 4 (2.7%) 3 (1.8%) NA
2|3|0|4 2 (1.3%) 1 (0.6%) NA
2|3|1|0 2 (1.3%) 1 (0.6%) NA
2|3|1|4 1 (0.7%) 2 (1.2%) NA
2|3|4|0 0 (0%) 1 (0.6%) NA
2|3|4|1 1 (0.7%) 1 (0.6%) NA
2|4|0|1 2 (1.3%) 1 (0.6%) NA
2|4|0|3 1 (0.7%) 2 (1.2%) NA
2|4|1|0 0 (0%) 1 (0.6%) NA
2|4|3|0 0 (0%) 1 (0.6%) NA
2|4|3|1 2 (1.3%) 1 (0.6%) NA
3|0|1|2 2 (1.3%) 0 (0%) NA
3|0|1|4 2 (1.3%) 1 (0.6%) NA
3|0|2|1 1 (0.7%) 0 (0%) NA
3|0|2|4 2 (1.3%) 4 (2.4%) NA
3|0|4|1 2 (1.3%) 0 (0%) NA
3|0|4|2 2 (1.3%) 2 (1.2%) NA
3|1|0|2 2 (1.3%) 0 (0%) NA
3|1|0|4 2 (1.3%) 1 (0.6%) NA
3|1|2|0 1 (0.7%) 2 (1.2%) NA
3|1|2|4 1 (0.7%) 0 (0%) NA
3|1|4|2 1 (0.7%) 1 (0.6%) NA
3|2|0|1 2 (1.3%) 0 (0%) NA
3|2|0|4 0 (0%) 1 (0.6%) NA
3|2|1|0 0 (0%) 1 (0.6%) NA
3|2|1|4 4 (2.7%) 2 (1.2%) NA
3|2|4|0 2 (1.3%) 0 (0%) NA
3|2|4|1 2 (1.3%) 0 (0%) NA
3|4|0|1 0 (0%) 1 (0.6%) NA
3|4|0|2 0 (0%) 1 (0.6%) NA
3|4|1|0 1 (0.7%) 0 (0%) NA
3|4|1|2 0 (0%) 1 (0.6%) NA
3|4|2|0 0 (0%) 3 (1.8%) NA
3|4|2|1 2 (1.3%) 3 (1.8%) NA
4|0|1|2 0 (0%) 3 (1.8%) NA
4|0|1|3 1 (0.7%) 1 (0.6%) NA
4|0|2|1 1 (0.7%) 4 (2.4%) NA
4|0|2|3 2 (1.3%) 0 (0%) NA
4|0|3|1 0 (0%) 2 (1.2%) NA
4|0|3|2 1 (0.7%) 1 (0.6%) NA
4|1|0|2 1 (0.7%) 0 (0%) NA
4|1|0|3 3 (2.0%) 0 (0%) NA
4|1|2|3 1 (0.7%) 3 (1.8%) NA
4|1|3|0 2 (1.3%) 0 (0%) NA
4|1|3|2 1 (0.7%) 0 (0%) NA
4|2|0|1 1 (0.7%) 0 (0%) NA
4|2|0|3 2 (1.3%) 2 (1.2%) NA
4|2|1|0 2 (1.3%) 2 (1.2%) NA
4|2|1|3 1 (0.7%) 2 (1.2%) NA
4|2|3|0 1 (0.7%) 0 (0%) NA
4|2|3|1 1 (0.7%) 1 (0.6%) NA
4|3|0|1 2 (1.3%) 0 (0%) NA
4|3|0|2 1 (0.7%) 0 (0%) NA
4|3|1|0 2 (1.3%) 1 (0.6%) NA
4|3|1|2 1 (0.7%) 1 (0.6%) NA
4|3|2|0 0 (0%) 2 (1.2%) NA
4|3|2|1 0 (0%) 2 (1.2%) NA

9.2 Block

Here we look at the association between blocks and the warm-up responses for paired comparisons.

# assess whether warmup associated with block in pc
chisq.test(data.frame(unclass(table(pc_it$final_choice[pc_it$task == "G07Q02"], 
                                    pc_it$subjectindex[pc_it$task == "G07Q02"]))))
## 
##  Pearson's Chi-squared test
## 
## data:  data.frame(unclass(table(pc_it$final_choice[pc_it$task == "G07Q02"],     pc_it$subjectindex[pc_it$task == "G07Q02"])))
## X-squared = 4.9825, df = 3, p-value = 0.1731

Here we look at the association between blocks and the warm-up responses for kaizen tasks.

# assess whether warmup associated with block in kz
a = wu_kz %>% select(final_choice, subjectindex) %>% tbl_summary(by = "subjectindex") %>% 
  add_p(everything() ~ "chisq.test")

kable(a, align = "c", caption = "**Association between Blocks and the Warm-up Responses for Kaizen Tasks**", row.names = FALSE, escape = FALSE, centering = T)
Association between Blocks and the Warm-up Responses for Kaizen Tasks
Characteristic 1, N = 82 2, N = 81 3, N = 77 4, N = 74 p-value
final_choice NA NA NA NA 0.5
0|1|2|3 1 (1.2%) 2 (2.5%) 1 (1.3%) 0 (0%) NA
0|1|2|4 2 (2.4%) 1 (1.2%) 3 (3.9%) 3 (4.1%) NA
0|1|3|2 0 (0%) 2 (2.5%) 0 (0%) 1 (1.4%) NA
0|1|3|4 1 (1.2%) 2 (2.5%) 0 (0%) 1 (1.4%) NA
0|1|4|2 0 (0%) 2 (2.5%) 0 (0%) 0 (0%) NA
0|1|4|3 1 (1.2%) 1 (1.2%) 0 (0%) 1 (1.4%) NA
0|2|1|3 3 (3.7%) 0 (0%) 0 (0%) 1 (1.4%) NA
0|2|1|4 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
0|2|3|1 3 (3.7%) 2 (2.5%) 1 (1.3%) 2 (2.7%) NA
0|2|3|4 3 (3.7%) 2 (2.5%) 2 (2.6%) 2 (2.7%) NA
0|2|4|1 1 (1.2%) 2 (2.5%) 2 (2.6%) 1 (1.4%) NA
0|2|4|3 1 (1.2%) 2 (2.5%) 1 (1.3%) 0 (0%) NA
0|3|1|2 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
0|3|1|4 0 (0%) 0 (0%) 1 (1.3%) 1 (1.4%) NA
0|3|2|1 1 (1.2%) 1 (1.2%) 0 (0%) 0 (0%) NA
0|3|2|4 0 (0%) 0 (0%) 2 (2.6%) 0 (0%) NA
0|3|4|1 1 (1.2%) 2 (2.5%) 0 (0%) 4 (5.4%) NA
0|3|4|2 1 (1.2%) 0 (0%) 0 (0%) 0 (0%) NA
0|4|1|2 0 (0%) 1 (1.2%) 0 (0%) 1 (1.4%) NA
0|4|1|3 1 (1.2%) 1 (1.2%) 0 (0%) 1 (1.4%) NA
0|4|2|1 0 (0%) 0 (0%) 2 (2.6%) 2 (2.7%) NA
0|4|2|3 2 (2.4%) 0 (0%) 2 (2.6%) 3 (4.1%) NA
0|4|3|1 2 (2.4%) 0 (0%) 1 (1.3%) 0 (0%) NA
0|4|3|2 0 (0%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
1|0|3|2 0 (0%) 2 (2.5%) 0 (0%) 0 (0%) NA
1|0|3|4 2 (2.4%) 1 (1.2%) 0 (0%) 0 (0%) NA
1|0|4|2 2 (2.4%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
1|0|4|3 0 (0%) 0 (0%) 2 (2.6%) 0 (0%) NA
1|2|0|3 1 (1.2%) 2 (2.5%) 0 (0%) 1 (1.4%) NA
1|2|0|4 2 (2.4%) 0 (0%) 0 (0%) 0 (0%) NA
1|2|3|0 0 (0%) 2 (2.5%) 1 (1.3%) 0 (0%) NA
1|2|3|4 3 (3.7%) 2 (2.5%) 3 (3.9%) 1 (1.4%) NA
1|2|4|0 1 (1.2%) 0 (0%) 1 (1.3%) 1 (1.4%) NA
1|2|4|3 0 (0%) 0 (0%) 1 (1.3%) 1 (1.4%) NA
1|3|0|2 0 (0%) 0 (0%) 0 (0%) 1 (1.4%) NA
1|3|0|4 1 (1.2%) 0 (0%) 1 (1.3%) 0 (0%) NA
1|3|2|0 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
1|3|2|4 1 (1.2%) 0 (0%) 0 (0%) 0 (0%) NA
1|3|4|0 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
1|3|4|2 3 (3.7%) 0 (0%) 1 (1.3%) 0 (0%) NA
1|4|0|2 1 (1.2%) 0 (0%) 1 (1.3%) 0 (0%) NA
1|4|2|3 0 (0%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
1|4|3|2 2 (2.4%) 1 (1.2%) 0 (0%) 1 (1.4%) NA
2|0|1|3 1 (1.2%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
2|0|1|4 1 (1.2%) 2 (2.5%) 1 (1.3%) 1 (1.4%) NA
2|0|3|1 1 (1.2%) 0 (0%) 0 (0%) 0 (0%) NA
2|0|3|4 0 (0%) 0 (0%) 1 (1.3%) 2 (2.7%) NA
2|0|4|1 2 (2.4%) 0 (0%) 0 (0%) 0 (0%) NA
2|0|4|3 1 (1.2%) 0 (0%) 1 (1.3%) 2 (2.7%) NA
2|1|0|3 1 (1.2%) 0 (0%) 0 (0%) 0 (0%) NA
2|1|0|4 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
2|1|3|0 1 (1.2%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
2|1|3|4 0 (0%) 0 (0%) 0 (0%) 2 (2.7%) NA
2|1|4|0 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
2|1|4|3 2 (2.4%) 0 (0%) 1 (1.3%) 4 (5.4%) NA
2|3|0|4 2 (2.4%) 0 (0%) 0 (0%) 1 (1.4%) NA
2|3|1|0 1 (1.2%) 0 (0%) 0 (0%) 2 (2.7%) NA
2|3|1|4 0 (0%) 2 (2.5%) 0 (0%) 1 (1.4%) NA
2|3|4|0 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
2|3|4|1 0 (0%) 0 (0%) 1 (1.3%) 1 (1.4%) NA
2|4|0|1 1 (1.2%) 0 (0%) 0 (0%) 2 (2.7%) NA
2|4|0|3 0 (0%) 2 (2.5%) 1 (1.3%) 0 (0%) NA
2|4|1|0 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
2|4|3|0 1 (1.2%) 0 (0%) 0 (0%) 0 (0%) NA
2|4|3|1 1 (1.2%) 1 (1.2%) 0 (0%) 1 (1.4%) NA
3|0|1|2 0 (0%) 0 (0%) 0 (0%) 2 (2.7%) NA
3|0|1|4 0 (0%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
3|0|2|1 0 (0%) 0 (0%) 0 (0%) 1 (1.4%) NA
3|0|2|4 4 (4.9%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
3|0|4|1 0 (0%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
3|0|4|2 0 (0%) 2 (2.5%) 2 (2.6%) 0 (0%) NA
3|1|0|2 0 (0%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
3|1|0|4 0 (0%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
3|1|2|0 0 (0%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
3|1|2|4 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
3|1|4|2 1 (1.2%) 1 (1.2%) 0 (0%) 0 (0%) NA
3|2|0|1 1 (1.2%) 0 (0%) 1 (1.3%) 0 (0%) NA
3|2|0|4 0 (0%) 0 (0%) 0 (0%) 1 (1.4%) NA
3|2|1|0 0 (0%) 0 (0%) 0 (0%) 1 (1.4%) NA
3|2|1|4 3 (3.7%) 1 (1.2%) 1 (1.3%) 1 (1.4%) NA
3|2|4|0 0 (0%) 2 (2.5%) 0 (0%) 0 (0%) NA
3|2|4|1 0 (0%) 2 (2.5%) 0 (0%) 0 (0%) NA
3|4|0|1 0 (0%) 0 (0%) 0 (0%) 1 (1.4%) NA
3|4|0|2 1 (1.2%) 0 (0%) 0 (0%) 0 (0%) NA
3|4|1|0 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
3|4|1|2 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
3|4|2|0 1 (1.2%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
3|4|2|1 2 (2.4%) 1 (1.2%) 2 (2.6%) 0 (0%) NA
4|0|1|2 0 (0%) 0 (0%) 3 (3.9%) 0 (0%) NA
4|0|1|3 0 (0%) 0 (0%) 1 (1.3%) 1 (1.4%) NA
4|0|2|1 1 (1.2%) 1 (1.2%) 3 (3.9%) 0 (0%) NA
4|0|2|3 0 (0%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
4|0|3|1 1 (1.2%) 0 (0%) 0 (0%) 1 (1.4%) NA
4|0|3|2 0 (0%) 0 (0%) 1 (1.3%) 1 (1.4%) NA
4|1|0|2 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
4|1|0|3 2 (2.4%) 0 (0%) 0 (0%) 1 (1.4%) NA
4|1|2|3 1 (1.2%) 2 (2.5%) 0 (0%) 1 (1.4%) NA
4|1|3|0 0 (0%) 0 (0%) 0 (0%) 2 (2.7%) NA
4|1|3|2 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
4|2|0|1 0 (0%) 1 (1.2%) 0 (0%) 0 (0%) NA
4|2|0|3 0 (0%) 1 (1.2%) 1 (1.3%) 2 (2.7%) NA
4|2|1|0 0 (0%) 0 (0%) 3 (3.9%) 1 (1.4%) NA
4|2|1|3 1 (1.2%) 2 (2.5%) 0 (0%) 0 (0%) NA
4|2|3|0 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
4|2|3|1 1 (1.2%) 1 (1.2%) 0 (0%) 0 (0%) NA
4|3|0|1 1 (1.2%) 1 (1.2%) 0 (0%) 0 (0%) NA
4|3|0|2 0 (0%) 0 (0%) 1 (1.3%) 0 (0%) NA
4|3|1|0 1 (1.2%) 1 (1.2%) 1 (1.3%) 0 (0%) NA
4|3|1|2 1 (1.2%) 0 (0%) 0 (0%) 1 (1.4%) NA
4|3|2|0 0 (0%) 2 (2.5%) 0 (0%) 0 (0%) NA
4|3|2|1 0 (0%) 1 (1.2%) 1 (1.3%) 0 (0%) NA

Next, we look at the association between each of the 40 paired comparison questions (i.e., actual_choice) with each component sequence and each block

# assess whether all responses by 40 pc associated with component sequence
# define tasks to loop over
tasks_pc = c("G08Q01","G08Q02","G08Q03","G08Q04","G08Q05","G08Q06","G08Q07", 
             "G08Q08","G08Q09","G08Q10")
tasks_kz = c("G10Q01","G10Q02","G10Q03","G10Q04","G10Q05","G10Q06","G10Q07", 
             "G10Q08","G10Q09","G10Q10")
block = c(1:4)

# assess 'actual_choice' vs component sequence by question and block for pc
results = lapply(tasks_pc, function(variable1) {
  lapply(block, function(variable2) {
  choice_vs_compseq_by_question_and_block(variable1, variable2, pc2_it)
})})
## [1] "G08Q01_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                12 (38%)    19 (38%)             
##                 1                20 (63%)    31 (62%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q01_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                23 (68%)    32 (68%)             
##                 1                11 (32%)    15 (32%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q01_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0                28 (70%)    20 (54%)             
##                 1                12 (30%)    17 (46%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q01_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.8    
##                 0                27 (61%)    20 (67%)             
##                 1                17 (39%)    10 (33%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q02_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0                14 (44%)    28 (56%)             
##                 1                18 (56%)    22 (44%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q02_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.6    
##                 0                24 (71%)    29 (62%)             
##                 1                10 (29%)    18 (38%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q02_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.8    
##                 0                28 (70%)    28 (76%)             
##                 1                12 (30%)     9 (24%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q02_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.6    
##                 0                18 (41%)    15 (50%)             
##                 1                26 (59%)    15 (50%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q03_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0                16 (50%)    31 (62%)             
##                 1                16 (50%)    19 (38%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q03_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0                30 (88%)    35 (74%)             
##                 1                 4 (12%)    12 (26%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q03_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.9    
##                 0                32 (80%)    31 (84%)             
##                 1                 8 (20%)     6 (16%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q03_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.7    
##                 0                35 (80%)    22 (73%)             
##                 1                 9 (20%)     8 (27%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q04_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0                26 (81%)    36 (72%)             
##                 1                 6 (19%)    14 (28%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q04_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                18 (53%)    24 (51%)             
##                 1                16 (47%)    23 (49%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q04_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                20 (50%)    19 (51%)             
##                 1                20 (50%)    18 (49%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q04_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0                19 (43%)    10 (33%)             
##                 1                25 (57%)    20 (67%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q05_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                17 (53%)    26 (52%)             
##                 1                15 (47%)    24 (48%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q05_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.7    
##                 0                24 (71%)    30 (64%)             
##                 1                10 (29%)    17 (36%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q05_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.9    
##                 0                32 (80%)    28 (76%)             
##                 1                 8 (20%)     9 (24%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q05_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.9    
##                 0                20 (45%)    15 (50%)             
##                 1                24 (55%)    15 (50%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q06_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0                18 (56%)    33 (66%)             
##                 1                14 (44%)    17 (34%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q06_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0                13 (38%)    23 (49%)             
##                 1                21 (62%)    24 (51%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q06_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.14    
##                 0                31 (78%)    22 (59%)             
##                 1                 9 (23%)    15 (41%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q06_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0                34 (77%)    19 (63%)             
##                 1                10 (23%)    11 (37%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q07_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                15 (47%)    24 (48%)             
##                 1                17 (53%)    26 (52%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q07_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                20 (59%)    28 (60%)             
##                 1                14 (41%)    19 (40%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q07_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0                30 (75%)    24 (65%)             
##                 1                10 (25%)    13 (35%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q07_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0                29 (66%)    15 (50%)             
##                 1                15 (34%)    15 (50%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q08_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.8    
##                 0                15 (47%)    26 (52%)             
##                 1                17 (53%)    24 (48%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q08_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.7    
##                 0                17 (50%)    27 (57%)             
##                 1                17 (50%)    20 (43%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q08_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                22 (55%)    21 (57%)             
##                 1                18 (45%)    16 (43%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q08_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.020   
##                 0                16 (36%)    20 (67%)             
##                 1                28 (64%)    10 (33%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q09_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                22 (69%)    34 (68%)             
##                 1                10 (31%)    16 (32%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q09_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0                22 (65%)    24 (51%)             
##                 1                12 (35%)    23 (49%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q09_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                11 (28%)     9 (24%)             
##                 1                29 (73%)    28 (76%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q09_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0                28 (64%)    22 (73%)             
##                 1                16 (36%)     8 (27%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q10_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             >0.9    
##                 0                24 (75%)    38 (76%)             
##                 1                 8 (25%)    12 (24%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q10_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.10    
##                 0                 7 (21%)    19 (40%)             
##                 1                27 (79%)    28 (60%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q10_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.8    
##                 0                16 (40%)    13 (35%)             
##                 1                24 (60%)    24 (65%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G08Q10_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0                11 (25%)    11 (37%)             
##                 1                33 (75%)    19 (63%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value

Next, we look at the association between each of the 40 kaizen task questions (i.e., actual_choice) with each component sequence and each block

# assess 'actual_choice' vs component sequence by question and block for kz
results = lapply(tasks_kz, function(variable1) {
  lapply(block, function(variable2) {
    choice_vs_compseq_by_question_and_block(variable1, variable2, kz2_it)
  })})
## [1] "G10Q01_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.15    
##                 1|2|3|4          1 (3.1%)     0 (0%)              
##                 1|3|2|4          2 (6.3%)    2 (4.0%)             
##                 1|4|2|3          2 (6.3%)     0 (0%)              
##                 1|4|3|2          1 (3.1%)     0 (0%)              
##                 2|1|3|4          1 (3.1%)    1 (2.0%)             
##                 2|1|4|3           0 (0%)     1 (2.0%)             
##                 2|3|1|4           0 (0%)     1 (2.0%)             
##                 2|3|4|1          2 (6.3%)    1 (2.0%)             
##                 2|4|1|3          2 (6.3%)    4 (8.0%)             
##                 2|4|3|1          2 (6.3%)     0 (0%)              
##                 3|1|2|4          3 (9.4%)    1 (2.0%)             
##                 3|1|4|2          2 (6.3%)    3 (6.0%)             
##                 3|2|1|4          3 (9.4%)    12 (24%)             
##                 3|2|4|1          2 (6.3%)     5 (10%)             
##                 3|4|1|2           0 (0%)     1 (2.0%)             
##                 3|4|2|1           4 (13%)     6 (12%)             
##                 4|1|2|3          3 (9.4%)     0 (0%)              
##                 4|2|1|3           0 (0%)     2 (4.0%)             
##                 4|2|3|1           0 (0%)     1 (2.0%)             
##                 4|3|1|2           0 (0%)     3 (6.0%)             
##                 4|3|2|1          2 (6.3%)     6 (12%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q01_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 1|2|3|4          2 (5.9%)    2 (4.3%)             
##                 1|2|4|3          1 (2.9%)     0 (0%)              
##                 1|3|2|4          1 (2.9%)    4 (8.5%)             
##                 1|4|2|3          1 (2.9%)    3 (6.4%)             
##                 2|1|3|4           0 (0%)     4 (8.5%)             
##                 2|1|4|3          2 (5.9%)    1 (2.1%)             
##                 2|3|1|4           0 (0%)     1 (2.1%)             
##                 2|4|1|3          1 (2.9%)    1 (2.1%)             
##                 2|4|3|1          2 (5.9%)    1 (2.1%)             
##                 3|1|2|4           5 (15%)    3 (6.4%)             
##                 3|1|4|2          1 (2.9%)    3 (6.4%)             
##                 3|2|1|4           4 (12%)     5 (11%)             
##                 3|2|4|1          3 (8.8%)     5 (11%)             
##                 3|4|1|2          1 (2.9%)    2 (4.3%)             
##                 3|4|2|1          3 (8.8%)    3 (6.4%)             
##                 4|1|2|3          1 (2.9%)    2 (4.3%)             
##                 4|1|3|2           0 (0%)     3 (6.4%)             
##                 4|2|1|3          3 (8.8%)    1 (2.1%)             
##                 4|3|1|2           0 (0%)     3 (6.4%)             
##                 4|3|2|1          3 (8.8%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q01_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 1|2|4|3           0 (0%)     1 (2.7%)             
##                 1|3|2|4          3 (7.5%)    1 (2.7%)             
##                 1|3|4|2           0 (0%)     1 (2.7%)             
##                 1|4|3|2          1 (2.5%)     0 (0%)              
##                 2|1|4|3           0 (0%)     1 (2.7%)             
##                 2|3|1|4          1 (2.5%)    2 (5.4%)             
##                 2|3|4|1          2 (5.0%)     0 (0%)              
##                 2|4|1|3           0 (0%)     2 (5.4%)             
##                 2|4|3|1          1 (2.5%)    1 (2.7%)             
##                 3|1|2|4          2 (5.0%)     4 (11%)             
##                 3|1|4|2           4 (10%)     6 (16%)             
##                 3|2|1|4          2 (5.0%)     4 (11%)             
##                 3|2|4|1          2 (5.0%)    2 (5.4%)             
##                 3|4|1|2          12 (30%)     5 (14%)             
##                 3|4|2|1           5 (13%)     0 (0%)              
##                 4|1|3|2           0 (0%)     3 (8.1%)             
##                 4|2|3|1          1 (2.5%)    1 (2.7%)             
##                 4|3|1|2          3 (7.5%)    1 (2.7%)             
##                 4|3|2|1          1 (2.5%)    2 (5.4%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q01_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.11    
##                 1|2|3|4          2 (4.5%)    2 (6.7%)             
##                 1|2|4|3           0 (0%)     1 (3.3%)             
##                 1|4|2|3           0 (0%)     2 (6.7%)             
##                 1|4|3|2          1 (2.3%)     0 (0%)              
##                 2|1|3|4           0 (0%)      3 (10%)             
##                 2|1|4|3          2 (4.5%)    1 (3.3%)             
##                 2|3|1|4          1 (2.3%)     0 (0%)              
##                 2|4|1|3          1 (2.3%)     0 (0%)              
##                 2|4|3|1          1 (2.3%)     0 (0%)              
##                 3|1|2|4          3 (6.8%)    1 (3.3%)             
##                 3|1|4|2           0 (0%)      3 (10%)             
##                 3|2|1|4          1 (2.3%)     4 (13%)             
##                 3|2|4|1          2 (4.5%)     0 (0%)              
##                 3|4|1|2          10 (23%)     5 (17%)             
##                 3|4|2|1           8 (18%)     7 (23%)             
##                 4|1|2|3          1 (2.3%)     0 (0%)              
##                 4|1|3|2          1 (2.3%)     0 (0%)              
##                 4|2|1|3          1 (2.3%)     0 (0%)              
##                 4|2|3|1          2 (4.5%)     0 (0%)              
##                 4|3|1|2          3 (6.8%)     0 (0%)              
##                 4|3|2|1          4 (9.1%)    1 (3.3%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q02_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 1|2|3|4          1 (3.1%)    1 (2.0%)             
##                 1|3|2|4           0 (0%)     1 (2.0%)             
##                 1|3|4|2           0 (0%)     2 (4.0%)             
##                 1|4|2|3          2 (6.3%)    2 (4.0%)             
##                 1|4|3|2          2 (6.3%)    1 (2.0%)             
##                 2|1|3|4          1 (3.1%)    2 (4.0%)             
##                 2|4|1|3           0 (0%)     2 (4.0%)             
##                 2|4|3|1          1 (3.1%)    1 (2.0%)             
##                 3|1|2|4           5 (16%)    4 (8.0%)             
##                 3|1|4|2          1 (3.1%)    1 (2.0%)             
##                 3|2|1|4          2 (6.3%)     6 (12%)             
##                 3|2|4|1          3 (9.4%)    4 (8.0%)             
##                 3|4|1|2           0 (0%)      6 (12%)             
##                 3|4|2|1           7 (22%)     5 (10%)             
##                 4|1|2|3          2 (6.3%)    3 (6.0%)             
##                 4|1|3|2          3 (9.4%)    1 (2.0%)             
##                 4|2|1|3           0 (0%)     1 (2.0%)             
##                 4|2|3|1          1 (3.1%)     0 (0%)              
##                 4|3|1|2          1 (3.1%)    3 (6.0%)             
##                 4|3|2|1           0 (0%)     4 (8.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q02_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 1|2|3|4          1 (2.9%)     0 (0%)              
##                 1|2|4|3           0 (0%)     1 (2.1%)             
##                 1|3|2|4           0 (0%)     3 (6.4%)             
##                 1|3|4|2           0 (0%)     2 (4.3%)             
##                 1|4|3|2           0 (0%)     1 (2.1%)             
##                 2|1|3|4           0 (0%)     2 (4.3%)             
##                 2|1|4|3          1 (2.9%)     0 (0%)              
##                 2|3|4|1          1 (2.9%)     0 (0%)              
##                 2|4|1|3          1 (2.9%)    2 (4.3%)             
##                 2|4|3|1          3 (8.8%)     0 (0%)              
##                 3|1|2|4           4 (12%)     7 (15%)             
##                 3|1|4|2          3 (8.8%)     8 (17%)             
##                 3|2|1|4           9 (26%)     7 (15%)             
##                 3|2|4|1          3 (8.8%)    2 (4.3%)             
##                 3|4|1|2          2 (5.9%)     5 (11%)             
##                 3|4|2|1           4 (12%)     5 (11%)             
##                 4|1|2|3          1 (2.9%)     0 (0%)              
##                 4|3|1|2           0 (0%)     2 (4.3%)             
##                 4|3|2|1          1 (2.9%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q02_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 1|2|4|3           0 (0%)     1 (2.7%)             
##                 1|3|2|4          3 (7.5%)    1 (2.7%)             
##                 1|3|4|2           0 (0%)     1 (2.7%)             
##                 2|1|3|4          1 (2.5%)    1 (2.7%)             
##                 2|1|4|3           0 (0%)     1 (2.7%)             
##                 2|3|1|4          1 (2.5%)     0 (0%)              
##                 2|3|4|1           4 (10%)    2 (5.4%)             
##                 2|4|1|3           0 (0%)     1 (2.7%)             
##                 2|4|3|1          1 (2.5%)    1 (2.7%)             
##                 3|1|2|4          2 (5.0%)     6 (16%)             
##                 3|1|4|2           0 (0%)     2 (5.4%)             
##                 3|2|1|4           7 (18%)     5 (14%)             
##                 3|2|4|1           9 (23%)    3 (8.1%)             
##                 3|4|1|2          1 (2.5%)    2 (5.4%)             
##                 3|4|2|1           6 (15%)    3 (8.1%)             
##                 4|1|2|3          1 (2.5%)     0 (0%)              
##                 4|2|1|3          1 (2.5%)    2 (5.4%)             
##                 4|2|3|1           0 (0%)     2 (5.4%)             
##                 4|3|1|2          1 (2.5%)    3 (8.1%)             
##                 4|3|2|1          2 (5.0%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q02_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 1|2|4|3           0 (0%)     1 (3.3%)             
##                 1|3|2|4          2 (4.5%)     0 (0%)              
##                 1|3|4|2          2 (4.5%)     3 (10%)             
##                 1|4|2|3          2 (4.5%)    1 (3.3%)             
##                 1|4|3|2          2 (4.5%)    1 (3.3%)             
##                 2|1|4|3           0 (0%)     2 (6.7%)             
##                 2|3|1|4          2 (4.5%)     0 (0%)              
##                 3|1|2|4           7 (16%)     3 (10%)             
##                 3|1|4|2          4 (9.1%)     3 (10%)             
##                 3|2|1|4          2 (4.5%)     5 (17%)             
##                 3|2|4|1          1 (2.3%)    2 (6.7%)             
##                 3|4|1|2           6 (14%)     3 (10%)             
##                 3|4|2|1          3 (6.8%)     0 (0%)              
##                 4|1|2|3          2 (4.5%)    2 (6.7%)             
##                 4|1|3|2          3 (6.8%)    1 (3.3%)             
##                 4|2|1|3           0 (0%)     1 (3.3%)             
##                 4|2|3|1          1 (2.3%)     0 (0%)              
##                 4|3|1|2          4 (9.1%)    1 (3.3%)             
##                 4|3|2|1          1 (2.3%)    1 (3.3%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q03_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.6    
##                 0|2|3|4          1 (3.1%)     0 (0%)              
##                 0|2|4|3          2 (6.3%)     0 (0%)              
##                 0|3|2|4          1 (3.1%)    1 (2.0%)             
##                 0|3|4|2          1 (3.1%)    2 (4.0%)             
##                 0|4|2|3          1 (3.1%)    2 (4.0%)             
##                 2|0|3|4          2 (6.3%)    1 (2.0%)             
##                 2|0|4|3          2 (6.3%)    1 (2.0%)             
##                 2|3|0|4           0 (0%)     1 (2.0%)             
##                 2|4|0|3          1 (3.1%)    1 (2.0%)             
##                 3|0|2|4          3 (9.4%)     9 (18%)             
##                 3|0|4|2          3 (9.4%)     5 (10%)             
##                 3|2|0|4           4 (13%)    4 (8.0%)             
##                 3|2|4|0           0 (0%)     3 (6.0%)             
##                 3|4|0|2           6 (19%)    4 (8.0%)             
##                 3|4|2|0          2 (6.3%)     7 (14%)             
##                 4|0|2|3           0 (0%)     1 (2.0%)             
##                 4|0|3|2           0 (0%)     1 (2.0%)             
##                 4|2|0|3           0 (0%)     1 (2.0%)             
##                 4|3|0|2          1 (3.1%)    4 (8.0%)             
##                 4|3|2|0          2 (6.3%)    2 (4.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q03_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0|2|3|4           0 (0%)     1 (2.1%)             
##                 0|3|2|4           0 (0%)     2 (4.3%)             
##                 0|3|4|2           0 (0%)     1 (2.1%)             
##                 0|4|3|2           0 (0%)     1 (2.1%)             
##                 2|0|3|4           0 (0%)      6 (13%)             
##                 2|0|4|3          1 (2.9%)    1 (2.1%)             
##                 2|3|0|4          1 (2.9%)    2 (4.3%)             
##                 2|3|4|0          1 (2.9%)     0 (0%)              
##                 2|4|0|3          1 (2.9%)     0 (0%)              
##                 2|4|3|0           0 (0%)     1 (2.1%)             
##                 3|0|2|4          3 (8.8%)     7 (15%)             
##                 3|0|4|2           4 (12%)    4 (8.5%)             
##                 3|2|0|4          10 (29%)     7 (15%)             
##                 3|2|4|0          3 (8.8%)     5 (11%)             
##                 3|4|0|2          3 (8.8%)    2 (4.3%)             
##                 3|4|2|0           4 (12%)    4 (8.5%)             
##                 4|0|2|3          1 (2.9%)     0 (0%)              
##                 4|0|3|2           0 (0%)     1 (2.1%)             
##                 4|2|3|0          1 (2.9%)     0 (0%)              
##                 4|3|0|2          1 (2.9%)    2 (4.3%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q03_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0|3|2|4          1 (2.5%)    1 (2.7%)             
##                 0|3|4|2           0 (0%)     2 (5.4%)             
##                 0|4|2|3           0 (0%)     1 (2.7%)             
##                 2|0|3|4           0 (0%)     1 (2.7%)             
##                 2|3|0|4          1 (2.5%)    1 (2.7%)             
##                 2|3|4|0           0 (0%)     2 (5.4%)             
##                 2|4|3|0          1 (2.5%)    2 (5.4%)             
##                 3|0|2|4          10 (25%)     7 (19%)             
##                 3|0|4|2           7 (18%)     4 (11%)             
##                 3|2|0|4           4 (10%)     6 (16%)             
##                 3|2|4|0          2 (5.0%)    1 (2.7%)             
##                 3|4|0|2          10 (25%)     4 (11%)             
##                 3|4|2|0          3 (7.5%)    3 (8.1%)             
##                 4|0|2|3           0 (0%)     1 (2.7%)             
##                 4|0|3|2          1 (2.5%)     0 (0%)              
##                 4|3|0|2           0 (0%)     1 (2.7%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q03_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.6    
##                 0|2|3|4          1 (2.3%)    1 (3.3%)             
##                 0|3|2|4           0 (0%)     1 (3.3%)             
##                 2|0|3|4           0 (0%)     1 (3.3%)             
##                 2|0|4|3           0 (0%)     1 (3.3%)             
##                 2|3|4|0          1 (2.3%)    1 (3.3%)             
##                 2|4|3|0          1 (2.3%)     0 (0%)              
##                 3|0|2|4          13 (30%)     8 (27%)             
##                 3|0|4|2          3 (6.8%)     4 (13%)             
##                 3|2|0|4           5 (11%)     4 (13%)             
##                 3|2|4|0          1 (2.3%)    2 (6.7%)             
##                 3|4|0|2           8 (18%)    2 (6.7%)             
##                 3|4|2|0          4 (9.1%)     4 (13%)             
##                 4|0|2|3          1 (2.3%)     0 (0%)              
##                 4|0|3|2           0 (0%)     1 (3.3%)             
##                 4|2|0|3          1 (2.3%)     0 (0%)              
##                 4|2|3|0          2 (4.5%)     0 (0%)              
##                 4|3|0|2          1 (2.3%)     0 (0%)              
##                 4|3|2|0          2 (4.5%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q04_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0|2|3|4           0 (0%)     1 (2.0%)             
##                 0|2|4|3          2 (6.3%)     0 (0%)              
##                 0|3|2|4          2 (6.3%)    1 (2.0%)             
##                 0|3|4|2           0 (0%)     3 (6.0%)             
##                 0|4|2|3          1 (3.1%)     0 (0%)              
##                 2|0|3|4          2 (6.3%)    2 (4.0%)             
##                 2|3|0|4           0 (0%)     3 (6.0%)             
##                 3|0|2|4           7 (22%)    12 (24%)             
##                 3|0|4|2           8 (25%)     6 (12%)             
##                 3|2|0|4          1 (3.1%)    1 (2.0%)             
##                 3|2|4|0          1 (3.1%)    2 (4.0%)             
##                 3|4|0|2          3 (9.4%)     8 (16%)             
##                 3|4|2|0           4 (13%)     6 (12%)             
##                 4|0|2|3           0 (0%)     1 (2.0%)             
##                 4|0|3|2           0 (0%)     1 (2.0%)             
##                 4|2|0|3          1 (3.1%)     0 (0%)              
##                 4|2|3|0           0 (0%)     1 (2.0%)             
##                 4|3|0|2           0 (0%)     1 (2.0%)             
##                 4|3|2|0           0 (0%)     1 (2.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q04_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0|2|3|4          1 (2.9%)    1 (2.1%)             
##                 0|2|4|3           0 (0%)     2 (4.3%)             
##                 0|3|2|4           0 (0%)     3 (6.4%)             
##                 0|3|4|2          2 (5.9%)    1 (2.1%)             
##                 0|4|2|3           0 (0%)     2 (4.3%)             
##                 0|4|3|2          1 (2.9%)    1 (2.1%)             
##                 2|0|3|4          1 (2.9%)    2 (4.3%)             
##                 2|0|4|3          2 (5.9%)     5 (11%)             
##                 2|3|0|4          1 (2.9%)    2 (4.3%)             
##                 2|3|4|0           0 (0%)     1 (2.1%)             
##                 2|4|3|0           0 (0%)     1 (2.1%)             
##                 3|0|2|4          3 (8.8%)    2 (4.3%)             
##                 3|0|4|2           6 (18%)     7 (15%)             
##                 3|2|0|4          3 (8.8%)     0 (0%)              
##                 3|2|4|0           0 (0%)     3 (6.4%)             
##                 3|4|0|2           7 (21%)     9 (19%)             
##                 3|4|2|0          2 (5.9%)    3 (6.4%)             
##                 4|0|2|3          1 (2.9%)    1 (2.1%)             
##                 4|0|3|2          1 (2.9%)     0 (0%)              
##                 4|2|0|3          1 (2.9%)     0 (0%)              
##                 4|3|0|2          2 (5.9%)     0 (0%)              
##                 4|3|2|0           0 (0%)     1 (2.1%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q04_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0|2|3|4           0 (0%)     2 (5.4%)             
##                 0|2|4|3           0 (0%)     2 (5.4%)             
##                 0|3|2|4          3 (7.5%)    2 (5.4%)             
##                 0|3|4|2          2 (5.0%)     0 (0%)              
##                 0|4|2|3          1 (2.5%)    1 (2.7%)             
##                 0|4|3|2          1 (2.5%)    1 (2.7%)             
##                 2|0|3|4          1 (2.5%)     0 (0%)              
##                 2|0|4|3           0 (0%)     1 (2.7%)             
##                 2|3|0|4          2 (5.0%)     0 (0%)              
##                 2|3|4|0           0 (0%)     2 (5.4%)             
##                 2|4|3|0           0 (0%)     1 (2.7%)             
##                 3|0|2|4          3 (7.5%)    3 (8.1%)             
##                 3|0|4|2          3 (7.5%)     0 (0%)              
##                 3|2|0|4          2 (5.0%)     4 (11%)             
##                 3|2|4|0          3 (7.5%)    3 (8.1%)             
##                 3|4|0|2          3 (7.5%)     4 (11%)             
##                 3|4|2|0          2 (5.0%)    3 (8.1%)             
##                 4|0|2|3           0 (0%)     3 (8.1%)             
##                 4|0|3|2           4 (10%)    1 (2.7%)             
##                 4|2|3|0          1 (2.5%)    2 (5.4%)             
##                 4|3|0|2           5 (13%)    2 (5.4%)             
##                 4|3|2|0           4 (10%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q04_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.10    
##                 0|2|3|4          1 (2.3%)     0 (0%)              
##                 0|3|2|4           0 (0%)     2 (6.7%)             
##                 0|3|4|2          2 (4.5%)     0 (0%)              
##                 2|0|3|4          1 (2.3%)    1 (3.3%)             
##                 2|0|4|3           0 (0%)     2 (6.7%)             
##                 2|3|4|0          1 (2.3%)     0 (0%)              
##                 2|4|0|3          1 (2.3%)     4 (13%)             
##                 2|4|3|0          2 (4.5%)    2 (6.7%)             
##                 3|0|2|4          4 (9.1%)    2 (6.7%)             
##                 3|0|4|2           7 (16%)     4 (13%)             
##                 3|2|0|4          2 (4.5%)    2 (6.7%)             
##                 3|2|4|0          1 (2.3%)    1 (3.3%)             
##                 3|4|0|2          2 (4.5%)    1 (3.3%)             
##                 3|4|2|0           5 (11%)     4 (13%)             
##                 4|0|3|2          2 (4.5%)     0 (0%)              
##                 4|2|0|3           0 (0%)      3 (10%)             
##                 4|2|3|0           7 (16%)     0 (0%)              
##                 4|3|0|2          2 (4.5%)    2 (6.7%)             
##                 4|3|2|0          4 (9.1%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q05_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.066   
##                 0|1|3|4          3 (9.4%)    2 (4.0%)             
##                 0|1|4|3           0 (0%)      5 (10%)             
##                 0|3|1|4           0 (0%)     1 (2.0%)             
##                 0|3|4|1           0 (0%)     1 (2.0%)             
##                 0|4|1|3           0 (0%)     1 (2.0%)             
##                 0|4|3|1          1 (3.1%)     0 (0%)              
##                 1|0|3|4          2 (6.3%)     0 (0%)              
##                 1|0|4|3          2 (6.3%)     0 (0%)              
##                 1|3|0|4           0 (0%)     1 (2.0%)             
##                 1|4|0|3          1 (3.1%)     0 (0%)              
##                 1|4|3|0           0 (0%)     1 (2.0%)             
##                 3|0|1|4           4 (13%)    4 (8.0%)             
##                 3|0|4|1          2 (6.3%)     0 (0%)              
##                 3|1|0|4           4 (13%)     0 (0%)              
##                 3|1|4|0          1 (3.1%)    2 (4.0%)             
##                 3|4|0|1          3 (9.4%)    10 (20%)             
##                 3|4|1|0          3 (9.4%)    4 (8.0%)             
##                 4|0|1|3           0 (0%)     1 (2.0%)             
##                 4|0|3|1          1 (3.1%)    4 (8.0%)             
##                 4|1|0|3          1 (3.1%)    2 (4.0%)             
##                 4|3|0|1           4 (13%)     8 (16%)             
##                 4|3|1|0           0 (0%)     3 (6.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q05_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.12    
##                 0|1|3|4          2 (5.9%)    1 (2.1%)             
##                 0|1|4|3          2 (5.9%)     0 (0%)              
##                 0|3|1|4           0 (0%)      7 (15%)             
##                 0|3|4|1           0 (0%)     1 (2.1%)             
##                 1|0|3|4           0 (0%)     3 (6.4%)             
##                 1|0|4|3          1 (2.9%)     0 (0%)              
##                 1|3|0|4           0 (0%)     2 (4.3%)             
##                 1|4|0|3          1 (2.9%)     0 (0%)              
##                 3|0|1|4           9 (26%)    10 (21%)             
##                 3|0|4|1           4 (12%)     8 (17%)             
##                 3|1|0|4          1 (2.9%)    1 (2.1%)             
##                 3|1|4|0          1 (2.9%)    1 (2.1%)             
##                 3|4|0|1           9 (26%)     6 (13%)             
##                 3|4|1|0          2 (5.9%)     6 (13%)             
##                 4|0|3|1           0 (0%)     1 (2.1%)             
##                 4|1|3|0          1 (2.9%)     0 (0%)              
##                 4|3|0|1          1 (2.9%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q05_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0|1|3|4           0 (0%)     1 (2.7%)             
##                 0|1|4|3          1 (2.5%)    1 (2.7%)             
##                 0|3|1|4           0 (0%)     1 (2.7%)             
##                 0|3|4|1          1 (2.5%)     0 (0%)              
##                 0|4|1|3          1 (2.5%)    3 (8.1%)             
##                 0|4|3|1          2 (5.0%)    1 (2.7%)             
##                 1|0|3|4          1 (2.5%)     0 (0%)              
##                 1|3|0|4           0 (0%)     1 (2.7%)             
##                 3|0|1|4           5 (13%)     6 (16%)             
##                 3|0|4|1          10 (25%)    2 (5.4%)             
##                 3|1|0|4           8 (20%)     9 (24%)             
##                 3|1|4|0          1 (2.5%)    2 (5.4%)             
##                 3|4|0|1           6 (15%)    1 (2.7%)             
##                 3|4|1|0          2 (5.0%)     4 (11%)             
##                 4|0|1|3          1 (2.5%)     0 (0%)              
##                 4|0|3|1           0 (0%)      4 (11%)             
##                 4|3|0|1          1 (2.5%)    1 (2.7%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q05_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0|1|4|3           0 (0%)     1 (3.3%)             
##                 0|3|1|4           0 (0%)     2 (6.7%)             
##                 0|3|4|1          1 (2.3%)    1 (3.3%)             
##                 0|4|3|1          3 (6.8%)    1 (3.3%)             
##                 1|0|4|3           0 (0%)     1 (3.3%)             
##                 1|3|0|4          2 (4.5%)     0 (0%)              
##                 1|4|0|3          3 (6.8%)    2 (6.7%)             
##                 1|4|3|0           0 (0%)     1 (3.3%)             
##                 3|0|1|4          3 (6.8%)     4 (13%)             
##                 3|0|4|1          1 (2.3%)    1 (3.3%)             
##                 3|1|0|4          4 (9.1%)     0 (0%)              
##                 3|1|4|0          3 (6.8%)    1 (3.3%)             
##                 3|4|0|1          3 (6.8%)     5 (17%)             
##                 3|4|1|0          4 (9.1%)     4 (13%)             
##                 4|0|3|1           0 (0%)     1 (3.3%)             
##                 4|1|0|3          1 (2.3%)    2 (6.7%)             
##                 4|1|3|0           7 (16%)    2 (6.7%)             
##                 4|3|0|1           5 (11%)    1 (3.3%)             
##                 4|3|1|0          4 (9.1%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q06_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0|1|3|4           0 (0%)     2 (4.0%)             
##                 0|3|1|4          2 (6.3%)    1 (2.0%)             
##                 0|3|4|1           0 (0%)     1 (2.0%)             
##                 0|4|1|3           5 (16%)     0 (0%)              
##                 0|4|3|1           0 (0%)     2 (4.0%)             
##                 1|0|3|4          1 (3.1%)     0 (0%)              
##                 1|3|4|0          1 (3.1%)     0 (0%)              
##                 1|4|0|3           0 (0%)     1 (2.0%)             
##                 3|0|1|4           4 (13%)    4 (8.0%)             
##                 3|0|4|1           5 (16%)     7 (14%)             
##                 3|1|0|4          3 (9.4%)    2 (4.0%)             
##                 3|1|4|0           4 (13%)     6 (12%)             
##                 3|4|0|1           4 (13%)     9 (18%)             
##                 3|4|1|0          2 (6.3%)     5 (10%)             
##                 4|0|1|3           0 (0%)     1 (2.0%)             
##                 4|0|3|1           0 (0%)     2 (4.0%)             
##                 4|1|3|0           0 (0%)     1 (2.0%)             
##                 4|3|0|1          1 (3.1%)    1 (2.0%)             
##                 4|3|1|0           0 (0%)      5 (10%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q06_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0|1|3|4           0 (0%)     1 (2.1%)             
##                 0|1|4|3          2 (5.9%)     0 (0%)              
##                 0|3|1|4          1 (2.9%)    2 (4.3%)             
##                 0|3|4|1          1 (2.9%)    4 (8.5%)             
##                 0|4|1|3          1 (2.9%)    1 (2.1%)             
##                 0|4|3|1           0 (0%)     1 (2.1%)             
##                 1|0|3|4           0 (0%)     4 (8.5%)             
##                 1|0|4|3           0 (0%)     1 (2.1%)             
##                 1|3|0|4           0 (0%)     2 (4.3%)             
##                 1|3|4|0          2 (5.9%)    1 (2.1%)             
##                 1|4|3|0          1 (2.9%)     0 (0%)              
##                 3|0|1|4           4 (12%)    2 (4.3%)             
##                 3|0|4|1           4 (12%)    4 (8.5%)             
##                 3|1|0|4          3 (8.8%)    2 (4.3%)             
##                 3|4|0|1           4 (12%)     5 (11%)             
##                 3|4|1|0          3 (8.8%)    3 (6.4%)             
##                 4|0|1|3           4 (12%)    1 (2.1%)             
##                 4|0|3|1          2 (5.9%)    4 (8.5%)             
##                 4|1|0|3           0 (0%)     1 (2.1%)             
##                 4|3|0|1          2 (5.9%)    4 (8.5%)             
##                 4|3|1|0           0 (0%)     4 (8.5%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q06_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0|1|3|4           0 (0%)     1 (2.7%)             
##                 0|1|4|3          1 (2.5%)     0 (0%)              
##                 0|3|1|4          2 (5.0%)     0 (0%)              
##                 0|4|1|3           0 (0%)     1 (2.7%)             
##                 0|4|3|1          1 (2.5%)     0 (0%)              
##                 1|0|3|4          2 (5.0%)    2 (5.4%)             
##                 1|3|0|4           0 (0%)     2 (5.4%)             
##                 1|4|0|3           0 (0%)     1 (2.7%)             
##                 3|0|1|4           4 (10%)     7 (19%)             
##                 3|0|4|1           5 (13%)    1 (2.7%)             
##                 3|1|0|4           4 (10%)     4 (11%)             
##                 3|1|4|0          1 (2.5%)    2 (5.4%)             
##                 3|4|0|1           5 (13%)     4 (11%)             
##                 3|4|1|0          12 (30%)     6 (16%)             
##                 4|1|0|3          1 (2.5%)    1 (2.7%)             
##                 4|3|0|1          1 (2.5%)    2 (5.4%)             
##                 4|3|1|0          1 (2.5%)    3 (8.1%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q06_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0|1|3|4          2 (4.5%)    1 (3.3%)             
##                 0|1|4|3          2 (4.5%)    1 (3.3%)             
##                 0|3|1|4          1 (2.3%)    2 (6.7%)             
##                 0|4|1|3          2 (4.5%)     0 (0%)              
##                 0|4|3|1          1 (2.3%)     0 (0%)              
##                 1|0|3|4           0 (0%)     1 (3.3%)             
##                 1|0|4|3          1 (2.3%)    1 (3.3%)             
##                 1|3|0|4          1 (2.3%)     0 (0%)              
##                 1|3|4|0          3 (6.8%)     0 (0%)              
##                 1|4|0|3          2 (4.5%)     0 (0%)              
##                 3|0|1|4          14 (32%)    10 (33%)             
##                 3|0|4|1           6 (14%)    2 (6.7%)             
##                 3|1|0|4           0 (0%)      3 (10%)             
##                 3|1|4|0           0 (0%)     2 (6.7%)             
##                 3|4|0|1          2 (4.5%)     3 (10%)             
##                 3|4|1|0          4 (9.1%)    2 (6.7%)             
##                 4|0|1|3           0 (0%)     1 (3.3%)             
##                 4|0|3|1           0 (0%)     1 (3.3%)             
##                 4|1|0|3          1 (2.3%)     0 (0%)              
##                 4|3|0|1          1 (2.3%)     0 (0%)              
##                 4|3|1|0          1 (2.3%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q07_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0|1|2|4          2 (6.3%)    2 (4.0%)             
##                 0|1|4|2          3 (9.4%)    1 (2.0%)             
##                 0|2|1|4           4 (13%)    4 (8.0%)             
##                 0|2|4|1           0 (0%)     4 (8.0%)             
##                 0|4|1|2          2 (6.3%)    2 (4.0%)             
##                 0|4|2|1           0 (0%)     1 (2.0%)             
##                 1|0|2|4          2 (6.3%)     0 (0%)              
##                 1|2|0|4          3 (9.4%)    3 (6.0%)             
##                 1|2|4|0          1 (3.1%)    4 (8.0%)             
##                 1|4|0|2          1 (3.1%)    2 (4.0%)             
##                 2|0|1|4          3 (9.4%)    1 (2.0%)             
##                 2|0|4|1          2 (6.3%)    2 (4.0%)             
##                 2|1|0|4          2 (6.3%)    11 (22%)             
##                 2|1|4|0          1 (3.1%)    1 (2.0%)             
##                 2|4|0|1          1 (3.1%)    1 (2.0%)             
##                 2|4|1|0           0 (0%)     1 (2.0%)             
##                 4|0|1|2           0 (0%)     1 (2.0%)             
##                 4|0|2|1          1 (3.1%)    3 (6.0%)             
##                 4|1|2|0          1 (3.1%)    1 (2.0%)             
##                 4|2|0|1           0 (0%)     3 (6.0%)             
##                 4|2|1|0          3 (9.4%)    2 (4.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q07_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0|1|2|4           5 (15%)     6 (13%)             
##                 0|1|4|2           5 (15%)    4 (8.5%)             
##                 0|2|1|4          3 (8.8%)    3 (6.4%)             
##                 0|2|4|1          3 (8.8%)    3 (6.4%)             
##                 0|4|1|2          1 (2.9%)    3 (6.4%)             
##                 0|4|2|1           0 (0%)     2 (4.3%)             
##                 1|0|2|4           0 (0%)     3 (6.4%)             
##                 1|0|4|2          1 (2.9%)    4 (8.5%)             
##                 1|2|0|4          1 (2.9%)    1 (2.1%)             
##                 1|2|4|0           0 (0%)     1 (2.1%)             
##                 1|4|0|2          1 (2.9%)     0 (0%)              
##                 1|4|2|0           0 (0%)     1 (2.1%)             
##                 2|0|1|4          3 (8.8%)     0 (0%)              
##                 2|0|4|1          1 (2.9%)    4 (8.5%)             
##                 2|1|0|4           0 (0%)     3 (6.4%)             
##                 2|1|4|0           0 (0%)     2 (4.3%)             
##                 2|4|1|0          1 (2.9%)     0 (0%)              
##                 4|0|1|2          2 (5.9%)    2 (4.3%)             
##                 4|0|2|1           4 (12%)    1 (2.1%)             
##                 4|1|2|0           0 (0%)     1 (2.1%)             
##                 4|2|0|1          1 (2.9%)    2 (4.3%)             
##                 4|2|1|0          2 (5.9%)    1 (2.1%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q07_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0|1|2|4          2 (5.0%)     0 (0%)              
##                 0|1|4|2          3 (7.5%)    1 (2.7%)             
##                 0|2|1|4          3 (7.5%)     4 (11%)             
##                 0|2|4|1          1 (2.5%)    2 (5.4%)             
##                 0|4|1|2          1 (2.5%)    1 (2.7%)             
##                 0|4|2|1          3 (7.5%)     0 (0%)              
##                 1|0|2|4          1 (2.5%)    2 (5.4%)             
##                 1|0|4|2          1 (2.5%)     0 (0%)              
##                 1|2|0|4           0 (0%)     2 (5.4%)             
##                 1|2|4|0          1 (2.5%)     0 (0%)              
##                 1|4|2|0           0 (0%)     1 (2.7%)             
##                 2|0|1|4          1 (2.5%)    3 (8.1%)             
##                 2|0|4|1          1 (2.5%)     0 (0%)              
##                 2|1|0|4          2 (5.0%)    2 (5.4%)             
##                 2|1|4|0           0 (0%)     3 (8.1%)             
##                 2|4|0|1           0 (0%)     1 (2.7%)             
##                 4|0|1|2           5 (13%)    2 (5.4%)             
##                 4|0|2|1          2 (5.0%)     4 (11%)             
##                 4|1|0|2          2 (5.0%)    3 (8.1%)             
##                 4|1|2|0          2 (5.0%)     0 (0%)              
##                 4|2|0|1           5 (13%)    1 (2.7%)             
##                 4|2|1|0           4 (10%)     5 (14%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q07_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.5    
##                 0|1|2|4           0 (0%)     2 (6.7%)             
##                 0|1|4|2           0 (0%)     2 (6.7%)             
##                 0|2|1|4          4 (9.1%)     3 (10%)             
##                 0|4|2|1           5 (11%)    1 (3.3%)             
##                 1|2|0|4          1 (2.3%)    1 (3.3%)             
##                 1|2|4|0          2 (4.5%)     0 (0%)              
##                 1|4|0|2          2 (4.5%)     0 (0%)              
##                 2|0|1|4           6 (14%)     6 (20%)             
##                 2|0|4|1          3 (6.8%)     0 (0%)              
##                 2|1|0|4          3 (6.8%)    2 (6.7%)             
##                 2|1|4|0          3 (6.8%)    2 (6.7%)             
##                 2|4|0|1          1 (2.3%)    1 (3.3%)             
##                 2|4|1|0          2 (4.5%)     0 (0%)              
##                 4|0|1|2          3 (6.8%)    2 (6.7%)             
##                 4|0|2|1          1 (2.3%)    1 (3.3%)             
##                 4|1|0|2          2 (4.5%)    1 (3.3%)             
##                 4|1|2|0           0 (0%)     2 (6.7%)             
##                 4|2|0|1          3 (6.8%)    1 (3.3%)             
##                 4|2|1|0          3 (6.8%)     3 (10%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q08_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.7    
##                 0|1|2|4          3 (9.4%)    2 (4.0%)             
##                 0|1|4|2          1 (3.1%)    2 (4.0%)             
##                 0|2|1|4          2 (6.3%)     5 (10%)             
##                 0|2|4|1          1 (3.1%)     0 (0%)              
##                 0|4|1|2          2 (6.3%)    3 (6.0%)             
##                 0|4|2|1          1 (3.1%)    3 (6.0%)             
##                 1|0|2|4          2 (6.3%)    1 (2.0%)             
##                 1|0|4|2          2 (6.3%)    1 (2.0%)             
##                 1|2|0|4          3 (9.4%)    4 (8.0%)             
##                 1|2|4|0          3 (9.4%)    3 (6.0%)             
##                 1|4|2|0          1 (3.1%)     0 (0%)              
##                 2|0|1|4           0 (0%)     1 (2.0%)             
##                 2|0|4|1          1 (3.1%)     0 (0%)              
##                 2|1|0|4          1 (3.1%)    1 (2.0%)             
##                 2|1|4|0          2 (6.3%)    3 (6.0%)             
##                 4|0|1|2           0 (0%)      5 (10%)             
##                 4|0|2|1          2 (6.3%)     6 (12%)             
##                 4|1|0|2          1 (3.1%)    3 (6.0%)             
##                 4|1|2|0          1 (3.1%)    4 (8.0%)             
##                 4|2|0|1          3 (9.4%)    2 (4.0%)             
##                 4|2|1|0           0 (0%)     1 (2.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q08_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0|1|2|4          1 (2.9%)    4 (8.5%)             
##                 0|1|4|2           5 (15%)     5 (11%)             
##                 0|2|1|4          2 (5.9%)     5 (11%)             
##                 0|2|4|1          1 (2.9%)    3 (6.4%)             
##                 0|4|2|1          1 (2.9%)    3 (6.4%)             
##                 1|0|4|2          2 (5.9%)    2 (4.3%)             
##                 1|2|0|4          2 (5.9%)    1 (2.1%)             
##                 1|2|4|0           0 (0%)     2 (4.3%)             
##                 1|4|0|2          1 (2.9%)     0 (0%)              
##                 1|4|2|0          2 (5.9%)    2 (4.3%)             
##                 2|0|1|4          2 (5.9%)    1 (2.1%)             
##                 2|1|0|4           0 (0%)     2 (4.3%)             
##                 2|1|4|0          2 (5.9%)    1 (2.1%)             
##                 2|4|0|1          2 (5.9%)    2 (4.3%)             
##                 2|4|1|0           0 (0%)     2 (4.3%)             
##                 4|0|1|2          1 (2.9%)    1 (2.1%)             
##                 4|0|2|1           4 (12%)    1 (2.1%)             
##                 4|1|0|2           0 (0%)     2 (4.3%)             
##                 4|1|2|0           0 (0%)      5 (11%)             
##                 4|2|0|1          3 (8.8%)    1 (2.1%)             
##                 4|2|1|0          3 (8.8%)    2 (4.3%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q08_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0|1|2|4          1 (2.5%)    1 (2.7%)             
##                 0|1|4|2          2 (5.0%)    1 (2.7%)             
##                 0|2|1|4          2 (5.0%)    2 (5.4%)             
##                 0|2|4|1           4 (10%)    2 (5.4%)             
##                 0|4|1|2          1 (2.5%)    2 (5.4%)             
##                 0|4|2|1           4 (10%)    1 (2.7%)             
##                 1|0|2|4           0 (0%)     2 (5.4%)             
##                 1|0|4|2          1 (2.5%)    2 (5.4%)             
##                 1|2|0|4          2 (5.0%)     0 (0%)              
##                 1|2|4|0           0 (0%)     1 (2.7%)             
##                 2|0|1|4          2 (5.0%)    2 (5.4%)             
##                 2|0|4|1          1 (2.5%)    1 (2.7%)             
##                 2|1|0|4           0 (0%)     2 (5.4%)             
##                 2|1|4|0           0 (0%)     3 (8.1%)             
##                 4|0|1|2          2 (5.0%)    2 (5.4%)             
##                 4|0|2|1           8 (20%)    1 (2.7%)             
##                 4|1|0|2          1 (2.5%)    2 (5.4%)             
##                 4|1|2|0          1 (2.5%)    2 (5.4%)             
##                 4|2|0|1           6 (15%)     4 (11%)             
##                 4|2|1|0          2 (5.0%)     4 (11%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q08_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.11    
##                 0|1|2|4          1 (2.3%)     5 (17%)             
##                 0|2|1|4           5 (11%)     4 (13%)             
##                 0|2|4|1           0 (0%)     1 (3.3%)             
##                 0|4|2|1          3 (6.8%)    1 (3.3%)             
##                 1|0|2|4          4 (9.1%)    1 (3.3%)             
##                 1|0|4|2           0 (0%)     1 (3.3%)             
##                 1|2|0|4          2 (4.5%)     0 (0%)              
##                 1|2|4|0          1 (2.3%)    1 (3.3%)             
##                 1|4|2|0          1 (2.3%)     0 (0%)              
##                 2|0|1|4           8 (18%)    1 (3.3%)             
##                 2|0|4|1          3 (6.8%)     0 (0%)              
##                 2|1|0|4          2 (4.5%)     6 (20%)             
##                 2|1|4|0           0 (0%)     1 (3.3%)             
##                 2|4|0|1          1 (2.3%)    2 (6.7%)             
##                 2|4|1|0          1 (2.3%)     0 (0%)              
##                 4|0|1|2          1 (2.3%)     0 (0%)              
##                 4|0|2|1          2 (4.5%)    2 (6.7%)             
##                 4|1|0|2          2 (4.5%)     0 (0%)              
##                 4|1|2|0          2 (4.5%)     3 (10%)             
##                 4|2|0|1          3 (6.8%)    1 (3.3%)             
##                 4|2|1|0          2 (4.5%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q09_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.7    
##                 0|1|2|3          1 (3.1%)     0 (0%)              
##                 0|2|1|3           4 (13%)     5 (10%)             
##                 0|2|3|1          2 (6.3%)    3 (6.0%)             
##                 0|3|1|2           0 (0%)     1 (2.0%)             
##                 1|0|2|3          1 (3.1%)     0 (0%)              
##                 1|0|3|2           0 (0%)     2 (4.0%)             
##                 1|2|0|3          2 (6.3%)     0 (0%)              
##                 1|3|0|2           0 (0%)     2 (4.0%)             
##                 2|0|1|3          2 (6.3%)    2 (4.0%)             
##                 2|0|3|1          1 (3.1%)    2 (4.0%)             
##                 2|1|0|3          1 (3.1%)    3 (6.0%)             
##                 2|1|3|0           0 (0%)     1 (2.0%)             
##                 3|0|1|2          3 (9.4%)     6 (12%)             
##                 3|0|2|1           5 (16%)    13 (26%)             
##                 3|1|0|2          1 (3.1%)    1 (2.0%)             
##                 3|1|2|0           4 (13%)    2 (4.0%)             
##                 3|2|0|1           4 (13%)     5 (10%)             
##                 3|2|1|0          1 (3.1%)    2 (4.0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q09_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0|1|2|3           0 (0%)     1 (2.1%)             
##                 0|1|3|2           0 (0%)     1 (2.1%)             
##                 0|2|3|1          1 (2.9%)     0 (0%)              
##                 0|3|1|2          1 (2.9%)     0 (0%)              
##                 0|3|2|1           0 (0%)     1 (2.1%)             
##                 1|0|2|3          1 (2.9%)     0 (0%)              
##                 1|0|3|2           0 (0%)     4 (8.5%)             
##                 1|2|0|3           0 (0%)     1 (2.1%)             
##                 1|2|3|0          2 (5.9%)    2 (4.3%)             
##                 2|0|1|3          1 (2.9%)    1 (2.1%)             
##                 2|1|0|3           0 (0%)     3 (6.4%)             
##                 2|1|3|0           4 (12%)     9 (19%)             
##                 2|3|0|1          1 (2.9%)    2 (4.3%)             
##                 2|3|1|0           0 (0%)     1 (2.1%)             
##                 3|0|1|2          2 (5.9%)     5 (11%)             
##                 3|0|2|1          10 (29%)     7 (15%)             
##                 3|1|0|2          1 (2.9%)     0 (0%)              
##                 3|1|2|0          1 (2.9%)    2 (4.3%)             
##                 3|2|0|1           9 (26%)    4 (8.5%)             
##                 3|2|1|0           0 (0%)     3 (6.4%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q09_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.2    
##                 0|1|3|2          1 (2.5%)    1 (2.7%)             
##                 0|2|1|3           0 (0%)     2 (5.4%)             
##                 0|2|3|1          2 (5.0%)     5 (14%)             
##                 0|3|1|2          3 (7.5%)    1 (2.7%)             
##                 0|3|2|1          2 (5.0%)    1 (2.7%)             
##                 1|0|3|2           0 (0%)     2 (5.4%)             
##                 1|2|3|0          1 (2.5%)     0 (0%)              
##                 1|3|0|2           0 (0%)     1 (2.7%)             
##                 1|3|2|0          1 (2.5%)     0 (0%)              
##                 2|0|1|3          2 (5.0%)    1 (2.7%)             
##                 2|0|3|1          1 (2.5%)    3 (8.1%)             
##                 2|1|0|3           0 (0%)     2 (5.4%)             
##                 2|1|3|0           0 (0%)     2 (5.4%)             
##                 2|3|0|1          2 (5.0%)    1 (2.7%)             
##                 2|3|1|0           0 (0%)     1 (2.7%)             
##                 3|0|1|2          10 (25%)    3 (8.1%)             
##                 3|0|2|1           7 (18%)    3 (8.1%)             
##                 3|1|0|2          2 (5.0%)     4 (11%)             
##                 3|1|2|0          1 (2.5%)    2 (5.4%)             
##                 3|2|0|1          3 (7.5%)    2 (5.4%)             
##                 3|2|1|0          2 (5.0%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q09_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.4    
##                 0|1|2|3          1 (2.3%)     0 (0%)              
##                 0|1|3|2          2 (4.5%)    1 (3.3%)             
##                 0|2|1|3          1 (2.3%)    1 (3.3%)             
##                 0|2|3|1          1 (2.3%)     0 (0%)              
##                 0|3|1|2           0 (0%)     2 (6.7%)             
##                 0|3|2|1           0 (0%)     1 (3.3%)             
##                 1|0|2|3          4 (9.1%)    1 (3.3%)             
##                 1|0|3|2          1 (2.3%)     0 (0%)              
##                 1|2|0|3          3 (6.8%)     4 (13%)             
##                 1|2|3|0          3 (6.8%)     0 (0%)              
##                 1|3|0|2          3 (6.8%)     0 (0%)              
##                 2|1|0|3           0 (0%)     1 (3.3%)             
##                 2|1|3|0           0 (0%)     1 (3.3%)             
##                 3|0|1|2          12 (27%)     7 (23%)             
##                 3|0|2|1          2 (4.5%)     4 (13%)             
##                 3|1|0|2          4 (9.1%)    1 (3.3%)             
##                 3|1|2|0          2 (4.5%)    1 (3.3%)             
##                 3|2|0|1          2 (4.5%)     3 (10%)             
##                 3|2|1|0          3 (6.8%)    2 (6.7%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q10_block1"
##                 Characteristic   2, N = 32   3, N = 50   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.6    
##                 0|1|2|3           0 (0%)     2 (4.0%)             
##                 0|2|1|3          1 (3.1%)     0 (0%)              
##                 0|2|3|1           0 (0%)     1 (2.0%)             
##                 0|3|1|2           0 (0%)     1 (2.0%)             
##                 0|3|2|1          1 (3.1%)    2 (4.0%)             
##                 1|0|2|3          1 (3.1%)     0 (0%)              
##                 1|0|3|2          2 (6.3%)     0 (0%)              
##                 1|3|0|2          1 (3.1%)    1 (2.0%)             
##                 1|3|2|0          1 (3.1%)     0 (0%)              
##                 2|0|1|3          1 (3.1%)    1 (2.0%)             
##                 2|1|3|0           0 (0%)     1 (2.0%)             
##                 2|3|0|1           0 (0%)     2 (4.0%)             
##                 2|3|1|0          1 (3.1%)    1 (2.0%)             
##                 3|0|1|2          2 (6.3%)     5 (10%)             
##                 3|0|2|1           4 (13%)    12 (24%)             
##                 3|1|0|2          2 (6.3%)    1 (2.0%)             
##                 3|1|2|0           5 (16%)     6 (12%)             
##                 3|2|0|1           5 (16%)     6 (12%)             
##                 3|2|1|0           5 (16%)     8 (16%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q10_block2"
##                 Characteristic   2, N = 34   3, N = 47   p-value  
##               ----------------------------------------------------
##                 actual_choice                             0.10    
##                 0|1|2|3          2 (5.9%)    2 (4.3%)             
##                 0|1|3|2          2 (5.9%)     6 (13%)             
##                 0|2|1|3          1 (2.9%)     0 (0%)              
##                 0|2|3|1          1 (2.9%)     0 (0%)              
##                 0|3|1|2           0 (0%)     1 (2.1%)             
##                 0|3|2|1           0 (0%)     1 (2.1%)             
##                 1|0|2|3          2 (5.9%)    1 (2.1%)             
##                 1|0|3|2          1 (2.9%)    4 (8.5%)             
##                 1|2|3|0          1 (2.9%)    3 (6.4%)             
##                 1|3|2|0           0 (0%)     1 (2.1%)             
##                 2|0|1|3          1 (2.9%)     0 (0%)              
##                 2|1|0|3           0 (0%)     1 (2.1%)             
##                 2|1|3|0          1 (2.9%)     0 (0%)              
##                 2|3|0|1           0 (0%)     2 (4.3%)             
##                 2|3|1|0           0 (0%)     1 (2.1%)             
##                 3|0|1|2           6 (18%)     5 (11%)             
##                 3|0|2|1           8 (24%)    1 (2.1%)             
##                 3|1|0|2          1 (2.9%)    3 (6.4%)             
##                 3|1|2|0          1 (2.9%)    4 (8.5%)             
##                 3|2|0|1           4 (12%)    2 (4.3%)             
##                 3|2|1|0          2 (5.9%)     9 (19%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q10_block3"
##                 Characteristic   2, N = 40   3, N = 37   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0|1|2|3           0 (0%)     1 (2.7%)             
##                 0|1|3|2           0 (0%)     1 (2.7%)             
##                 0|2|3|1           0 (0%)     2 (5.4%)             
##                 0|3|1|2          1 (2.5%)     0 (0%)              
##                 0|3|2|1          2 (5.0%)     0 (0%)              
##                 1|0|2|3           0 (0%)     1 (2.7%)             
##                 1|0|3|2          1 (2.5%)    2 (5.4%)             
##                 1|2|0|3          2 (5.0%)    1 (2.7%)             
##                 1|2|3|0          3 (7.5%)     4 (11%)             
##                 1|3|0|2          1 (2.5%)    1 (2.7%)             
##                 2|0|3|1          1 (2.5%)    2 (5.4%)             
##                 2|1|3|0          1 (2.5%)     4 (11%)             
##                 2|3|0|1          2 (5.0%)     0 (0%)              
##                 2|3|1|0           4 (10%)    1 (2.7%)             
##                 3|0|1|2           4 (10%)    1 (2.7%)             
##                 3|0|2|1           6 (15%)     6 (16%)             
##                 3|1|0|2           6 (15%)    2 (5.4%)             
##                 3|1|2|0          1 (2.5%)     4 (11%)             
##                 3|2|0|1           4 (10%)    2 (5.4%)             
##                 3|2|1|0          1 (2.5%)    2 (5.4%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "G10Q10_block4"
##                 Characteristic   2, N = 44   3, N = 30   p-value  
##               ----------------------------------------------------
##                 actual_choice                              0.3    
##                 0|1|2|3           0 (0%)     1 (3.3%)             
##                 0|1|3|2          1 (2.3%)     0 (0%)              
##                 0|2|1|3          2 (4.5%)     3 (10%)             
##                 0|2|3|1          2 (4.5%)     0 (0%)              
##                 0|3|1|2          1 (2.3%)    1 (3.3%)             
##                 0|3|2|1          2 (4.5%)    2 (6.7%)             
##                 1|0|2|3           0 (0%)      3 (10%)             
##                 1|2|0|3          4 (9.1%)     0 (0%)              
##                 1|2|3|0          1 (2.3%)     0 (0%)              
##                 2|0|1|3          2 (4.5%)     3 (10%)             
##                 2|0|3|1          2 (4.5%)    1 (3.3%)             
##                 2|1|0|3          1 (2.3%)    1 (3.3%)             
##                 2|1|3|0          1 (2.3%)     0 (0%)              
##                 2|3|0|1          2 (4.5%)     0 (0%)              
##                 3|0|1|2          3 (6.8%)    2 (6.7%)             
##                 3|0|2|1           7 (16%)     7 (23%)             
##                 3|1|0|2          2 (4.5%)    1 (3.3%)             
##                 3|1|2|0          2 (4.5%)     0 (0%)              
##                 3|2|0|1          4 (9.1%)     5 (17%)             
##                 3|2|1|0           5 (11%)     0 (0%)              
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value

Next, we look at the association between each of the 40 paired comparison questions (i.e., actual_choice) with each task sequence and each block

# assess 'actual_choice' vs task sequence by question and block for pc
results = lapply(tasks_pc, function(variable1) {
  lapply(block, function(variable2) {
    choice_vs_taskseq_by_question_and_block(variable1, variable2, pc2_it)
  })})
## [1] "G08Q01_taskseq1"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 9  ¦              3 (33%)   6 (67%)  ¦                     
##        9, N = 11  ¦              2 (18%)   9 (82%)  ¦                     
##        10, N = 4  ¦              3 (75%)   1 (25%)  ¦                     
##        11, N = 10 ¦              3 (30%)   7 (70%)  ¦                     
##        12, N = 6  ¦              3 (50%)   3 (50%)  ¦                     
##        13, N = 8  ¦              2 (25%)   6 (75%)  ¦                     
##        14, N = 5  ¦              0 (0%)    5 (100%) ¦                     
##        15, N = 9  ¦              6 (67%)   3 (33%)  ¦                     
##        16, N = 8  ¦              7 (88%)   1 (13%)  ¦                     
##        17, N = 12 ¦              2 (17%)   10 (83%) ¦                     
##         p-value   ¦   0.008                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q01_taskseq2"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 7  ¦              3 (43%)    4 (57%) ¦                     
##         9, N = 7  ¦              5 (71%)    2 (29%) ¦                     
##        10, N = 10 ¦              5 (50%)    5 (50%) ¦                     
##        11, N = 5  ¦              4 (80%)    1 (20%) ¦                     
##        12, N = 11 ¦              5 (45%)    6 (55%) ¦                     
##        13, N = 7  ¦              4 (57%)    3 (43%) ¦                     
##        14, N = 9  ¦              6 (67%)    3 (33%) ¦                     
##        15, N = 10 ¦              8 (80%)    2 (20%) ¦                     
##        16, N = 7  ¦              7 (100%)   0 (0%)  ¦                     
##        17, N = 8  ¦              8 (100%)   0 (0%)  ¦                     
##         p-value   ¦    0.10                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q01_taskseq3"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 5  ¦              3 (60%)   2 (40%) ¦                     
##          9, N = 4  ¦              3 (75%)   1 (25%) ¦                     
##         10, N = 7  ¦              4 (57%)   3 (43%) ¦                     
##         11, N = 12 ¦              8 (67%)   4 (33%) ¦                     
##         12, N = 6  ¦              4 (67%)   2 (33%) ¦                     
##         13, N = 6  ¦              3 (50%)   3 (50%) ¦                     
##         14, N = 10 ¦              6 (60%)   4 (40%) ¦                     
##         15, N = 8  ¦              6 (75%)   2 (25%) ¦                     
##         16, N = 5  ¦              4 (80%)   1 (20%) ¦                     
##         17, N = 14 ¦              7 (50%)   7 (50%) ¦                     
##          p-value   ¦    >0.9                        ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q01_taskseq4"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 7  ¦              5 (71%)   2 (29%) ¦                     
##          9, N = 7  ¦              5 (71%)   2 (29%) ¦                     
##         10, N = 2  ¦              1 (50%)   1 (50%) ¦                     
##         11, N = 10 ¦              7 (70%)   3 (30%) ¦                     
##         12, N = 8  ¦              2 (25%)   6 (75%) ¦                     
##         13, N = 6  ¦              5 (83%)   1 (17%) ¦                     
##         14, N = 10 ¦              6 (60%)   4 (40%) ¦                     
##         15, N = 6  ¦              4 (67%)   2 (33%) ¦                     
##         16, N = 5  ¦              3 (60%)   2 (40%) ¦                     
##         17, N = 13 ¦              9 (69%)   4 (31%) ¦                     
##          p-value   ¦    0.6                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q02_taskseq1"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 17  ¦              9 (53%)   8 (47%)  ¦                     
##         9, N = 7  ¦              4 (57%)   3 (43%)  ¦                     
##        10, N = 10 ¦              7 (70%)   3 (30%)  ¦                     
##        11, N = 8  ¦              6 (75%)   2 (25%)  ¦                     
##        12, N = 7  ¦              5 (71%)   2 (29%)  ¦                     
##        13, N = 3  ¦              1 (33%)   2 (67%)  ¦                     
##        14, N = 6  ¦              1 (17%)   5 (83%)  ¦                     
##        15, N = 3  ¦              0 (0%)    3 (100%) ¦                     
##        16, N = 13 ¦              5 (38%)   8 (62%)  ¦                     
##        17, N = 8  ¦              4 (50%)   4 (50%)  ¦                     
##         p-value   ¦    0.2                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q02_taskseq2"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 6  ¦              4 (67%)   2 (33%) ¦                     
##         9, N = 10  ¦              5 (50%)   5 (50%) ¦                     
##         10, N = 7  ¦              5 (71%)   2 (29%) ¦                     
##         11, N = 9  ¦              7 (78%)   2 (22%) ¦                     
##         12, N = 8  ¦              6 (75%)   2 (25%) ¦                     
##         13, N = 9  ¦              6 (67%)   3 (33%) ¦                     
##         14, N = 9  ¦              3 (33%)   6 (67%) ¦                     
##         15, N = 4  ¦              2 (50%)   2 (50%) ¦                     
##         16, N = 10 ¦              9 (90%)   1 (10%) ¦                     
##         17, N = 9  ¦              6 (67%)   3 (33%) ¦                     
##          p-value   ¦    0.4                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q02_taskseq3"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 4  ¦              4 (100%)   0 (0%)  ¦                     
##        9, N = 10  ¦              9 (90%)    1 (10%) ¦                     
##        10, N = 8  ¦              8 (100%)   0 (0%)  ¦                     
##        11, N = 13 ¦              8 (62%)    5 (38%) ¦                     
##        12, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        13, N = 9  ¦              3 (33%)    6 (67%) ¦                     
##        14, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        15, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        16, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        17, N = 5  ¦              4 (80%)    1 (20%) ¦                     
##         p-value   ¦    0.11                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q02_taskseq4"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 8  ¦              2 (25%)   6 (75%)  ¦                     
##         9, N = 5  ¦              2 (40%)   3 (60%)  ¦                     
##        10, N = 9  ¦              4 (44%)   5 (56%)  ¦                     
##        11, N = 8  ¦              3 (38%)   5 (63%)  ¦                     
##        12, N = 10 ¦              5 (50%)   5 (50%)  ¦                     
##        13, N = 5  ¦              4 (80%)   1 (20%)  ¦                     
##        14, N = 3  ¦              0 (0%)    3 (100%) ¦                     
##        15, N = 4  ¦              3 (75%)   1 (25%)  ¦                     
##        16, N = 15 ¦              7 (47%)   8 (53%)  ¦                     
##        17, N = 7  ¦              3 (43%)   4 (57%)  ¦                     
##         p-value   ¦    0.5                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q03_taskseq1"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 5  ¦              4 (80%)   1 (20%) ¦                     
##         9, N = 11  ¦              5 (45%)   6 (55%) ¦                     
##         10, N = 12 ¦              8 (67%)   4 (33%) ¦                     
##         11, N = 9  ¦              5 (56%)   4 (44%) ¦                     
##         12, N = 7  ¦              1 (14%)   6 (86%) ¦                     
##         13, N = 10 ¦              6 (60%)   4 (40%) ¦                     
##         14, N = 5  ¦              4 (80%)   1 (20%) ¦                     
##         15, N = 4  ¦              2 (50%)   2 (50%) ¦                     
##         16, N = 11 ¦              7 (64%)   4 (36%) ¦                     
##         17, N = 8  ¦              5 (63%)   3 (38%) ¦                     
##          p-value   ¦    0.5                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q03_taskseq2"
##        Characteri ¦ actual_cho   0          1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                              ¦         Chi-square  
##                   ¦                                  ¦         d test      
##         8, N = 8  ¦              7 (88%)    1 (13%)  ¦                     
##         9, N = 6  ¦              4 (67%)    2 (33%)  ¦                     
##        10, N = 14 ¦              10 (71%)   4 (29%)  ¦                     
##        11, N = 13 ¦              12 (92%)   1 (7.7%) ¦                     
##        12, N = 4  ¦              3 (75%)    1 (25%)  ¦                     
##        13, N = 12 ¦              10 (83%)   2 (17%)  ¦                     
##        14, N = 8  ¦              6 (75%)    2 (25%)  ¦                     
##        15, N = 3  ¦              2 (67%)    1 (33%)  ¦                     
##        16, N = 6  ¦              6 (100%)    0 (0%)  ¦                     
##        17, N = 7  ¦              5 (71%)    2 (29%)  ¦                     
##         p-value   ¦    0.8                           ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q03_taskseq3"
##        Characteri ¦ actual_cho   0          1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                              ¦         Chi-square  
##                   ¦                                  ¦         d test      
##        8, N = 13  ¦              12 (92%)   1 (7.7%) ¦                     
##         9, N = 9  ¦              6 (67%)    3 (33%)  ¦                     
##        10, N = 4  ¦              4 (100%)    0 (0%)  ¦                     
##        11, N = 3  ¦              3 (100%)    0 (0%)  ¦                     
##        12, N = 10 ¦              8 (80%)    2 (20%)  ¦                     
##        13, N = 7  ¦              5 (71%)    2 (29%)  ¦                     
##        14, N = 7  ¦              4 (57%)    3 (43%)  ¦                     
##        15, N = 14 ¦              11 (79%)   3 (21%)  ¦                     
##        16, N = 7  ¦              7 (100%)    0 (0%)  ¦                     
##        17, N = 3  ¦              3 (100%)    0 (0%)  ¦                     
##         p-value   ¦    0.4                           ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q03_taskseq4"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##         9, N = 5  ¦              4 (80%)    1 (20%) ¦                     
##        10, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        11, N = 3  ¦              2 (67%)    1 (33%) ¦                     
##        12, N = 7  ¦              5 (71%)    2 (29%) ¦                     
##        13, N = 13 ¦              11 (85%)   2 (15%) ¦                     
##        14, N = 11 ¦              8 (73%)    3 (27%) ¦                     
##        15, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        16, N = 5  ¦              3 (60%)    2 (40%) ¦                     
##        17, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##         p-value   ¦    >0.9                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q04_taskseq1"
##        Characteri ¦ actual_cho   0          1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                              ¦         Chi-square  
##                   ¦                                  ¦         d test      
##        8, N = 10  ¦              6 (60%)    4 (40%)  ¦                     
##        9, N = 11  ¦              10 (91%)   1 (9.1%) ¦                     
##        10, N = 4  ¦              3 (75%)    1 (25%)  ¦                     
##        11, N = 7  ¦              5 (71%)    2 (29%)  ¦                     
##        12, N = 14 ¦              11 (79%)   3 (21%)  ¦                     
##        13, N = 7  ¦              3 (43%)    4 (57%)  ¦                     
##        14, N = 6  ¦              5 (83%)    1 (17%)  ¦                     
##        15, N = 6  ¦              4 (67%)    2 (33%)  ¦                     
##        16, N = 5  ¦              4 (80%)    1 (20%)  ¦                     
##        17, N = 12 ¦              11 (92%)   1 (8.3%) ¦                     
##         p-value   ¦    0.4                           ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q04_taskseq2"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##         8, N = 14  ¦              6 (43%)   8 (57%) ¦                     
##          9, N = 5  ¦              4 (80%)   1 (20%) ¦                     
##         10, N = 5  ¦              1 (20%)   4 (80%) ¦                     
##         11, N = 9  ¦              4 (44%)   5 (56%) ¦                     
##         12, N = 10 ¦              5 (50%)   5 (50%) ¦                     
##         13, N = 8  ¦              4 (50%)   4 (50%) ¦                     
##         14, N = 6  ¦              5 (83%)   1 (17%) ¦                     
##         15, N = 9  ¦              5 (56%)   4 (44%) ¦                     
##         16, N = 8  ¦              4 (50%)   4 (50%) ¦                     
##         17, N = 7  ¦              4 (57%)   3 (43%) ¦                     
##          p-value   ¦    0.7                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q04_taskseq3"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 5  ¦              3 (60%)   2 (40%)  ¦                     
##         9, N = 5  ¦              4 (80%)   1 (20%)  ¦                     
##        10, N = 9  ¦              5 (56%)   4 (44%)  ¦                     
##        11, N = 8  ¦              5 (63%)   3 (38%)  ¦                     
##        12, N = 7  ¦              4 (57%)   3 (43%)  ¦                     
##        13, N = 8  ¦              5 (63%)   3 (38%)  ¦                     
##        14, N = 11 ¦              7 (64%)   4 (36%)  ¦                     
##        15, N = 5  ¦              0 (0%)    5 (100%) ¦                     
##        16, N = 10 ¦              2 (20%)   8 (80%)  ¦                     
##        17, N = 9  ¦              4 (44%)   5 (56%)  ¦                     
##         p-value   ¦    0.2                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q04_taskseq4"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 6  ¦              4 (67%)   2 (33%)  ¦                     
##         9, N = 9  ¦              3 (33%)   6 (67%)  ¦                     
##        10, N = 8  ¦              4 (50%)   4 (50%)  ¦                     
##        11, N = 6  ¦              3 (50%)   3 (50%)  ¦                     
##        12, N = 8  ¦              2 (25%)   6 (75%)  ¦                     
##        13, N = 10 ¦              5 (50%)   5 (50%)  ¦                     
##        14, N = 9  ¦              3 (33%)   6 (67%)  ¦                     
##        15, N = 5  ¦              1 (20%)   4 (80%)  ¦                     
##        16, N = 9  ¦              4 (44%)   5 (56%)  ¦                     
##        17, N = 4  ¦              0 (0%)    4 (100%) ¦                     
##         p-value   ¦    0.6                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q05_taskseq1"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 6  ¦              3 (50%)   3 (50%) ¦                     
##          9, N = 7  ¦              3 (43%)   4 (57%) ¦                     
##         10, N = 10 ¦              5 (50%)   5 (50%) ¦                     
##         11, N = 6  ¦              5 (83%)   1 (17%) ¦                     
##         12, N = 8  ¦              3 (38%)   5 (63%) ¦                     
##         13, N = 8  ¦              5 (63%)   3 (38%) ¦                     
##         14, N = 11 ¦              6 (55%)   5 (45%) ¦                     
##         15, N = 10 ¦              5 (50%)   5 (50%) ¦                     
##         16, N = 9  ¦              4 (44%)   5 (56%) ¦                     
##         17, N = 7  ¦              4 (57%)   3 (43%) ¦                     
##          p-value   ¦    >0.9                        ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q05_taskseq2"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 12  ¦              7 (58%)    5 (42%) ¦                     
##         9, N = 8  ¦              5 (63%)    3 (38%) ¦                     
##        10, N = 11 ¦              7 (64%)    4 (36%) ¦                     
##        11, N = 7  ¦              7 (100%)   0 (0%)  ¦                     
##        12, N = 9  ¦              7 (78%)    2 (22%) ¦                     
##        13, N = 4  ¦              3 (75%)    1 (25%) ¦                     
##        14, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        15, N = 8  ¦              4 (50%)    4 (50%) ¦                     
##        16, N = 7  ¦              5 (71%)    2 (29%) ¦                     
##        17, N = 7  ¦              3 (43%)    4 (57%) ¦                     
##         p-value   ¦    0.6                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q05_taskseq3"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 12  ¦              8 (67%)    4 (33%) ¦                     
##         9, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        10, N = 9  ¦              8 (89%)    1 (11%) ¦                     
##        11, N = 6  ¦              5 (83%)    1 (17%) ¦                     
##        12, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        13, N = 1  ¦              1 (100%)   0 (0%)  ¦                     
##        14, N = 10 ¦              7 (70%)    3 (30%) ¦                     
##        15, N = 5  ¦              5 (100%)   0 (0%)  ¦                     
##        16, N = 10 ¦              6 (60%)    4 (40%) ¦                     
##        17, N = 8  ¦              8 (100%)   0 (0%)  ¦                     
##         p-value   ¦    0.5                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q05_taskseq4"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 8  ¦              4 (50%)   4 (50%) ¦                     
##          9, N = 7  ¦              4 (57%)   3 (43%) ¦                     
##         10, N = 7  ¦              3 (43%)   4 (57%) ¦                     
##         11, N = 7  ¦              5 (71%)   2 (29%) ¦                     
##         12, N = 11 ¦              3 (27%)   8 (73%) ¦                     
##         13, N = 6  ¦              5 (83%)   1 (17%) ¦                     
##         14, N = 6  ¦              2 (33%)   4 (67%) ¦                     
##         15, N = 10 ¦              4 (40%)   6 (60%) ¦                     
##         16, N = 9  ¦              3 (33%)   6 (67%) ¦                     
##         17, N = 3  ¦              2 (67%)   1 (33%) ¦                     
##          p-value   ¦    0.5                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q06_taskseq1"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 5  ¦              1 (20%)    4 (80%) ¦                     
##         9, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        10, N = 15 ¦              9 (60%)    6 (40%) ¦                     
##        11, N = 7  ¦              3 (43%)    4 (57%) ¦                     
##        12, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##        13, N = 11 ¦              6 (55%)    5 (45%) ¦                     
##        14, N = 8  ¦              5 (63%)    3 (38%) ¦                     
##        15, N = 7  ¦              7 (100%)   0 (0%)  ¦                     
##        16, N = 4  ¦              3 (75%)    1 (25%) ¦                     
##        17, N = 11 ¦              6 (55%)    5 (45%) ¦                     
##         p-value   ¦    0.2                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q06_taskseq2"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 5  ¦              3 (60%)   2 (40%) ¦                     
##          9, N = 6  ¦              5 (83%)   1 (17%) ¦                     
##         10, N = 7  ¦              3 (43%)   4 (57%) ¦                     
##         11, N = 11 ¦              5 (45%)   6 (55%) ¦                     
##         12, N = 11 ¦              4 (36%)   7 (64%) ¦                     
##         13, N = 8  ¦              2 (25%)   6 (75%) ¦                     
##         14, N = 4  ¦              1 (25%)   3 (75%) ¦                     
##         15, N = 13 ¦              5 (38%)   8 (62%) ¦                     
##         16, N = 7  ¦              3 (43%)   4 (57%) ¦                     
##         17, N = 9  ¦              5 (56%)   4 (44%) ¦                     
##          p-value   ¦    0.6                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q06_taskseq3"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 8  ¦              2 (25%)    6 (75%) ¦                     
##         9, N = 9  ¦              6 (67%)    3 (33%) ¦                     
##        10, N = 7  ¦              7 (100%)   0 (0%)  ¦                     
##        11, N = 10 ¦              8 (80%)    2 (20%) ¦                     
##        12, N = 7  ¦              6 (86%)    1 (14%) ¦                     
##        13, N = 5  ¦              4 (80%)    1 (20%) ¦                     
##        14, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##        15, N = 7  ¦              2 (29%)    5 (71%) ¦                     
##        16, N = 9  ¦              6 (67%)    3 (33%) ¦                     
##        17, N = 7  ¦              5 (71%)    2 (29%) ¦                     
##         p-value   ¦   0.027                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q06_taskseq4"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 5  ¦              3 (60%)    2 (40%) ¦                     
##         9, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##        10, N = 14 ¦              10 (71%)   4 (29%) ¦                     
##        11, N = 5  ¦              4 (80%)    1 (20%) ¦                     
##        12, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##        13, N = 7  ¦              3 (43%)    4 (57%) ¦                     
##        14, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        15, N = 4  ¦              2 (50%)    2 (50%) ¦                     
##        16, N = 6  ¦              5 (83%)    1 (17%) ¦                     
##        17, N = 9  ¦              6 (67%)    3 (33%) ¦                     
##         p-value   ¦    0.7                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q07_taskseq1"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 5  ¦              2 (40%)   3 (60%) ¦                     
##          9, N = 9  ¦              7 (78%)   2 (22%) ¦                     
##         10, N = 10 ¦              4 (40%)   6 (60%) ¦                     
##         11, N = 12 ¦              5 (42%)   7 (58%) ¦                     
##         12, N = 3  ¦              1 (33%)   2 (67%) ¦                     
##         13, N = 11 ¦              5 (45%)   6 (55%) ¦                     
##         14, N = 7  ¦              2 (29%)   5 (71%) ¦                     
##         15, N = 10 ¦              8 (80%)   2 (20%) ¦                     
##         16, N = 10 ¦              3 (30%)   7 (70%) ¦                     
##         17, N = 5  ¦              2 (40%)   3 (60%) ¦                     
##          p-value   ¦    0.3                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q07_taskseq2"
##        Characteri ¦ actual_cho   0          1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                              ¦         Chi-square  
##                   ¦                                  ¦         d test      
##         8, N = 8  ¦              3 (38%)    5 (63%)  ¦                     
##         9, N = 8  ¦              3 (38%)    5 (63%)  ¦                     
##        10, N = 4  ¦              4 (100%)    0 (0%)  ¦                     
##        11, N = 9  ¦              6 (67%)    3 (33%)  ¦                     
##        12, N = 5  ¦              2 (40%)    3 (60%)  ¦                     
##        13, N = 4  ¦              2 (50%)    2 (50%)  ¦                     
##        14, N = 10 ¦              8 (80%)    2 (20%)  ¦                     
##        15, N = 7  ¦              5 (71%)    2 (29%)  ¦                     
##        16, N = 16 ¦              6 (38%)    10 (63%) ¦                     
##        17, N = 10 ¦              9 (90%)    1 (10%)  ¦                     
##         p-value   ¦   0.062                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q07_taskseq3"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 9  ¦              5 (56%)    4 (44%) ¦                     
##         9, N = 7  ¦              3 (43%)    4 (57%) ¦                     
##        10, N = 10 ¦              9 (90%)    1 (10%) ¦                     
##        11, N = 2  ¦              2 (100%)   0 (0%)  ¦                     
##        12, N = 9  ¦              5 (56%)    4 (44%) ¦                     
##        13, N = 10 ¦              7 (70%)    3 (30%) ¦                     
##        14, N = 10 ¦              7 (70%)    3 (30%) ¦                     
##        15, N = 6  ¦              5 (83%)    1 (17%) ¦                     
##        16, N = 5  ¦              5 (100%)   0 (0%)  ¦                     
##        17, N = 9  ¦              6 (67%)    3 (33%) ¦                     
##         p-value   ¦    0.4                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q07_taskseq4"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 6  ¦              3 (50%)    3 (50%) ¦                     
##         9, N = 9  ¦              5 (56%)    4 (44%) ¦                     
##        10, N = 8  ¦              3 (38%)    5 (63%) ¦                     
##        11, N = 7  ¦              6 (86%)    1 (14%) ¦                     
##        12, N = 8  ¦              5 (63%)    3 (38%) ¦                     
##        13, N = 8  ¦              4 (50%)    4 (50%) ¦                     
##        14, N = 5  ¦              3 (60%)    2 (40%) ¦                     
##        15, N = 13 ¦              10 (77%)   3 (23%) ¦                     
##        16, N = 3  ¦              1 (33%)    2 (67%) ¦                     
##        17, N = 7  ¦              4 (57%)    3 (43%) ¦                     
##         p-value   ¦    0.7                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q08_taskseq1"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 5  ¦              2 (40%)   3 (60%) ¦                     
##          9, N = 7  ¦              5 (71%)   2 (29%) ¦                     
##         10, N = 4  ¦              3 (75%)   1 (25%) ¦                     
##         11, N = 9  ¦              3 (33%)   6 (67%) ¦                     
##         12, N = 10 ¦              4 (40%)   6 (60%) ¦                     
##         13, N = 5  ¦              4 (80%)   1 (20%) ¦                     
##         14, N = 15 ¦              7 (47%)   8 (53%) ¦                     
##         15, N = 13 ¦              5 (38%)   8 (62%) ¦                     
##         16, N = 8  ¦              4 (50%)   4 (50%) ¦                     
##         17, N = 6  ¦              4 (67%)   2 (33%) ¦                     
##          p-value   ¦    0.6                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q08_taskseq2"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 8  ¦              4 (50%)   4 (50%) ¦                     
##          9, N = 9  ¦              4 (44%)   5 (56%) ¦                     
##         10, N = 10 ¦              7 (70%)   3 (30%) ¦                     
##         11, N = 5  ¦              3 (60%)   2 (40%) ¦                     
##         12, N = 6  ¦              4 (67%)   2 (33%) ¦                     
##         13, N = 13 ¦              7 (54%)   6 (46%) ¦                     
##         14, N = 7  ¦              3 (43%)   4 (57%) ¦                     
##         15, N = 7  ¦              4 (57%)   3 (43%) ¦                     
##         16, N = 7  ¦              2 (29%)   5 (71%) ¦                     
##         17, N = 9  ¦              6 (67%)   3 (33%) ¦                     
##          p-value   ¦    0.9                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q08_taskseq3"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##          8, N = 5  ¦              1 (20%)   4 (80%) ¦                     
##          9, N = 8  ¦              7 (88%)   1 (13%) ¦                     
##         10, N = 5  ¦              2 (40%)   3 (60%) ¦                     
##         11, N = 8  ¦              6 (75%)   2 (25%) ¦                     
##         12, N = 14 ¦              6 (43%)   8 (57%) ¦                     
##         13, N = 6  ¦              4 (67%)   2 (33%) ¦                     
##         14, N = 7  ¦              4 (57%)   3 (43%) ¦                     
##         15, N = 5  ¦              2 (40%)   3 (60%) ¦                     
##         16, N = 9  ¦              4 (44%)   5 (56%) ¦                     
##         17, N = 10 ¦              7 (70%)   3 (30%) ¦                     
##          p-value   ¦    0.3                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q08_taskseq4"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 10  ¦              4 (40%)    6 (60%) ¦                     
##         9, N = 9  ¦              3 (33%)    6 (67%) ¦                     
##        10, N = 5  ¦              5 (100%)   0 (0%)  ¦                     
##        11, N = 12 ¦              4 (33%)    8 (67%) ¦                     
##        12, N = 5  ¦              1 (20%)    4 (80%) ¦                     
##        13, N = 4  ¦              3 (75%)    1 (25%) ¦                     
##        14, N = 6  ¦              3 (50%)    3 (50%) ¦                     
##        15, N = 7  ¦              4 (57%)    3 (43%) ¦                     
##        16, N = 8  ¦              4 (50%)    4 (50%) ¦                     
##        17, N = 8  ¦              5 (63%)    3 (38%) ¦                     
##         p-value   ¦    0.3                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q09_taskseq1"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 9  ¦              8 (89%)    1 (11%) ¦                     
##         9, N = 5  ¦              4 (80%)    1 (20%) ¦                     
##        10, N = 7  ¦              6 (86%)    1 (14%) ¦                     
##        11, N = 6  ¦              2 (33%)    4 (67%) ¦                     
##        12, N = 8  ¦              6 (75%)    2 (25%) ¦                     
##        13, N = 7  ¦              5 (71%)    2 (29%) ¦                     
##        14, N = 11 ¦              6 (55%)    5 (45%) ¦                     
##        15, N = 14 ¦              6 (43%)    8 (57%) ¦                     
##        16, N = 8  ¦              8 (100%)   0 (0%)  ¦                     
##        17, N = 7  ¦              5 (71%)    2 (29%) ¦                     
##         p-value   ¦   0.077                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q09_taskseq2"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 2  ¦              0 (0%)    2 (100%) ¦                     
##        9, N = 13  ¦              8 (62%)   5 (38%)  ¦                     
##        10, N = 9  ¦              5 (56%)   4 (44%)  ¦                     
##        11, N = 5  ¦              2 (40%)   3 (60%)  ¦                     
##        12, N = 9  ¦              6 (67%)   3 (33%)  ¦                     
##        13, N = 9  ¦              6 (67%)   3 (33%)  ¦                     
##        14, N = 11 ¦              6 (55%)   5 (45%)  ¦                     
##        15, N = 10 ¦              5 (50%)   5 (50%)  ¦                     
##        16, N = 8  ¦              5 (63%)   3 (38%)  ¦                     
##        17, N = 5  ¦              3 (60%)   2 (40%)  ¦                     
##         p-value   ¦    0.9                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q09_taskseq3"
##        Characteri ¦ actual_cho   0          1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                              ¦         Chi-square  
##                   ¦                                  ¦         d test      
##         8, N = 6  ¦              1 (17%)    5 (83%)  ¦                     
##         9, N = 6  ¦               0 (0%)    6 (100%) ¦                     
##        10, N = 10 ¦              2 (20%)    8 (80%)  ¦                     
##        11, N = 9  ¦              3 (33%)    6 (67%)  ¦                     
##        12, N = 2  ¦              1 (50%)    1 (50%)  ¦                     
##        13, N = 13 ¦              1 (7.7%)   12 (92%) ¦                     
##        14, N = 5  ¦              3 (60%)    2 (40%)  ¦                     
##        15, N = 6  ¦              2 (33%)    4 (67%)  ¦                     
##        16, N = 11 ¦              2 (18%)    9 (82%)  ¦                     
##        17, N = 9  ¦              5 (56%)    4 (44%)  ¦                     
##         p-value   ¦    0.15                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q09_taskseq4"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##         8, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##         9, N = 9  ¦              8 (89%)    1 (11%) ¦                     
##        10, N = 9  ¦              7 (78%)    2 (22%) ¦                     
##        11, N = 8  ¦              5 (63%)    3 (38%) ¦                     
##        12, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        13, N = 5  ¦              5 (100%)   0 (0%)  ¦                     
##        14, N = 5  ¦              2 (40%)    3 (60%) ¦                     
##        15, N = 11 ¦              5 (45%)    6 (55%) ¦                     
##        16, N = 9  ¦              7 (78%)    2 (22%) ¦                     
##        17, N = 6  ¦              3 (50%)    3 (50%) ¦                     
##         p-value   ¦    0.3                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q10_taskseq1"
##        Characteri ¦ actual_cho   0          1       ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 11  ¦              6 (55%)    5 (45%) ¦                     
##         9, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##        10, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        11, N = 8  ¦              7 (88%)    1 (13%) ¦                     
##        12, N = 11 ¦              7 (64%)    4 (36%) ¦                     
##        13, N = 12 ¦              10 (83%)   2 (17%) ¦                     
##        14, N = 8  ¦              5 (63%)    3 (38%) ¦                     
##        15, N = 6  ¦              4 (67%)    2 (33%) ¦                     
##        16, N = 6  ¦              6 (100%)   0 (0%)  ¦                     
##        17, N = 6  ¦              6 (100%)   0 (0%)  ¦                     
##         p-value   ¦    0.3                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q10_taskseq2"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 11  ¦              2 (18%)   9 (82%)  ¦                     
##         9, N = 9  ¦              3 (33%)   6 (67%)  ¦                     
##        10, N = 4  ¦              2 (50%)   2 (50%)  ¦                     
##        11, N = 8  ¦              2 (25%)   6 (75%)  ¦                     
##        12, N = 8  ¦              3 (38%)   5 (63%)  ¦                     
##        13, N = 7  ¦              1 (14%)   6 (86%)  ¦                     
##        14, N = 9  ¦              0 (0%)    9 (100%) ¦                     
##        15, N = 10 ¦              5 (50%)   5 (50%)  ¦                     
##        16, N = 5  ¦              2 (40%)   3 (60%)  ¦                     
##        17, N = 10 ¦              6 (60%)   4 (40%)  ¦                     
##         p-value   ¦    0.2                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q10_taskseq3"
##        Characteri ¦ actual_cho   0         1        ¦ n (%)   Pearson's   
##        stic       ¦ ice                             ¦         Chi-square  
##                   ¦                                 ¦         d test      
##        8, N = 10  ¦              4 (40%)   6 (60%)  ¦                     
##        9, N = 11  ¦              7 (64%)   4 (36%)  ¦                     
##        10, N = 8  ¦              4 (50%)   4 (50%)  ¦                     
##        11, N = 6  ¦              2 (33%)   4 (67%)  ¦                     
##        12, N = 6  ¦              2 (33%)   4 (67%)  ¦                     
##        13, N = 12 ¦              6 (50%)   6 (50%)  ¦                     
##        14, N = 3  ¦              1 (33%)   2 (67%)  ¦                     
##        15, N = 13 ¦              2 (15%)   11 (85%) ¦                     
##        16, N = 5  ¦              0 (0%)    5 (100%) ¦                     
##        17, N = 3  ¦              1 (33%)   2 (67%)  ¦                     
##         p-value   ¦    0.3                          ¦                     
## 
## Column names: , 1, 2, 3, .2, .1
## [1] "G08Q10_taskseq4"
##         Characteri ¦ actual_cho   0         1       ¦ n (%)   Pearson's   
##         stic       ¦ ice                            ¦         Chi-square  
##                    ¦                                ¦         d test      
##         8, N = 10  ¦              4 (40%)   6 (60%) ¦                     
##          9, N = 6  ¦              1 (17%)   5 (83%) ¦                     
##         10, N = 4  ¦              1 (25%)   3 (75%) ¦                     
##         11, N = 8  ¦              2 (25%)   6 (75%) ¦                     
##         12, N = 3  ¦              2 (67%)   1 (33%) ¦                     
##         13, N = 10 ¦              1 (10%)   9 (90%) ¦                     
##         14, N = 11 ¦              4 (36%)   7 (64%) ¦                     
##         15, N = 8  ¦              3 (38%)   5 (63%) ¦                     
##         16, N = 5  ¦              1 (20%)   4 (80%) ¦                     
##         17, N = 9  ¦              3 (33%)   6 (67%) ¦                     
##          p-value   ¦    0.8                         ¦                     
## 
## Column names: , 1, 2, 3, .2, .1

9.3 Horizontal bias in paired comparisons

We will assess horizontal bias in the paired comparisons (e.g., always left) and run chi-square tests on whether these behaviors are associated with experimental or respondent characteristics.

# assess final choice overall (t-test P=0.5)
t.test(pc2_it$final_choice, mu = 0.5)
## 
##  One Sample t-test
## 
## data:  pc2_it$final_choice
## t = -0.74947, df = 3139, p-value = 0.4536
## alternative hypothesis: true mean is not equal to 0.5
## 95 percent confidence interval:
##  0.4758156 0.5108086
## sample estimates:
## mean of x 
## 0.4933121
# assess final choice by question and block (t-test P=0.5)
results = lapply(tasks_pc, function(variable1) {
  lapply(block, function(variable2) {
    ttest_by_question_and_block(variable1, variable2, pc2_it)
  })})
## [1] "G08Q01_block1"
## [1] 0.5109305
## [1] "G08Q01_block2"
## [1] 0.9123437
## [1] "G08Q01_block3"
## [1] 0.9101486
## [1] "G08Q01_block4"
## [1] 0.4892333
## [1] "G08Q02_block1"
## [1] 0.3802483
## [1] "G08Q02_block2"
## [1] 0.09578925
## [1] "G08Q02_block3"
## [1] 0.08743033
## [1] "G08Q02_block4"
## [1] 0.3558883
## [1] "G08Q03_block1"
## [1] 1
## [1] "G08Q03_block2"
## [1] 0.4401167
## [1] "G08Q03_block3"
## [1] 0.73486
## [1] "G08Q03_block4"
## [1] 0.4892333
## [1] "G08Q04_block1"
## [1] 0.5109305
## [1] "G08Q04_block2"
## [1] 0.3203257
## [1] "G08Q04_block3"
## [1] 0.3081481
## [1] "G08Q04_block4"
## [1] 0.2476976
## [1] "G08Q05_block1"
## [1] 0.1227811
## [1] "G08Q05_block2"
## [1] 0.4401167
## [1] "G08Q05_block3"
## [1] 0.9101486
## [1] "G08Q05_block4"
## [1] 0.8179584
## [1] "G08Q06_block1"
## [1] 0.2720804
## [1] "G08Q06_block2"
## [1] 0.7411361
## [1] "G08Q06_block3"
## [1] 0.08743033
## [1] "G08Q06_block4"
## [1] 0.8179584
## [1] "G08Q07_block1"
## [1] 0.5109305
## [1] "G08Q07_block2"
## [1] 0.4401167
## [1] "G08Q07_block3"
## [1] 0.1395061
## [1] "G08Q07_block4"
## [1] 0.4892333
## [1] "G08Q08_block1"
## [1] 0.3802483
## [1] "G08Q08_block2"
## [1] 0.7411361
## [1] "G08Q08_block3"
## [1] 0.9101486
## [1] "G08Q08_block4"
## [1] 1
## [1] "G08Q09_block1"
## [1] 0.6614352
## [1] "G08Q09_block2"
## [1] 0.3203257
## [1] "G08Q09_block3"
## [1] 0.5721904
## [1] "G08Q09_block4"
## [1] 0.06244233
## [1] "G08Q10_block1"
## [1] 0.5109305
## [1] "G08Q10_block2"
## [1] 0.9123437
## [1] "G08Q10_block3"
## [1] 0.5721904
## [1] "G08Q10_block4"
## [1] 0.6450883
# create 'always_left_pc', 'always_right_pc', 'straigth_line_pc'
uniq_ids = resp_i$id
resp_i$always_left_pc = 0
resp_i$always_right_pc = 0
resp_i$straight_line_pc = 0
for (i in 1:length(uniq_ids)) {
  a = sum(pc2_it$final_choice[pc2_it == uniq_ids[i]])
  if (a == 0) {resp_i$always_left_pc[i] = 1}
  if (a == 10) {resp_i$always_right_pc[i] = 1}
  if (a == 0 | a == 10) {resp_i$straight_line_pc[i] = 1}
}

# create 'always_left_cc', 'always_right_cc', 'stragth_line_cc'
resp_i$always_left_cc = 0
resp_i$always_right_cc = 0
resp_i$straight_line_cc = 0
for (i in 1:length(uniq_ids)) {
  a = sum(cc2_it$final_choice[cc2_it == uniq_ids[i]])
  if (a == 0) {resp_i$always_left_cc[i] = 1}
  if (a == 10) {resp_i$always_right_cc[i] = 1}
  if (a == 0 | a == 10) {resp_i$straight_line_cc[i] = 1}
}

# define variables to loop over
straight = c("always_left_pc", "always_right_pc", "straight_line_pc",
             "always_left_cc", "always_right_cc", "straight_line_cc")

# assess three straight lining variables overall and by cc and pc
results = lapply(straight, function(variable){
  straight_lining(variable, resp_i)
})
## [1] "always_left_pc"
##                 Characteristic   0, N = 307   1, N = 7   p-value  
##               ----------------------------------------------------
##                 subjectindex                               0.7    
##                 1                 81 (26%)    1 (14%)             
##                 2                 78 (25%)    3 (43%)             
##                 3                 76 (25%)    1 (14%)             
##                 4                 72 (23%)    2 (29%)             
##                 quota                                      0.5    
##                 1                 6 (2.0%)     0 (0%)             
##                 10                7 (2.3%)    1 (14%)             
##                 11                6 (2.0%)     0 (0%)             
##                 12                7 (2.3%)     0 (0%)             
##                 13                6 (2.0%)     0 (0%)             
##                 14                6 (2.0%)     0 (0%)             
##                 15                6 (2.0%)    1 (14%)             
##                 16                43 (14%)    1 (14%)             
##                 17                48 (16%)     0 (0%)             
##                 18               23 (7.5%)    1 (14%)             
##                 2                 5 (1.6%)     0 (0%)             
##                 3                 6 (2.0%)     0 (0%)             
##                 4                 7 (2.3%)     0 (0%)             
##                 5                 6 (2.0%)    1 (14%)             
##                 6                 5 (1.6%)     0 (0%)             
##                 7                 46 (15%)    1 (14%)             
##                 8                 44 (14%)    1 (14%)             
##                 9                30 (9.8%)     0 (0%)             
##                 female                                    >0.9    
##                 0                152 (50%)    4 (57%)             
##                 1                155 (50%)    3 (43%)             
##                 age_range                                  0.9    
##                 1                115 (37%)    3 (43%)             
##                 2                115 (37%)    2 (29%)             
##                 3                 77 (25%)    2 (29%)             
##                 race                                      0.048   
##                 1                231 (75%)    3 (43%)             
##                 2                 37 (12%)    3 (43%)             
##                 3                 39 (13%)    1 (14%)             
##                 hispanic                                  >0.9    
##                 0                270 (88%)    6 (86%)             
##                 1                 37 (12%)    1 (14%)             
##                 pc_cnum2                                   0.4    
##                 2                145 (47%)    5 (71%)             
##                 3                162 (53%)    2 (29%)             
##                 region                                     0.9    
##                 1                 65 (21%)    1 (14%)             
##                 2                 68 (22%)    1 (14%)             
##                 3                114 (37%)    3 (43%)             
##                 4                 60 (20%)    2 (29%)             
##                 parent                                     0.6    
##                 0                143 (47%)    2 (29%)             
##                 1                164 (53%)    5 (71%)             
##                 marital                                   >0.9    
##                 1                135 (44%)    3 (43%)             
##                 2                131 (43%)    3 (43%)             
##                 3                 41 (13%)    1 (14%)             
##                 edu                                        0.3    
##                 1                139 (45%)    3 (43%)             
##                 2                 63 (21%)    3 (43%)             
##                 3                105 (34%)    1 (14%)             
##                 income                                     0.3    
##                 1                125 (41%)    4 (57%)             
##                 2                100 (33%)    3 (43%)             
##                 3                 82 (27%)     0 (0%)             
##                 community                                  0.2    
##                 1                 85 (28%)    4 (57%)             
##                 2                165 (54%)    3 (43%)             
##                 3                 57 (19%)     0 (0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "always_right_pc"
##                 Characteristic   0, N = 311   1, N = 3   p-value  
##               ----------------------------------------------------
##                 subjectindex                               0.3    
##                 1                 81 (26%)    1 (33%)             
##                 2                 79 (25%)    2 (67%)             
##                 3                 77 (25%)     0 (0%)             
##                 4                 74 (24%)     0 (0%)             
##                 quota                                      0.2    
##                 1                 6 (1.9%)     0 (0%)             
##                 10                8 (2.6%)     0 (0%)             
##                 11                5 (1.6%)    1 (33%)             
##                 12                7 (2.3%)     0 (0%)             
##                 13                6 (1.9%)     0 (0%)             
##                 14                6 (1.9%)     0 (0%)             
##                 15                7 (2.3%)     0 (0%)             
##                 16                44 (14%)     0 (0%)             
##                 17                48 (15%)     0 (0%)             
##                 18               23 (7.4%)    1 (33%)             
##                 2                 5 (1.6%)     0 (0%)             
##                 3                 6 (1.9%)     0 (0%)             
##                 4                 7 (2.3%)     0 (0%)             
##                 5                 7 (2.3%)     0 (0%)             
##                 6                 5 (1.6%)     0 (0%)             
##                 7                 46 (15%)    1 (33%)             
##                 8                 45 (14%)     0 (0%)             
##                 9                30 (9.6%)     0 (0%)             
##                 female                                    >0.9    
##                 0                154 (50%)    2 (67%)             
##                 1                157 (50%)    1 (33%)             
##                 age_range                                 >0.9    
##                 1                117 (38%)    1 (33%)             
##                 2                116 (37%)    1 (33%)             
##                 3                 78 (25%)    1 (33%)             
##                 race                                       0.5    
##                 1                232 (75%)    2 (67%)             
##                 2                 40 (13%)     0 (0%)             
##                 3                 39 (13%)    1 (33%)             
##                 hispanic                                   0.8    
##                 0                274 (88%)    2 (67%)             
##                 1                 37 (12%)    1 (33%)             
##                 pc_cnum2                                   0.3    
##                 2                150 (48%)     0 (0%)             
##                 3                161 (52%)    3 (100%)            
##                 region                                    0.006   
##                 1                 66 (21%)     0 (0%)             
##                 2                 69 (22%)     0 (0%)             
##                 3                117 (38%)     0 (0%)             
##                 4                 59 (19%)    3 (100%)            
##                 parent                                    >0.9    
##                 0                144 (46%)    1 (33%)             
##                 1                167 (54%)    2 (67%)             
##                 marital                                    0.7    
##                 1                136 (44%)    2 (67%)             
##                 2                133 (43%)    1 (33%)             
##                 3                 42 (14%)     0 (0%)             
##                 edu                                        0.2    
##                 1                139 (45%)    3 (100%)            
##                 2                 66 (21%)     0 (0%)             
##                 3                106 (34%)     0 (0%)             
##                 income                                    >0.9    
##                 1                128 (41%)    1 (33%)             
##                 2                102 (33%)    1 (33%)             
##                 3                 81 (26%)    1 (33%)             
##                 community                                  0.7    
##                 1                 88 (28%)    1 (33%)             
##                 2                166 (53%)    2 (67%)             
##                 3                 57 (18%)     0 (0%)             
##               ----------------------------------------------------
##                 n (%)                                             
##                 Pearson's Chi-squared test                        
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "straight_line_pc"
##                Characteristic   0, N = 304   1, N = 10   p-value  
##              -----------------------------------------------------
##                subjectindex                                0.3    
##                1                 80 (26%)     2 (20%)             
##                2                 76 (25%)     5 (50%)             
##                3                 76 (25%)     1 (10%)             
##                4                 72 (24%)     2 (20%)             
##                quota                                       0.4    
##                1                 6 (2.0%)     0 (0%)              
##                10                7 (2.3%)     1 (10%)             
##                11                5 (1.6%)     1 (10%)             
##                12                7 (2.3%)     0 (0%)              
##                13                6 (2.0%)     0 (0%)              
##                14                6 (2.0%)     0 (0%)              
##                15                6 (2.0%)     1 (10%)             
##                16                43 (14%)     1 (10%)             
##                17                48 (16%)     0 (0%)              
##                18               22 (7.2%)     2 (20%)             
##                2                 5 (1.6%)     0 (0%)              
##                3                 6 (2.0%)     0 (0%)              
##                4                 7 (2.3%)     0 (0%)              
##                5                 6 (2.0%)     1 (10%)             
##                6                 5 (1.6%)     0 (0%)              
##                7                 45 (15%)     2 (20%)             
##                8                 44 (14%)     1 (10%)             
##                9                30 (9.9%)     0 (0%)              
##                female                                      0.7    
##                0                150 (49%)     6 (60%)             
##                1                154 (51%)     4 (40%)             
##                age_range                                   0.9    
##                1                114 (38%)     4 (40%)             
##                2                114 (38%)     3 (30%)             
##                3                 76 (25%)     3 (30%)             
##                race                                        0.2    
##                1                229 (75%)     5 (50%)             
##                2                 37 (12%)     3 (30%)             
##                3                 38 (13%)     2 (20%)             
##                hispanic                                    0.8    
##                0                268 (88%)     8 (80%)             
##                1                 36 (12%)     2 (20%)             
##                pc_cnum2                                   >0.9    
##                2                145 (48%)     5 (50%)             
##                3                159 (52%)     5 (50%)             
##                region                                     0.10    
##                1                 65 (21%)     1 (10%)             
##                2                 68 (22%)     1 (10%)             
##                3                114 (38%)     3 (30%)             
##                4                 57 (19%)     5 (50%)             
##                parent                                      0.5    
##                0                142 (47%)     3 (30%)             
##                1                162 (53%)     7 (70%)             
##                marital                                    >0.9    
##                1                133 (44%)     5 (50%)             
##                2                130 (43%)     4 (40%)             
##                3                 41 (13%)     1 (10%)             
##                edu                                         0.3    
##                1                136 (45%)     6 (60%)             
##                2                 63 (21%)     3 (30%)             
##                3                105 (35%)     1 (10%)             
##                income                                      0.5    
##                1                124 (41%)     5 (50%)             
##                2                 99 (33%)     4 (40%)             
##                3                 81 (27%)     1 (10%)             
##                community                                   0.2    
##                1                 84 (28%)     5 (50%)             
##                2                163 (54%)     5 (50%)             
##                3                 57 (19%)     0 (0%)              
##              -----------------------------------------------------
##                n (%)                                              
##                Pearson's Chi-squared test                         
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "always_left_cc"
##                Characteristic   0, N = 208   1, N = 106   p-value  
##              ------------------------------------------------------
##                subjectindex                                 0.4    
##                1                 52 (25%)     30 (28%)             
##                2                 59 (28%)     22 (21%)             
##                3                 47 (23%)     30 (28%)             
##                4                 50 (24%)     24 (23%)             
##                quota                                       0.15    
##                1                 4 (1.9%)     2 (1.9%)             
##                10                8 (3.8%)      0 (0%)              
##                11                5 (2.4%)     1 (0.9%)             
##                12                3 (1.4%)     4 (3.8%)             
##                13                5 (2.4%)     1 (0.9%)             
##                14                5 (2.4%)     1 (0.9%)             
##                15                4 (1.9%)     3 (2.8%)             
##                16                35 (17%)     9 (8.5%)             
##                17                27 (13%)     21 (20%)             
##                18               12 (5.8%)     12 (11%)             
##                2                 3 (1.4%)     2 (1.9%)             
##                3                 3 (1.4%)     3 (2.8%)             
##                4                 7 (3.4%)      0 (0%)              
##                5                 4 (1.9%)     3 (2.8%)             
##                6                 3 (1.4%)     2 (1.9%)             
##                7                 33 (16%)     14 (13%)             
##                8                 30 (14%)     15 (14%)             
##                9                17 (8.2%)     13 (12%)             
##                female                                      >0.9    
##                0                104 (50%)     52 (49%)             
##                1                104 (50%)     54 (51%)             
##                age_range                                   0.001   
##                1                 92 (44%)     26 (25%)             
##                2                 74 (36%)     43 (41%)             
##                3                 42 (20%)     37 (35%)             
##                race                                         0.2    
##                1                148 (71%)     86 (81%)             
##                2                 30 (14%)    10 (9.4%)             
##                3                 30 (14%)    10 (9.4%)             
##                hispanic                                    >0.9    
##                0                182 (88%)     94 (89%)             
##                1                 26 (13%)     12 (11%)             
##                pc_cnum2                                     0.7    
##                2                 97 (47%)     53 (50%)             
##                3                111 (53%)     53 (50%)             
##                region                                       0.3    
##                1                 50 (24%)     16 (15%)             
##                2                 45 (22%)     24 (23%)             
##                3                 72 (35%)     45 (42%)             
##                4                 41 (20%)     21 (20%)             
##                parent                                      0.043   
##                0                105 (50%)     40 (38%)             
##                1                103 (50%)     66 (62%)             
##                marital                                      0.7    
##                1                 88 (42%)     50 (47%)             
##                2                 92 (44%)     42 (40%)             
##                3                 28 (13%)     14 (13%)             
##                edu                                          0.9    
##                1                 96 (46%)     46 (43%)             
##                2                 42 (20%)     24 (23%)             
##                3                 70 (34%)     36 (34%)             
##                income                                      >0.9    
##                1                 86 (41%)     43 (41%)             
##                2                 67 (32%)     36 (34%)             
##                3                 55 (26%)     27 (25%)             
##                community                                    0.8    
##                1                 61 (29%)     28 (26%)             
##                2                111 (53%)     57 (54%)             
##                3                 36 (17%)     21 (20%)             
##              ------------------------------------------------------
##                n (%)                                               
##                Pearson's Chi-squared test                          
## 
## Column names: label, stat_1, stat_2, p.value
## [1] "always_right_cc"
##                      Characteristic   0, N = 314   p-value  
##                    -----------------------------------------
##                      subjectindex                           
##                      1                 82 (26%)             
##                      2                 81 (26%)             
##                      3                 77 (25%)             
##                      4                 74 (24%)             
##                      quota                                  
##                      1                 6 (1.9%)             
##                      10                8 (2.5%)             
##                      11                6 (1.9%)             
##                      12                7 (2.2%)             
##                      13                6 (1.9%)             
##                      14                6 (1.9%)             
##                      15                7 (2.2%)             
##                      16                44 (14%)             
##                      17                48 (15%)             
##                      18               24 (7.6%)             
##                      2                 5 (1.6%)             
##                      3                 6 (1.9%)             
##                      4                 7 (2.2%)             
##                      5                 7 (2.2%)             
##                      6                 5 (1.6%)             
##                      7                 47 (15%)             
##                      8                 45 (14%)             
##                      9                30 (9.6%)             
##                      female                                 
##                      0                156 (50%)             
##                      1                158 (50%)             
##                      age_range                              
##                      1                118 (38%)             
##                      2                117 (37%)             
##                      3                 79 (25%)             
##                      race                                   
##                      1                234 (75%)             
##                      2                 40 (13%)             
##                      3                 40 (13%)             
##                      hispanic                               
##                      0                276 (88%)             
##                      1                 38 (12%)             
##                      pc_cnum2                               
##                      2                150 (48%)             
##                      3                164 (52%)             
##                      region                                 
##                      1                 66 (21%)             
##                      2                 69 (22%)             
##                      3                117 (37%)             
##                      4                 62 (20%)             
##                      parent                                 
##                      0                145 (46%)             
##                      1                169 (54%)             
##                      marital                                
##                      1                138 (44%)             
##                      2                134 (43%)             
##                      3                 42 (13%)             
##                      edu                                    
##                      1                142 (45%)             
##                      2                 66 (21%)             
##                      3                106 (34%)             
##                      income                                 
##                      1                129 (41%)             
##                      2                103 (33%)             
##                      3                 82 (26%)             
##                      community                              
##                      1                 89 (28%)             
##                      2                168 (54%)             
##                      3                 57 (18%)             
##                    -----------------------------------------
##                      n (%)                                  
## 
## Column names: label, stat_1, p.value
## [1] "straight_line_cc"
##                Characteristic   0, N = 208   1, N = 106   p-value  
##              ------------------------------------------------------
##                subjectindex                                 0.4    
##                1                 52 (25%)     30 (28%)             
##                2                 59 (28%)     22 (21%)             
##                3                 47 (23%)     30 (28%)             
##                4                 50 (24%)     24 (23%)             
##                quota                                       0.15    
##                1                 4 (1.9%)     2 (1.9%)             
##                10                8 (3.8%)      0 (0%)              
##                11                5 (2.4%)     1 (0.9%)             
##                12                3 (1.4%)     4 (3.8%)             
##                13                5 (2.4%)     1 (0.9%)             
##                14                5 (2.4%)     1 (0.9%)             
##                15                4 (1.9%)     3 (2.8%)             
##                16                35 (17%)     9 (8.5%)             
##                17                27 (13%)     21 (20%)             
##                18               12 (5.8%)     12 (11%)             
##                2                 3 (1.4%)     2 (1.9%)             
##                3                 3 (1.4%)     3 (2.8%)             
##                4                 7 (3.4%)      0 (0%)              
##                5                 4 (1.9%)     3 (2.8%)             
##                6                 3 (1.4%)     2 (1.9%)             
##                7                 33 (16%)     14 (13%)             
##                8                 30 (14%)     15 (14%)             
##                9                17 (8.2%)     13 (12%)             
##                female                                      >0.9    
##                0                104 (50%)     52 (49%)             
##                1                104 (50%)     54 (51%)             
##                age_range                                   0.001   
##                1                 92 (44%)     26 (25%)             
##                2                 74 (36%)     43 (41%)             
##                3                 42 (20%)     37 (35%)             
##                race                                         0.2    
##                1                148 (71%)     86 (81%)             
##                2                 30 (14%)    10 (9.4%)             
##                3                 30 (14%)    10 (9.4%)             
##                hispanic                                    >0.9    
##                0                182 (88%)     94 (89%)             
##                1                 26 (13%)     12 (11%)             
##                pc_cnum2                                     0.7    
##                2                 97 (47%)     53 (50%)             
##                3                111 (53%)     53 (50%)             
##                region                                       0.3    
##                1                 50 (24%)     16 (15%)             
##                2                 45 (22%)     24 (23%)             
##                3                 72 (35%)     45 (42%)             
##                4                 41 (20%)     21 (20%)             
##                parent                                      0.043   
##                0                105 (50%)     40 (38%)             
##                1                103 (50%)     66 (62%)             
##                marital                                      0.7    
##                1                 88 (42%)     50 (47%)             
##                2                 92 (44%)     42 (40%)             
##                3                 28 (13%)     14 (13%)             
##                edu                                          0.9    
##                1                 96 (46%)     46 (43%)             
##                2                 42 (20%)     24 (23%)             
##                3                 70 (34%)     36 (34%)             
##                income                                      >0.9    
##                1                 86 (41%)     43 (41%)             
##                2                 67 (32%)     36 (34%)             
##                3                 55 (26%)     27 (25%)             
##                community                                    0.8    
##                1                 61 (29%)     28 (26%)             
##                2                111 (53%)     57 (54%)             
##                3                 36 (17%)     21 (20%)             
##              ------------------------------------------------------
##                n (%)                                               
##                Pearson's Chi-squared test                          
## 
## Column names: label, stat_1, stat_2, p.value

9.4 Vertical bias in kaizen tasks

We will assess vertical bias in the kaizen tasks and run chi-square tests on whether these behaviors are associated with experimental or respondent characteristics.

# create vertical selection variable
kz2_it$vertical = ifelse(kz2_it$final_choice == "1|2|3|4" |
                           kz2_it$final_choice == "0|2|3|4" |
                           kz2_it$final_choice == "0|1|3|4" |
                           kz2_it$final_choice == "0|1|2|4" |
                           kz2_it$final_choice == "0|1|2|3", 1, 0)
table(kz2_it$vertical)
## 
##    0    1 
## 2937  203
# assess whether vertical selection is associated with block, ASO, pc_cnum2, tnum2
kz2_it %>% select(subjectindex, tnum2, pc_cnum2, vertical) %>% 
  mutate_if(is.numeric, as.character) %>%
  tbl_summary(by = "vertical") %>% add_p(everything() ~ "chisq.test") %>% 
  as_hux_table()

Characteristic

0, N = 2,937

1, N = 203

p-value

subjectindex<0.001
1787 (27%)33 (16%)
2766 (26%)44 (22%)
3708 (24%)62 (31%)
4676 (23%)64 (32%)
tnum20.2
10298 (10%)16 (7.9%)
11295 (10%)19 (9.4%)
2299 (10%)15 (7.4%)
3291 (9.9%)23 (11%)
4295 (10%)19 (9.4%)
5294 (10%)20 (9.9%)
6281 (9.6%)33 (16%)
7292 (9.9%)22 (11%)
8299 (10%)15 (7.4%)
9293 (10.0%)21 (10%)
pc_cnum2<0.001
21,428 (49%)72 (35%)
31,509 (51%)131 (65%)
n (%)
Pearson's Chi-squared test
# create 'vertical_bias'
resp_i$vertical_bias = 0
for (i in 1:length(uniq_ids)) {
  a = sum(kz2_it$vertical[kz2_it == uniq_ids[i]])
  if (a == 10) {resp_i$vertical_bias[i] = 1}
}
table(resp_i$vertical_bias)
## 
##   0   1 
## 313   1
# assess whether vertical bias is associated with respondent and \\
# experimental characteristics 
resp_i %>% select(subjectindex, quota, female, age_range, race, hispanic, 
  pc_cnum2, region, parent, marital, edu, income, community, vertical_bias) %>% 
  mutate_if(is.numeric, as.character) %>%
  tbl_summary(by = "vertical_bias") %>% add_p(everything() ~ "chisq.test") %>% 
  as_hux_table()

Characteristic

0, N = 313

1, N = 1

p-value

subjectindex0.4
182 (26%)0 (0%)
281 (26%)0 (0%)
377 (25%)0 (0%)
473 (23%)1 (100%)
quota0.8
16 (1.9%)0 (0%)
108 (2.6%)0 (0%)
116 (1.9%)0 (0%)
127 (2.2%)0 (0%)
136 (1.9%)0 (0%)
146 (1.9%)0 (0%)
157 (2.2%)0 (0%)
1644 (14%)0 (0%)
1748 (15%)0 (0%)
1823 (7.3%)1 (100%)
25 (1.6%)0 (0%)
36 (1.9%)0 (0%)
47 (2.2%)0 (0%)
57 (2.2%)0 (0%)
65 (1.6%)0 (0%)
747 (15%)0 (0%)
845 (14%)0 (0%)
930 (9.6%)0 (0%)
female>0.9
0155 (50%)1 (100%)
1158 (50%)0 (0%)
age_range0.2
1118 (38%)0 (0%)
2117 (37%)0 (0%)
378 (25%)1 (100%)
race0.8
1233 (74%)1 (100%)
240 (13%)0 (0%)
340 (13%)0 (0%)
hispanic>0.9
0275 (88%)1 (100%)
138 (12%)0 (0%)
pc_cnum2>0.9
2150 (48%)0 (0%)
3163 (52%)1 (100%)
region0.6
166 (21%)0 (0%)
269 (22%)0 (0%)
3116 (37%)1 (100%)
462 (20%)0 (0%)
parent>0.9
0144 (46%)1 (100%)
1169 (54%)0 (0%)
marital0.5
1137 (44%)1 (100%)
2134 (43%)0 (0%)
342 (13%)0 (0%)
edu0.4
1142 (45%)0 (0%)
266 (21%)0 (0%)
3105 (34%)1 (100%)
income0.2
1129 (41%)0 (0%)
2103 (33%)0 (0%)
381 (26%)1 (100%)
community0.6
189 (28%)0 (0%)
2167 (53%)1 (100%)
357 (18%)0 (0%)
n (%)
Pearson's Chi-squared test

10 Likelihood analysis

# coma comparisons
cc2_it$A1<-ifelse(cc2_it$actual_choice==1, cc2_it$alt2,cc2_it$alt1)
cc2_it$A2<-ifelse(cc2_it$actual_choice==1, cc2_it$alt1,cc2_it$alt2)
cc3_it<- subset(cc2_it, select=c("id","subjectindex", "task", "tnum2", "A1", "A2"))
cc3_ita<-melt(cc3_it, id.vars = c("id","subjectindex", "task", "tnum2"))
cc3_ita$set <- 0

# paired comparisons
pc2_it$A1<-ifelse(pc2_it$actual_choice==1, pc2_it$alt2,pc2_it$alt1)
pc2_it$A2<-ifelse(pc2_it$actual_choice==1, pc2_it$alt1,pc2_it$alt2)
pc3_it<- subset(pc2_it, select=c("id","subjectindex", "task","tnum2", "A1", "A2"))
pc3_ita<-melt(pc3_it, id.vars = c("id", "subjectindex", "task","tnum2"))
pc3_ita$set <- 0

# kaizen tasks
kz3_it<- subset(kz2_it, select=c("id","subjectindex", "task", "tnum2", "actual_choice", "alt1", "alt2"))
kz3_it$a1<-as.numeric(substr(kz3_it$actual_choice,1,1))
kz3_it$a2<-as.numeric(substr(kz3_it$actual_choice,3,3))
kz3_it$a3<-as.numeric(substr(kz3_it$actual_choice,5,5))
kz3_it$a4<-as.numeric(substr(kz3_it$actual_choice,7,7))

# Set 1 of kaizen tasks
set1 <- subset(kz3_it, select=c("id","subjectindex", "task","tnum2"))

# Apply the function to generate A1, A2, A3, and A4 columns
set1$A1 <- mapply(generate_A, kz3_it$a1, kz3_it$alt1, kz3_it$alt2)
set1$A2 <- mapply(generate_A, kz3_it$a2, kz3_it$alt1, kz3_it$alt2)
set1$A3 <- mapply(generate_A, kz3_it$a3, kz3_it$alt1, kz3_it$alt2)
set1$A4 <- mapply(generate_A, kz3_it$a4, kz3_it$alt1, kz3_it$alt2)
set1_ita<-melt(set1, id.vars = c("id", "subjectindex", "task","tnum2"))
set1_ita$set <- 1

# Set 2 of kaizen tasks
set2 <- subset(kz3_it, select=c("id","subjectindex", "task","tnum2"))

# Apply the function to generate A1, A2, A3, A4, A5, A6 column
set2$A1 <- mapply(generate_A2, kz3_it$a1, kz3_it$a2, as.character(kz3_it$alt1), as.character(kz3_it$alt2))
set2$A2 <- mapply(generate_A2, kz3_it$a1, kz3_it$a3, as.character(kz3_it$alt1), as.character(kz3_it$alt2))
set2$A3 <- mapply(generate_A2, kz3_it$a1, kz3_it$a4, as.character(kz3_it$alt1), as.character(kz3_it$alt2))
set2$A4 <- mapply(generate_A2, kz3_it$a2, kz3_it$a3, as.character(kz3_it$alt1), as.character(kz3_it$alt2))
set2$A5 <- mapply(generate_A2, kz3_it$a2, kz3_it$a4, as.character(kz3_it$alt1), as.character(kz3_it$alt2))
set2$A6 <- mapply(generate_A2, kz3_it$a3, kz3_it$a4, as.character(kz3_it$alt1), as.character(kz3_it$alt2))
set2_ita<-melt(set2, id.vars = c("id","subjectindex", "task", "tnum2"))
set2_ita$set <- 2

# Set 3 of kaizen tasks
set3 <- subset(kz3_it, select=c("id","subjectindex", "task","tnum2"))

# Apply the function to generate A1, A2, A3, and A4 columns
set3$A1 <- mapply(generate_A, kz3_it$a4, kz3_it$alt2, kz3_it$alt1)
set3$A2 <- mapply(generate_A, kz3_it$a3, kz3_it$alt2, kz3_it$alt1)
set3$A3 <- mapply(generate_A, kz3_it$a2, kz3_it$alt2, kz3_it$alt1)
set3$A4 <- mapply(generate_A, kz3_it$a1, kz3_it$alt2, kz3_it$alt1)
set3_ita<-melt(set3, id.vars = c("id","subjectindex", "task","tnum2"))
set3_ita$set <- 3

# combine sets
kz3_ita <- rbind(set1_ita,set2_ita,set3_ita)

# combine task
task_ita <- rbind(cc3_ita, pc3_ita, kz3_ita)
task_it <- dcast(task_ita, id+set+subjectindex+task+tnum2~variable)

# compute probability of A1 by subjectindex, task, and set
mu_f <- task_it %>% group_by(subjectindex, task, set, A1) %>%  summarize(f=n())
mu_N <- task_it %>% group_by(subjectindex, task, set) %>%  summarize(N=n())
mu_fN <- merge(mu_f, mu_N, by = c("subjectindex", "task", "set"))
mu_fN$P<- mu_fN$f/ mu_fN$N
mu_fN <- subset(mu_fN, select =c("subjectindex", "task", "set", "A1", "P") )

# compute the log-likelihood of each respondent
task_it <- merge(task_it, mu_fN, by = c("subjectindex", "task", "set", "A1"))
task_it$lnP <- log(task_it$P)
ll_i <- task_it[,c("id","lnP")] %>% group_by(id) %>%  summarize(ll=sum(lnP))
names(ll_i)[2] = "all_ll"
cc_ll_i <- task_it[task_it$tnum2<=6 & task_it$set==0,c("id","lnP")] %>% 
  group_by(id) %>% summarize(ll=sum(lnP))
names(cc_ll_i)[2] = "cc_ll"
pc_ll_i <- task_it[task_it$tnum2>6 & task_it$set==0,c("id","lnP")] %>% 
  group_by(id) %>%  summarize(ll=sum(lnP))
names(pc_ll_i)[2] = "pc_ll"
kz_ll_i <- task_it[task_it$set>0,c("id","lnP")] %>% group_by(id) %>%  summarize(ll=sum(lnP))
names(kz_ll_i)[2] = "kz_ll"

# merge data
ll_i <- merge(ll_i, cc_ll_i, by = c("id"))
ll_i <- merge(ll_i, pc_ll_i, by = c("id"))
ll_i <- merge(ll_i, kz_ll_i, by = c("id"))

# plot histograms
hist(ll_i$all_ll, xlab = "Log-likelihood", main = "All three components")

hist(ll_i$cc_ll, xlab = "Log-likelihood", main = "Coma comparisons")

hist(ll_i$pc_ll, xlab = "Log-likelihood", main = "Paired comparisons")

hist(ll_i$kz_ll, xlab = "Log-likelihood", main = "Kaizen tasks")