MainDataanalysisthesis

Libraries

library(readxl)
library(readr)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ purrr     1.0.4
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.2     ✔ tibble    3.2.1
✔ lubridate 1.9.4     ✔ tidyr     1.3.1
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(tidyr)
library(dplyr)
library(lme4)
Loading required package: Matrix

Attaching package: 'Matrix'

The following objects are masked from 'package:tidyr':

    expand, pack, unpack
library(emmeans)
Welcome to emmeans.
Caution: You lose important information if you filter this package's results.
See '? untidy'
library(rstanarm)
Loading required package: Rcpp
This is rstanarm version 2.32.1
- See https://mc-stan.org/rstanarm/articles/priors for changes to default priors!
- Default priors may change, so it's safest to specify priors, even if equivalent to the defaults.
- For execution on a local, multicore CPU with excess RAM we recommend calling
  options(mc.cores = parallel::detectCores())
library(ggplot2)
library(effects)
Loading required package: carData
lattice theme set by effectsTheme()
See ?effectsTheme for details.
library(car)

Attaching package: 'car'

The following object is masked from 'package:rstanarm':

    logit

The following object is masked from 'package:dplyr':

    recode

The following object is masked from 'package:purrr':

    some
library(DHARMa)
This is DHARMa 0.4.7. For overview type '?DHARMa'. For recent changes, type news(package = 'DHARMa')
library(robustlmm)
packageVersion("ggplot2")
[1] '3.5.2'
library(lmerTest)          

Attaching package: 'lmerTest'

The following object is masked from 'package:lme4':

    lmer

The following object is masked from 'package:stats':

    step

Import behavioural

T_B <-read.csv("all_excluded2.csv", sep = ";" )
Q_D <-read.csv("Questionaire_Data3.csv", sep = ";")

Data prep RT

##Only include response procedre entires 

T_B_R <- T_B %>% filter(procedure == "responsprocedure")
##Create trial numbers 
df <- T_B_R %>%
  arrange(subject, session) %>%
  group_by(subject, session) %>%
  # whenever `step == 1`, start a new trial. cumsum(TRUE/FALSE) → 1,1,…,2,2,…,3,3,…
  mutate(
    trial = cumsum(sub.trial.number == 1)
  ) %>%
  ungroup()


##Create Trial Accuracy 
df <- df %>% mutate(feedback.ACC = as.numeric(feedback.ACC), feedback.RT = as.numeric(feedback.RT))
df <- df %>%
  group_by(subject, session, trial) %>%
  mutate(trial.acc = sum(feedback.ACC, na.rm = TRUE) / n()) %>%
  ungroup()

##Make trial avhg RT
df <- df %>%
  group_by(subject, session, trial) %>%
  mutate(trial.RT = sum(feedback.RT, na.rm = TRUE) / n()) %>%
  ungroup()

write.csv(df,"Philipp_df.csv", row.names = FALSE)

##Make dataframe with only above 80% trial accuracy 

df_acc <- df

#Create backup before excluding outliers(Needed later)
df_acc_no_filter <-df_acc

df_B4_No <- df_acc %>% filter(session == 4)
df_B5_No <- df_acc %>% filter(session == 5)

# Step 1: Exclude universally too-fast or too-slow RTs
#df_acc <- df_acc%>%
 # filter(feedback.RT >= 150, feedback.RT <= 3000)

# Step 2: Exclude outliers based on ±3 SD within each participant
#df_acc <- df_acc %>%
 # group_by(subject) %>%
  #mutate(meanRT = mean(feedback.RT, na.rm = TRUE),
  #       sdRT = sd(feedback.RT, na.rm = TRUE)) %>%
#  filter(feedback.RT >= meanRT - 3 * sdRT,
 #        feedback.RT <= meanRT + 3 * sdRT) %>%
  #ungroup() %>%
#  select(-meanRT, -sdRT)  # Clean up if not needed



#Plot by block
df_B1 <- df_acc %>% filter(session == 1)
df_B2 <- df_acc %>% filter(session == 2)
df_B3 <- df_acc %>% filter(session == 3)
df_B4 <- df_acc %>% filter(session == 4)
df_B5 <- df_acc %>% filter(session == 5)

df_rt_learning_all <- bind_rows(df_B1,df_B2,df_B3)




B4 <- df_B4 %>%
  group_by(trial, subject, session) %>%
  mutate(trial_length = n_distinct(sub.trial.number)) %>%
  ungroup()


B5 <- df_B5 %>% 
  group_by(trial, subject, session) %>%
  mutate(trial_length = n_distinct(sub.trial.number)) %>%
  ungroup()


#––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––#
# STEP 2: Split each block‐dataframe into the subsets for each length
# (here I use 6, 12, 18 as in your θ_ERDS example; adjust if your RT‐data has different lengths)

# 6‐step trials:
B4_6  <- B4 %>% filter(trial_length == 6)
B5_6  <- B5 %>% filter(trial_length == 6)

# 12‐step trials:
B4_12 <- B4 %>% filter(trial_length == 12)
B5_12 <- B5 %>% filter(trial_length == 12)

# 18‐step trials:
B4_18 <- B4 %>% filter(trial_length == 18)
B5_18 <- B5 %>% filter(trial_length == 18)




#––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––#
# STEP 3: For each length, combine block 4 + block 5 and add a “cond” column

# 6‐step:
df_RT6  <- bind_rows(
  B4_6  %>% mutate(cond = "Familiar"),
  B5_6  %>% mutate(cond = "Unfamiliar")
)

# 12‐step:
df_RT12 <- bind_rows(
  B4_12 %>% mutate(cond = "Familiar"),
  B5_12 %>% mutate(cond = "Unfamiliar")
)

# 18‐step:
df_RT18 <- bind_rows(
  B4_18 %>% mutate(cond = "Familiar"),
  B5_18 %>% mutate(cond = "Unfamiliar")
)


#---- 4A) 6‐step RT model
df_RT6 <- df_RT6 %>%
  mutate(
    cond   = factor(cond,   levels = c("Familiar", "Unfamiliar")),
    step_f = factor(sub.trial.number)   # will become “step 1” .. “step 6”
  )


#---- 4B) 12‐step RT model
df_RT12 <- df_RT12 %>%
  mutate(
    cond   = factor(cond,   levels = c("Familiar", "Unfamiliar")),
    step_f = factor(sub.trial.number)   # levels “1”..“12”
  )

#---- 4C) 18‐step RT model
df_RT18 <- df_RT18 %>%
  mutate(
    cond   = factor(cond,   levels = c("Familiar", "Unfamiliar")),
    step_f = factor(sub.trial.number)   # levels “1”..“18”
  )

df_rt_test_all<- bind_rows(df_RT6,df_RT12,df_RT18)
# (Optional) write each contrast table to CSV:
# write.csv(contrast_df_6,  "Block4vs5_RT_6step_contrasts.csv",  row.names = FALSE)
# write.csv(contrast_df_12, "Block4vs5_RT_12step_contrasts.csv", row.names = FALSE)
# write.csv(contrast_df_18, "Block4vs5_RT_18step_contrasts.csv", row.names = FALSE)
dir_path2 <- "/Users/philippschwarzmann/Desktop/Master HFE/Thesis /Data Analysis /Python_Results/Motion"

# Read and combine all CSV files into one data frame
Motor_Execution_EEG <- list.files(path = dir_path2, pattern = "\\.csv$", full.names = TRUE) %>%
  map_dfr(read_csv)
Rows: 9318 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9387 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 1008 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9333 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9459 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9360 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9339 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Rows: 9927 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (2): segment, channel
dbl (7): participant, block, trial, theta_power, beta_power, theta_rel, beta...

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Data prep ERDS

#Clean up and format 

Motor_Execution_EEG <-Motor_Execution_EEG %>% mutate(participant = as.factor(participant), block = as.factor(block), trial = as.factor(trial), segment = as.factor(segment), channel = as.factor(channel))



#Clean Extra blocks

Motor_Execution_EEG <- Motor_Execution_EEG %>%
  # 0. Make sure participant really is numeric
  mutate(participant = as.numeric(as.character(participant)),
         block       = as.numeric(as.character(block))) %>%
  
  # 1. Drop the unwanted blocks:
  #    - p 3, 7, 11: drop block 1
  #    - p 12:        drop block 2
  filter(
    !(participant %in% c(3,7,11) & block == 1),
    !(participant == 12        & block == 2)
  ) %>%
  
  # 2. Shift down the remaining block numbers:
  mutate(block = case_when(
    participant %in% c(3,7,11) & block >= 2 ~ block - 1,
    participant == 12          & block >= 3 ~ block - 1,
    TRUE                                  ~ block
  )) %>%
  
  # 3. Back to a factor with levels 1–5
  mutate(block = factor(block, levels = 1:5), participant = as.factor(participant))





Motor_ex_CZ <- Motor_Execution_EEG %>% filter(channel=="Cz")  

library(dplyr)
  Motor_ex_CZ <- Motor_ex_CZ %>%
  mutate(segment = factor(segment, levels = c("baseline", paste0("step", 1:18))))

df_erds <- Motor_ex_CZ %>%
  # 1. extract one baseline-per-trial (mean if multiple)
  filter(segment == "baseline") %>%
  group_by(participant, block, trial) %>%
  summarise(baseline_theta = mean(theta_power, na.rm = TRUE),
            .groups = "drop") %>%

  # 2. join back & compute ERDS for every row
  right_join(Motor_ex_CZ, by = c("participant", "block", "trial")) %>%
  mutate(
    theta_erds = case_when(
      segment == "baseline" ~ 0,  # or NA, if you prefer
      TRUE ~ 100 * (theta_power - baseline_theta) / baseline_theta
    )
  ) %>%
  select(-baseline_theta)





q_high <- quantile(df_erds$theta_erds, 0.95, na.rm = TRUE)
q_low <- quantile(df_erds$theta_erds, 0.05, na.rm = TRUE)

df_erds$theta_erds_wins <- pmax(pmin(df_erds$theta_erds, q_high), q_low)
df_erds <- df_erds %>% mutate(step= segment ) %>% filter (segment != "baseline")

#transform eeg data for merge
df_erds <- df_erds %>%
  # (1) Make sure block & trial are numeric
  mutate(
    block = as.integer(block),
    trial = as.integer(trial)
  ) %>%
  # (2) Within each block, re-rank the trial values to 1–48
  group_by(block,participant) %>%
  mutate(trial = dense_rank(trial)) %>%
  ungroup()

df_erds<- df_erds %>% mutate(block=as.factor(block),trial=as.factor(trial))

CZ_B1 <- df_erds %>% filter(block==1, step != "baseline", step !="step12",step !="step11",step !="step10",step !="step9",step !="step8",step !="step7") 
CZ_B2 <- df_erds %>% filter(block==2,step != "baseline") 
CZ_B3 <- df_erds %>% filter(block==3, step != "baseline")
#df_erds <- df_erds %>% rename(step=segment)
CZ_B4 <- df_erds %>% filter(block==4, step != "baseline")
CZ_B5 <- df_erds %>% filter(block==5, step != "baseline")

df_erds_learning_all <- bind_rows(CZ_B1,CZ_B2,CZ_B3)

CZ_B3 %>% distinct(participant) %>% nrow
[1] 14
# Step 1: Compute trial_length per trial in each block
CZ_B4 <- CZ_B4 %>%
  group_by(trial, participant) %>%
  mutate(trial_length = n_distinct(step)) %>%
  ungroup()

CZ_B5 <- CZ_B5 %>%
  group_by(trial, participant) %>%
  mutate(trial_length = n_distinct(step)) %>%
  ungroup()

#––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––#
# Step 2: Make the subsets for each length

# 6‐step trials:
B4_6  <- CZ_B4 %>% filter(trial_length == 6)
B5_6  <- CZ_B5 %>% filter(trial_length == 6)

# 12‐step trials:
B4_12 <- CZ_B4 %>% filter(trial_length == 12)
B5_12 <- CZ_B5 %>% filter(trial_length == 12)

# 18‐step trials:
B4_18 <- CZ_B4 %>% filter(trial_length == 18)
B5_18 <- CZ_B5 %>% filter(trial_length == 18)

#––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––#
# Step 3: For each length, combine & label “Familiar” vs “Unfamiliar”

df_6  <- bind_rows(B4_6  %>% mutate(cond = "Familiar"),
                   B5_6  %>% mutate(cond = "Unfamiliar"))

df_12 <- bind_rows(B4_12 %>% mutate(cond = "Familiar"),
                   B5_12 %>% mutate(cond = "Unfamiliar"))

df_18 <- bind_rows(B4_18 %>% mutate(cond = "Familiar"),
                   B5_18 %>% mutate(cond = "Unfamiliar"))

df_trial_length_all <- bind_rows(df_6, df_12, df_18)

#––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––#
# Step 4A: Model & emmeans for 6‐step trials

df_6 <- df_6 %>%
  mutate(
    cond   = factor(cond, levels = c("Familiar", "Unfamiliar")),
    step_f = factor(step)   # e.g. levels = “step1”..“step6”
  )


df_12 <- df_12 %>%
  mutate(
    cond   = factor(cond, levels = c("Familiar", "Unfamiliar")),
    step_f = factor(step)   # levels = “step1”..“step12”
  )


df_18 <- df_18 %>%
  mutate(
    cond   = factor(cond, levels = c("Familiar", "Unfamiliar")),
    step_f = factor(step)   # levels = “step1”..“step18”
  )

#––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––#


df_erds_test_all <-bind_rows(df_6,df_12,df_18)






#transform eeg data for merge
#eeg_48T <- df_erds %>%
  # (1) Make sure block & trial are numeric
 # mutate(
  #  block = as.integer(block),
   # trial = as.integer(trial)
#  ) %>%
  # (2) Within each block, re-rank the trial values to 1–48
 # group_by(block) %>%
  #mutate(trial = dense_rank(trial)) %>%
#  ungroup()


#eeg_48T<- eeg_48T %>% rename(subject = participant, session = block ) %>% mutate(subject = as.factor(subject),session = as.factor(session),trial = as.factor(trial),step = as.character(segment)) %>% filter(step!= "baseline" )

#eeg_48T <- eeg_48T %>%
  # Option A: with stringr + as.integer()
 # mutate(sub.trial.number = as.factor(str_extract(step, "\\d+")))

  

#df_after_session_qestionaire <- df_after_session_qestionaire %>% mutate(trial = as.factor(trial), sub.trial.number = as.factor(sub.trial.number))

#join 
#Big_df <- df_after_session_qestionaire %>% left_join(eeg_48T,by= c("subject", "session","trial","sub.trial.number"))

#Big_df_acc <- Big_df %>% filter(trial.acc >= 0.80)

Merge

summary(df_erds_learning_all)
  participant    block         trial          segment      channel   
 2      : 1728   1: 4307   2      :  510   step1  : 2064   C3:    0  
 3      : 1728   2: 8061   3      :  510   step2  : 2064   C4:    0  
 4      : 1728   3:12093   5      :  510   step3  : 2064   Cz:24461  
 7      : 1728   4:    0   7      :  510   step4  : 2064             
 14     : 1728   5:    0   9      :  510   step5  : 2062             
 15     : 1728             15     :  510   step6  : 2053             
 (Other):14093             (Other):21401   (Other):12090             
  theta_power          beta_power          theta_rel        
 Min.   :2.250e-11   Min.   :7.220e-12   Min.   :   0.0025  
 1st Qu.:2.835e-09   1st Qu.:6.583e-10   1st Qu.:   0.7078  
 Median :9.166e-09   Median :1.967e-09   Median :   1.9239  
 Mean   :5.234e-08   Mean   :5.898e-09   Mean   :   7.6144  
 3rd Qu.:2.964e-08   3rd Qu.:4.740e-09   3rd Qu.:   5.1992  
 Max.   :9.619e-06   Max.   :5.489e-07   Max.   :5293.0001  
                                                            
    beta_rel           theta_erds        theta_erds_wins        step      
 Min.   :3.130e-03   Min.   :   -99.75   Min.   : -82.55   step1  : 2064  
 1st Qu.:9.351e-01   1st Qu.:   -29.22   1st Qu.: -29.22   step2  : 2064  
 Median :2.064e+00   Median :    92.39   Median :  92.39   step3  : 2064  
 Mean   :5.658e+00   Mean   :   661.44   Mean   : 351.36   step4  : 2064  
 3rd Qu.:4.646e+00   3rd Qu.:   419.92   3rd Qu.: 419.92   step5  : 2062  
 Max.   :1.329e+03   Max.   :529200.01   Max.   :2197.14   step6  : 2053  
                                                           (Other):12090  
summary(df_erds_test_all)
  participant   block        trial          segment     channel   
 2      :1152   1:   0   36     :  390   step1  :1341   C3:    0  
 3      :1152   2:   0   11     :  378   step2  :1341   C4:    0  
 4      :1152   3:   0   21     :  378   step3  :1341   Cz:16098  
 5      :1152   4:8064   16     :  372   step4  :1341             
 7      :1152   5:8034   1      :  366   step5  :1341             
 14     :1152            15     :  366   step6  :1341             
 (Other):9186            (Other):13848   (Other):8052             
  theta_power          beta_power          theta_rel        
 Min.   :3.320e-11   Min.   :5.770e-12   Min.   :  0.00286  
 1st Qu.:2.496e-09   1st Qu.:5.556e-10   1st Qu.:  0.73387  
 Median :8.108e-09   Median :1.717e-09   Median :  1.91934  
 Mean   :4.231e-08   Mean   :4.673e-09   Mean   :  6.32258  
 3rd Qu.:2.671e-08   3rd Qu.:4.410e-09   3rd Qu.:  4.96153  
 Max.   :3.416e-06   Max.   :5.266e-07   Max.   :913.67629  
                                                            
    beta_rel           theta_erds       theta_erds_wins        step     
 Min.   :2.844e-03   Min.   :  -99.71   Min.   : -82.55   step1  :1341  
 1st Qu.:9.464e-01   1st Qu.:  -26.61   1st Qu.: -26.61   step2  :1341  
 Median :2.049e+00   Median :   91.93   Median :  91.93   step3  :1341  
 Mean   :4.573e+00   Mean   :  532.26   Mean   : 330.59   step4  :1341  
 3rd Qu.:4.512e+00   3rd Qu.:  396.15   3rd Qu.: 396.15   step5  :1341  
 Max.   :2.532e+02   Max.   :91267.63   Max.   :2197.14   step6  :1341  
                                                          (Other):8052  
  trial_length           cond          step_f    
 Min.   : 6.00   Familiar  :8064   step1  :1341  
 1st Qu.:12.00   Unfamiliar:8034   step2  :1341  
 Median :18.00                     step3  :1341  
 Mean   :14.01                     step4  :1341  
 3rd Qu.:18.00                     step5  :1341  
 Max.   :18.00                     step6  :1341  
                                   (Other):8052  
summary(df_rt_learning_all)
    subject         session       procedure         sub.trial.number
 Min.   : 2.00   Min.   :1.000   Length:31968       Min.   : 1.000  
 1st Qu.: 7.00   1st Qu.:2.000   Class :character   1st Qu.: 4.000  
 Median :13.00   Median :3.000   Mode  :character   Median : 7.000  
 Mean   :12.59   Mean   :2.351                      Mean   : 7.554  
 3rd Qu.:18.00   3rd Qu.:3.000                      3rd Qu.:11.000  
 Max.   :23.00   Max.   :3.000                      Max.   :18.000  
  feedback.ACC    feedback.CRESP     feedback.RESP       feedback.RT     
 Min.   :0.0000   Length:31968       Length:31968       Min.   :    0.0  
 1st Qu.:1.0000   Class :character   Class :character   1st Qu.:  280.8  
 Median :1.0000   Mode  :character   Mode  :character   Median :  441.0  
 Mean   :0.8436                                         Mean   :  565.5  
 3rd Qu.:1.0000                                         3rd Qu.:  667.0  
 Max.   :1.0000                                         Max.   :26875.0  
      h             cue.OnsetTime      cue.OnsetDelay         trial      
 Length:31968       Length:31968       Length:31968       Min.   : 1.00  
 Class :character   Class :character   Class :character   1st Qu.:12.75  
 Mode  :character   Mode  :character   Mode  :character   Median :24.50  
                                                          Mean   :24.50  
                                                          3rd Qu.:36.25  
                                                          Max.   :48.00  
   trial.acc         trial.RT      
 Min.   :0.0000   Min.   :  68.92  
 1st Qu.:0.7222   1st Qu.: 356.10  
 Median :1.0000   Median : 486.94  
 Mean   :0.8436   Mean   : 565.54  
 3rd Qu.:1.0000   3rd Qu.: 695.67  
 Max.   :1.0000   Max.   :5071.50  
summary(df_rt_test_all)
    subject         session     procedure         sub.trial.number
 Min.   : 2.00   Min.   :4.0   Length:20736       Min.   : 1.00   
 1st Qu.: 7.00   1st Qu.:4.0   Class :character   1st Qu.: 3.75   
 Median :13.50   Median :4.5   Mode  :character   Median : 6.50   
 Mean   :12.61   Mean   :4.5                      Mean   : 7.50   
 3rd Qu.:18.00   3rd Qu.:5.0                      3rd Qu.:11.00   
 Max.   :23.00   Max.   :5.0                      Max.   :18.00   
                                                                  
  feedback.ACC    feedback.CRESP     feedback.RESP       feedback.RT     
 Min.   :0.0000   Length:20736       Length:20736       Min.   :    0.0  
 1st Qu.:1.0000   Class :character   Class :character   1st Qu.:  300.0  
 Median :1.0000   Mode  :character   Mode  :character   Median :  458.0  
 Mean   :0.8388                                         Mean   :  591.2  
 3rd Qu.:1.0000                                         3rd Qu.:  707.0  
 Max.   :1.0000                                         Max.   :24652.0  
                                                                         
      h             cue.OnsetTime      cue.OnsetDelay         trial      
 Length:20736       Length:20736       Length:20736       Min.   : 1.00  
 Class :character   Class :character   Class :character   1st Qu.:13.00  
 Mode  :character   Mode  :character   Mode  :character   Median :24.50  
                                                          Mean   :24.48  
                                                          3rd Qu.:36.00  
                                                          Max.   :48.00  
                                                                         
   trial.acc         trial.RT       trial_length         cond      
 Min.   :0.0000   Min.   :  82.0   Min.   : 6    Familiar  :10368  
 1st Qu.:0.7222   1st Qu.: 386.4   1st Qu.:12    Unfamiliar:10368  
 Median :1.0000   Median : 529.4   Median :15                      
 Mean   :0.8388   Mean   : 591.2   Mean   :14                      
 3rd Qu.:1.0000   3rd Qu.: 748.0   3rd Qu.:18                      
 Max.   :1.0000   Max.   :2930.8   Max.   :18                      
                                                                   
     step_f     
 1      : 1728  
 2      : 1728  
 3      : 1728  
 4      : 1728  
 5      : 1728  
 6      : 1728  
 (Other):10368  
#Clean names and unncecessary collumns 
df_erds_learning_all <-df_erds_learning_all %>% mutate(id = as.factor(participant)) %>%  select(id , block, trial, step , theta_erds_wins, theta_erds )

df_erds_test_all <- df_erds_test_all %>% mutate(id = as.factor(participant),difficulty = as.factor(trial_length) ) %>% select(id , block, trial, step , cond, difficulty, theta_erds_wins, theta_erds)

df_rt_learning_all <- df_rt_learning_all  %>% mutate(id = as.factor(subject), RT = feedback.RT , block = as.factor(session), step = as.factor(sub.trial.number), trial = as.factor(trial)) %>% select(id , block, trial, step , RT, trial.acc, trial.RT) 


df_rt_test_all <- df_rt_test_all %>% mutate(id = as.factor(subject), RT = feedback.RT , block = as.factor(session), step = step_f, difficulty = as.factor(trial_length), trial= as.factor(trial)) %>% select(id , block, trial, step , difficulty, cond, RT, trial.acc, trial.RT) 

#Remove Participants with no EEG data
df_rt_learning_all <- df_rt_learning_all %>% filter(!id %in% c("6","8","9","10","18","21","23"))
df_rt_test_all <- df_rt_test_all %>% filter(!id %in% c("6","8","9","10","18","21","23"))

#Reformat step variable
df_erds_learning_all <- df_erds_learning_all %>%
  mutate(step = str_remove(step, "step"))  # "step1" -> "1"
df_erds_test_all <- df_erds_test_all %>%
  mutate(step = str_remove(step, "step"))  # "step1" -> "1"

#Merge
df_learning <- df_rt_learning_all %>% inner_join(df_erds_learning_all, by = c("id", "block", "trial","step"))
df_test <- df_rt_test_all %>% inner_join(df_erds_test_all, by = c("id", "block", "trial","step","difficulty","cond"))

Exclude Data

df_learning_acc <- df_learning %>% filter(trial.acc >= 0.8)
df_test_acc <- df_test %>% filter(trial.acc >= 0.8)

#Step 1: Exclude universally too-fast or too-slow RTs
df_learning_acc <- df_learning_acc%>%
  filter(RT >= 150, RT <= 3000)

# Step 2: Exclude outliers based on ±3 SD within each participant
df_learning_acc <- df_learning_acc %>%
  group_by(id) %>%
  mutate(meanRT = mean(RT, na.rm = TRUE),
         sdRT = sd(RT, na.rm = TRUE)) %>%
  filter(RT >= meanRT - 3 * sdRT,
         RT <= meanRT + 3 * sdRT) %>%
  ungroup() %>%
  select(-meanRT, -sdRT)  # Clean up if not needed

df_test_acc <- df_test_acc%>%
  filter(RT >= 150, RT <= 3000)

df_test_acc <- df_test_acc %>%
  group_by(id) %>%
  mutate(meanRT = mean(RT, na.rm = TRUE),
         sdRT = sd(RT, na.rm = TRUE)) %>%
  filter(RT >= meanRT - 3 * sdRT,
         RT <= meanRT + 3 * sdRT) %>%
  ungroup() %>%
  select(-meanRT, -sdRT)  # Clean up if not needed

df_learning_acc %>%  nrow()
[1] 15773
df_test_acc  %>%  nrow()
[1] 9556

Models theta learning

# Fit with ML for valid likelihood-ratio test
  M1_theta_learning <- lmer(theta_erds_wins ~ step * block + (1 | id) + (1 | trial) + (1 | trial)+ (1 | block),
             data = df_learning_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 18 columns / coefficients
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 1 negative eigenvalues
Warning: Model failed to converge with 1 negative eigenvalue: -1.4e+00
# Be careful with nesting; see notes below
M2_theta_learning <- lmer(theta_erds_wins ~ step * block + 
             (1 | id) + (1 | id:block) ,                     # trials within subjects
           data = df_learning_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 18 columns / coefficients
# Compare models (likelihood-ratio test + AIC/BIC)
anova(M1_theta_learning, M2_theta_learning)
refitting model(s) with ML (instead of REML)
Data: df_learning_acc
Models:
M2_theta_learning: theta_erds_wins ~ step * block + (1 | id) + (1 | id:block)
M1_theta_learning: theta_erds_wins ~ step * block + (1 | id) + (1 | trial) + (1 | trial) + (1 | block)
                  npar    AIC    BIC  logLik -2*log(L) Chisq Df Pr(>Chisq)
M2_theta_learning   39 243408 243707 -121665    243330                    
M1_theta_learning   41 243535 243849 -121726    243453     0  2          1
summary(M2_theta_learning)$optinfo$conv
$opt
[1] 0

$lme4
list()
isSingular(M2_theta_learning)
[1] FALSE
#Assumption 
residuals <- resid(M1_theta_learning)
fitted <- fitted(M1_theta_learning)

par(mfrow = c(1, 2))
hist(residuals, main = "Histogram of Residuals", xlab = "Residuals", breaks = 20)
qqnorm(residuals)
qqline(residuals, col = "red")

M_theta_learning <- M2_theta_learning
Anova(M_theta_learning)
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: theta_erds_wins
              Chisq Df Pr(>Chisq)    
step       499.3222 17     <2e-16 ***
block        4.1169  2     0.1277    
step:block 332.1280 16     <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Models theta test

M1_theta_test <- lmer(theta_erds_wins ~ cond*step + step*difficulty + cond*difficulty + cond*difficulty*step + (1 | id) + (1 | block) + (1 |trial),
           data = df_test_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 36 columns / coefficients
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Hessian is numerically singular: parameters are not uniquely determined
Warning: Model failed to converge with 1 negative eigenvalue: -2.0e-03
# Be careful with nesting; see notes below
M2_theta_test <- lmer(theta_erds_wins ~ cond*step + step*difficulty + cond*difficulty + cond*difficulty*step + (1 | id) + (1 | id:block) + 
             (1 | id:trial),
           data = df_test_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 36 columns / coefficients
# Compare models (likelihood-ratio test + AIC/BIC)
anova(M1_theta_test, M2_theta_test)
refitting model(s) with ML (instead of REML)
Data: df_test_acc
Models:
M1_theta_test: theta_erds_wins ~ cond * step + step * difficulty + cond * difficulty + cond * difficulty * step + (1 | id) + (1 | block) + (1 | trial)
M2_theta_test: theta_erds_wins ~ cond * step + step * difficulty + cond * difficulty + cond * difficulty * step + (1 | id) + (1 | id:block) + (1 | id:trial)
              npar    AIC    BIC logLik -2*log(L)  Chisq Df Pr(>Chisq)
M1_theta_test   76 146795 147339 -73321    146643                     
M2_theta_test   76 145702 146247 -72775    145550 1092.3  0           
summary(M2_theta_test)$optinfo$conv
$opt
[1] 0

$lme4
list()
isSingular(M2_theta_test)
[1] FALSE
#Assumption 
residuals <- resid(M2_theta_test)
fitted <- fitted(M2_theta_test)

par(mfrow = c(1, 2))
hist(residuals, main = "Histogram of Residuals", xlab = "Residuals", breaks = 20)
qqnorm(residuals)
qqline(residuals, col = "red")

M_theta_test <- M2_theta_test
Anova(M_theta_test)
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: theta_erds_wins
                        Chisq Df Pr(>Chisq)    
cond                   0.3222  1    0.57027    
step                 422.7975 17  < 2.2e-16 ***
difficulty            42.0425  2  7.423e-10 ***
cond:step             89.0962 17  8.910e-12 ***
step:difficulty      144.7078 16  < 2.2e-16 ***
cond:difficulty        2.9146  2    0.23287    
cond:step:difficulty  32.1885 16    0.00945 ** 
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Models RT learning

# Fit with ML for valid likelihood-ratio test
M1_RT_learning <- lmer(RT ~ step * block + (1 | id) + (1 | trial),
           data = df_learning_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 18 columns / coefficients
# Be careful with nesting; see notes below
M2_RT_learning <- lmer(RT ~ step * block + 
             (1 | id) + (1 | id:block) +  # sessions within subjects
             (1 | id:trial),                     # trials within subjects
           data = df_learning_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 18 columns / coefficients
# Compare models (likelihood-ratio test + AIC/BIC)
anova(M1_RT_learning, M2_RT_learning)
refitting model(s) with ML (instead of REML)
Data: df_learning_acc
Models:
M1_RT_learning: RT ~ step * block + (1 | id) + (1 | trial)
M2_RT_learning: RT ~ step * block + (1 | id) + (1 | id:block) + (1 | id:trial)
               npar    AIC    BIC  logLik -2*log(L)  Chisq Df Pr(>Chisq)    
M1_RT_learning   39 212016 212315 -105969    211938                         
M2_RT_learning   40 210367 210674 -105143    210287 1651.4  1  < 2.2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(M2_RT_learning)$optinfo$conv
$opt
[1] 0

$lme4
list()
isSingular(M2_RT_learning)
[1] FALSE
#Assumption 
residuals <- resid(M2_RT_learning)
fitted <- fitted(M2_RT_learning)

par(mfrow = c(1, 2))
hist(residuals, main = "Histogram of Residuals", xlab = "Residuals", breaks = 20)
qqnorm(residuals)
qqline(residuals, col = "red")

M_RT_learning<- M2_RT_learning
Anova(M_RT_learning)
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: RT
               Chisq Df Pr(>Chisq)    
step       2506.0332 17  < 2.2e-16 ***
block         0.8827  2     0.6432    
step:block   68.8458 16  1.588e-08 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Models RT test

M1_RT_test <- lmer(RT ~ cond*step + step*difficulty + cond*difficulty + cond*difficulty*step + (1 | id) + (1 | block) + (1 |trial),
           data = df_test_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 36 columns / coefficients
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
unable to evaluate scaled gradient
Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
Model failed to converge: degenerate Hessian with 1 negative eigenvalues
Warning: Model failed to converge with 1 negative eigenvalue: -9.0e-05
# Be careful with nesting; see notes below
M2_RT_test <- lmer(RT ~ cond*step + step*difficulty + cond*difficulty + cond*difficulty*step + (1 | id) + (1 | id:block) +  # sessions within subjects
             (1 | id:trial),
           data = df_test_acc, REML = TRUE)
fixed-effect model matrix is rank deficient so dropping 36 columns / coefficients
# Compare models (likelihood-ratio test + AIC/BIC)
anova(M1_RT_test, M2_RT_test)
refitting model(s) with ML (instead of REML)
Data: df_test_acc
Models:
M1_RT_test: RT ~ cond * step + step * difficulty + cond * difficulty + cond * difficulty * step + (1 | id) + (1 | block) + (1 | trial)
M2_RT_test: RT ~ cond * step + step * difficulty + cond * difficulty + cond * difficulty * step + (1 | id) + (1 | id:block) + (1 | id:trial)
           npar    AIC    BIC logLik -2*log(L)  Chisq Df Pr(>Chisq)
M1_RT_test   76 128149 128694 -63999    127997                     
M2_RT_test   76 127704 128249 -63776    127552 445.08  0           
summary(M2_RT_test)$optinfo$conv
$opt
[1] 0

$lme4
list()
isSingular(M2_RT_test)
[1] FALSE
#Assumption 
residuals <- resid(M2_RT_test)
fitted <- fitted(M2_RT_test)

par(mfrow = c(1, 2))
hist(residuals, main = "Histogram of Residuals", xlab = "Residuals", breaks = 20)
qqnorm(residuals)
qqline(residuals, col = "red")

M_RT_test <- M2_RT_test
Anova(M_RT_test)
Analysis of Deviance Table (Type II Wald chisquare tests)

Response: RT
                         Chisq Df Pr(>Chisq)    
cond                   14.2889  1  0.0001568 ***
step                 1863.3093 17  < 2.2e-16 ***
difficulty             62.2996  2  2.964e-14 ***
cond:step              91.6231 17  3.090e-12 ***
step:difficulty        42.1766 16  0.0003714 ***
cond:difficulty         9.1126  2  0.0105011 *  
cond:step:difficulty   29.8378 16  0.0188615 *  
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Emmeans

# ===============================
# emmeans contrasts for Learning & Test (θ and RT)
# Force lmerTest (KR if available else Satt) + robust column standardization
# Ensures: t.ratio, df, lower.CL, upper.CL always present
# ===============================

suppressPackageStartupMessages({
  library(lme4)
  library(lmerTest)  # activates df methods for lmer
  library(dplyr)
  library(emmeans)
  library(stringr)
  library(readr)   # parse_number
  library(purrr)
  library(tibble)
})

# ---- Force df method for emmeans on lmer ----
df_method <- if (requireNamespace("pbkrtest", quietly = TRUE)) "kenward-roger" else "satterthwaite"
emmeans::emm_options(lmer.df = df_method)
message(sprintf("Using emmeans lmer df method: %s", df_method))
Using emmeans lmer df method: kenward-roger
# Optional: raise KR limit a bit
emmeans::emm_options(pbkrtest.limit = 1e6)

# ------- Helpers -------
alpha <- 0.05
padj_method <- "BH"

numify <- function(x) parse_number(as.character(x))

# Extract "from" and "to" step from labels like "step2 - step1" or "2 - 1"
steps_from_consec <- function(contrast_char) {
  v <- stringr::str_extract_all(contrast_char, "\\d+")[[1]]
  if (length(v) < 2) tibble(step_from = NA_integer_, step_to = NA_integer_)
  else tibble(step_from = as.integer(v[2]), step_to = as.integer(v[1]))
}

# Standardize emmeans summary columns so downstream stays stable:
# - Always provide: t.ratio, df, lower.CL, upper.CL
std_emm_cols <- function(df) {
  nm <- names(df)

  # --- test statistic -> t.ratio (only if a stat column exists) ---
  if (!("t.ratio" %in% nm)) {
    if ("z.ratio" %in% nm)        df <- dplyr::mutate(df, t.ratio = .data$z.ratio)
    else if ("statistic" %in% nm) df <- dplyr::mutate(df, t.ratio = .data$statistic)
    else if ("ratio" %in% nm)     df <- dplyr::mutate(df, t.ratio = .data$ratio)
    else if ("t" %in% nm)         df <- dplyr::mutate(df, t.ratio = .data$t)
    # if none of the above exist (e.g., plain emmeans means table), skip adding t.ratio
  }

  # --- degrees of freedom ---
  if (!("df" %in% names(df))) df <- dplyr::mutate(df, df = NA_real_)

  # --- confidence limits -> lower.CL / upper.CL ---
  lower_candidates <- c("lower.CL","asymp.LCL","LCL","lower.HPD")
  upper_candidates <- c("upper.CL","asymp.UCL","UCL","upper.HPD")

  if (!("lower.CL" %in% nm)) {
    src <- lower_candidates[lower_candidates %in% nm][1]
    if (!is.na(src)) df <- dplyr::mutate(df, lower.CL = .data[[src]])
  }
  if (!("upper.CL" %in% nm)) {
    src <- upper_candidates[upper_candidates %in% nm][1]
    if (!is.na(src)) df <- dplyr::mutate(df, upper.CL = .data[[src]])
  }

  df
}

# Add common columns & filter by significance
finalise <- function(df, phase, dv, ctype) {
  df %>%
    mutate(phase = phase, dv = dv, contrast_type = ctype) %>%
    select(phase, dv, contrast_type, everything()) %>%
    filter(p.value < alpha)
}

# ------- Observed grids for filtering impossible combos (TEST only) -------
obs_test_steps <- df_test_acc %>%
  mutate(step_num = numify(step)) %>%
  group_by(cond, difficulty) %>%
  summarise(max_step = max(step_num, na.rm = TRUE), .groups = "drop")

obs_test_at_least2diff <- df_test_acc %>%
  group_by(cond, step) %>%
  summarise(n_difficulty = n_distinct(difficulty), .groups = "drop")

obs_test_both_conds <- df_test_acc %>%
  group_by(difficulty, step) %>%
  summarise(n_cond = n_distinct(cond), .groups = "drop")

# ------- 1) LEARNING: θ — successive steps within block -------
L_theta_succ <- {
  emm <- emmeans(M_theta_learning, ~ step | block)
  con <- contrast(emm, method = "consec")
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  step_parsed <- map_dfr(out$contrast, steps_from_consec)
  out <- bind_cols(out, step_parsed) %>%
    mutate(step_from = as.integer(step_from),
           step_to   = as.integer(step_to),
           step_to_num = step_to) %>%
    finalise("learning","theta","successive steps within block")
}

# ------- 2) LEARNING: θ — same step between blocks -------
L_theta_between_blocks <- {
  emm <- emmeans(M_theta_learning, ~ block | step)
  con <- pairs(emm)
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  out %>%
    mutate(step_num = numify(step)) %>%
    finalise("learning","theta","same step between blocks")
}

# ------- 3) LEARNING: RT — successive steps within block -------
L_rt_succ <- {
  emm <- emmeans(M_RT_learning, ~ step | block)
  con <- contrast(emm, method = "consec")
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  step_parsed <- map_dfr(out$contrast, steps_from_consec)
  bind_cols(out, step_parsed) %>%
    mutate(step_from = as.integer(step_from),
           step_to   = as.integer(step_to),
           step_to_num = step_to) %>%
    finalise("learning","RT","successive steps within block")
}

# ------- 4) LEARNING: RT — same step between blocks -------
L_rt_between_blocks <- {
  emm <- emmeans(M_RT_learning, ~ block | step)
  con <- pairs(emm)
  summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step)) %>%
    finalise("learning","RT","same step between blocks")
}

# ------- 5) TEST: θ — successive steps within cond × difficulty -------
T_theta_succ <- {
  emm <- emmeans(M_theta_test, ~ step | cond * difficulty)
  con <- contrast(emm, method = "consec")
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  step_parsed <- map_dfr(out$contrast, steps_from_consec)
  out <- bind_cols(out, step_parsed) %>%
    mutate(step_to_num = as.integer(step_to)) %>%
    left_join(obs_test_steps, by = c("cond","difficulty")) %>%
    filter(step_to_num <= max_step) %>%
    finalise("test","theta","successive steps within cond × difficulty")
}

# ------- 6) TEST: θ — same step between difficulties (within condition) -------
T_theta_between_diffs <- {
  emm <- emmeans(M_theta_test, ~ difficulty | cond + step)
  con <- pairs(emm)
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  out %>%
    inner_join(obs_test_at_least2diff %>% filter(n_difficulty >= 2),
               by = c("cond","step")) %>%
    mutate(step_num = numify(step)) %>%
    finalise("test","theta","same step between difficulties (within cond)")
}

# ------- 7) TEST: θ — same step between conditions (within difficulty) -------
T_theta_between_conds <- {
  emm <- emmeans(M_theta_test, ~ cond | difficulty + step)
  con <- pairs(emm)
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  out %>%
    inner_join(obs_test_both_conds %>% filter(n_cond >= 2),
               by = c("difficulty","step")) %>%
    mutate(step_num = numify(step)) %>%
    finalise("test","theta","same step between conditions (within difficulty)")
}

# ------- 8) TEST: RT — successive steps within cond × difficulty -------
T_rt_succ <- {
  emm <- emmeans(M_RT_test, ~ step | cond * difficulty)
  con <- contrast(emm, method = "consec")
  out <- summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols()

  step_parsed <- map_dfr(out$contrast, steps_from_consec)
  out <- bind_cols(out, step_parsed) %>%
    mutate(step_to_num = as.integer(step_to)) %>%
    left_join(obs_test_steps, by = c("cond","difficulty")) %>%
    filter(step_to_num <= max_step) %>%
    finalise("test","RT","successive steps within cond × difficulty")
}

# ------- 9) TEST: RT — same step between difficulties (within condition) -------
T_rt_between_diffs <- {
  emm <- emmeans(M_RT_test, ~ difficulty | cond + step)
  con <- pairs(emm)
  summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols() %>%
    inner_join(obs_test_at_least2diff %>% filter(n_difficulty >= 2),
               by = c("cond","step")) %>%
    mutate(step_num = numify(step)) %>%
    finalise("test","RT","same step between difficulties (within cond)")
}

# ------- 10) TEST: RT — same step between conditions (within difficulty) -------
T_rt_between_conds <- {
  emm <- emmeans(M_RT_test, ~ cond | difficulty + step)
  con <- pairs(emm)
  summary(con, infer = c(TRUE, TRUE), adjust = padj_method) %>%
    as.data.frame() %>% std_emm_cols() %>%
    inner_join(obs_test_both_conds %>% filter(n_cond >= 2),
               by = c("difficulty","step")) %>%
    mutate(step_num = numify(step)) %>%
    finalise("test","RT","same step between conditions (within difficulty)")
}

# ------- Combine everything into ONE significant-results table -------
sig_contrasts <- bind_rows(
  L_theta_succ,
  L_theta_between_blocks,
  L_rt_succ,
  L_rt_between_blocks,
  T_theta_succ,
  T_theta_between_diffs,
  T_theta_between_conds,
  T_rt_succ,
  T_rt_between_diffs,
  T_rt_between_conds
) %>%
  select(
    phase, dv, contrast_type,
    block, cond, difficulty, step, step_from, step_to, step_num,
    contrast, estimate, SE, df, t.ratio, p.value, lower.CL, upper.CL
  ) %>%
  arrange(phase, dv, contrast_type, cond, difficulty, block, step_num, step_to)

print(sig_contrasts)
       phase    dv                                    contrast_type block
1   learning    RT                    successive steps within block     2
2   learning    RT                    successive steps within block     2
3   learning    RT                    successive steps within block     2
4   learning    RT                    successive steps within block     2
5   learning    RT                    successive steps within block     2
6   learning    RT                    successive steps within block     2
7   learning    RT                    successive steps within block     2
8   learning    RT                    successive steps within block     3
9   learning    RT                    successive steps within block     3
10  learning    RT                    successive steps within block     3
11  learning    RT                    successive steps within block     3
12  learning    RT                    successive steps within block     3
13  learning    RT                    successive steps within block     3
14  learning    RT                    successive steps within block     3
15  learning    RT                    successive steps within block     3
16  learning    RT                    successive steps within block     3
17  learning    RT                    successive steps within block     3
18  learning    RT                    successive steps within block     3
19  learning    RT                    successive steps within block     3
20  learning theta                         same step between blocks  <NA>
21  learning theta                         same step between blocks  <NA>
22  learning theta                         same step between blocks  <NA>
23  learning theta                         same step between blocks  <NA>
24  learning theta                         same step between blocks  <NA>
25  learning theta                         same step between blocks  <NA>
26  learning theta                    successive steps within block     1
27  learning theta                    successive steps within block     1
28  learning theta                    successive steps within block     1
29  learning theta                    successive steps within block     2
30  learning theta                    successive steps within block     2
31  learning theta                    successive steps within block     2
32  learning theta                    successive steps within block     2
33  learning theta                    successive steps within block     3
34  learning theta                    successive steps within block     3
35  learning theta                    successive steps within block     3
36  learning theta                    successive steps within block     3
37      test    RT same step between conditions (within difficulty)  <NA>
38      test    RT same step between conditions (within difficulty)  <NA>
39      test    RT same step between conditions (within difficulty)  <NA>
40      test    RT same step between conditions (within difficulty)  <NA>
41      test    RT same step between conditions (within difficulty)  <NA>
42      test    RT same step between conditions (within difficulty)  <NA>
43      test    RT same step between conditions (within difficulty)  <NA>
44      test    RT same step between conditions (within difficulty)  <NA>
45      test    RT same step between conditions (within difficulty)  <NA>
46      test    RT same step between conditions (within difficulty)  <NA>
47      test    RT same step between conditions (within difficulty)  <NA>
48      test    RT same step between conditions (within difficulty)  <NA>
49      test    RT same step between conditions (within difficulty)  <NA>
50      test    RT same step between conditions (within difficulty)  <NA>
51      test    RT same step between conditions (within difficulty)  <NA>
52      test    RT same step between conditions (within difficulty)  <NA>
53      test    RT same step between conditions (within difficulty)  <NA>
54      test    RT same step between conditions (within difficulty)  <NA>
55      test    RT same step between conditions (within difficulty)  <NA>
56      test    RT same step between conditions (within difficulty)  <NA>
57      test    RT same step between conditions (within difficulty)  <NA>
58      test    RT same step between conditions (within difficulty)  <NA>
59      test    RT same step between conditions (within difficulty)  <NA>
60      test    RT same step between conditions (within difficulty)  <NA>
61      test    RT same step between conditions (within difficulty)  <NA>
62      test    RT     same step between difficulties (within cond)  <NA>
63      test    RT     same step between difficulties (within cond)  <NA>
64      test    RT     same step between difficulties (within cond)  <NA>
65      test    RT     same step between difficulties (within cond)  <NA>
66      test    RT     same step between difficulties (within cond)  <NA>
67      test    RT     same step between difficulties (within cond)  <NA>
68      test    RT     same step between difficulties (within cond)  <NA>
69      test    RT     same step between difficulties (within cond)  <NA>
70      test    RT     same step between difficulties (within cond)  <NA>
71      test    RT     same step between difficulties (within cond)  <NA>
72      test    RT     same step between difficulties (within cond)  <NA>
73      test    RT        successive steps within cond × difficulty  <NA>
74      test    RT        successive steps within cond × difficulty  <NA>
75      test    RT        successive steps within cond × difficulty  <NA>
76      test    RT        successive steps within cond × difficulty  <NA>
77      test    RT        successive steps within cond × difficulty  <NA>
78      test    RT        successive steps within cond × difficulty  <NA>
79      test    RT        successive steps within cond × difficulty  <NA>
80      test    RT        successive steps within cond × difficulty  <NA>
81      test    RT        successive steps within cond × difficulty  <NA>
82      test    RT        successive steps within cond × difficulty  <NA>
83      test    RT        successive steps within cond × difficulty  <NA>
84      test    RT        successive steps within cond × difficulty  <NA>
85      test    RT        successive steps within cond × difficulty  <NA>
86      test    RT        successive steps within cond × difficulty  <NA>
87      test    RT        successive steps within cond × difficulty  <NA>
88      test    RT        successive steps within cond × difficulty  <NA>
89      test    RT        successive steps within cond × difficulty  <NA>
90      test    RT        successive steps within cond × difficulty  <NA>
91      test    RT        successive steps within cond × difficulty  <NA>
92      test    RT        successive steps within cond × difficulty  <NA>
93      test    RT        successive steps within cond × difficulty  <NA>
94      test    RT        successive steps within cond × difficulty  <NA>
95      test    RT        successive steps within cond × difficulty  <NA>
96      test theta same step between conditions (within difficulty)  <NA>
97      test theta same step between conditions (within difficulty)  <NA>
98      test theta same step between conditions (within difficulty)  <NA>
99      test theta same step between conditions (within difficulty)  <NA>
100     test theta same step between conditions (within difficulty)  <NA>
101     test theta same step between conditions (within difficulty)  <NA>
102     test theta same step between conditions (within difficulty)  <NA>
103     test theta     same step between difficulties (within cond)  <NA>
104     test theta     same step between difficulties (within cond)  <NA>
105     test theta     same step between difficulties (within cond)  <NA>
106     test theta     same step between difficulties (within cond)  <NA>
107     test theta     same step between difficulties (within cond)  <NA>
108     test theta     same step between difficulties (within cond)  <NA>
109     test theta     same step between difficulties (within cond)  <NA>
110     test theta     same step between difficulties (within cond)  <NA>
111     test theta     same step between difficulties (within cond)  <NA>
112     test theta     same step between difficulties (within cond)  <NA>
113     test theta     same step between difficulties (within cond)  <NA>
114     test theta     same step between difficulties (within cond)  <NA>
115     test theta     same step between difficulties (within cond)  <NA>
116     test theta     same step between difficulties (within cond)  <NA>
117     test theta        successive steps within cond × difficulty  <NA>
118     test theta        successive steps within cond × difficulty  <NA>
119     test theta        successive steps within cond × difficulty  <NA>
120     test theta        successive steps within cond × difficulty  <NA>
121     test theta        successive steps within cond × difficulty  <NA>
122     test theta        successive steps within cond × difficulty  <NA>
123     test theta        successive steps within cond × difficulty  <NA>
124     test theta        successive steps within cond × difficulty  <NA>
125     test theta        successive steps within cond × difficulty  <NA>
126     test theta        successive steps within cond × difficulty  <NA>
127     test theta        successive steps within cond × difficulty  <NA>
          cond difficulty step step_from step_to step_num
1         <NA>       <NA> <NA>         2       3       NA
2         <NA>       <NA> <NA>         3       4       NA
3         <NA>       <NA> <NA>         4       5       NA
4         <NA>       <NA> <NA>         8       9       NA
5         <NA>       <NA> <NA>         1      10       NA
6         <NA>       <NA> <NA>        10      11       NA
7         <NA>       <NA> <NA>        11      12       NA
8         <NA>       <NA> <NA>         3       4       NA
9         <NA>       <NA> <NA>         4       5       NA
10        <NA>       <NA> <NA>         5       6       NA
11        <NA>       <NA> <NA>         6       7       NA
12        <NA>       <NA> <NA>         8       9       NA
13        <NA>       <NA> <NA>         1      10       NA
14        <NA>       <NA> <NA>        10      11       NA
15        <NA>       <NA> <NA>        11      12       NA
16        <NA>       <NA> <NA>        12      13       NA
17        <NA>       <NA> <NA>        14      15       NA
18        <NA>       <NA> <NA>        15      16       NA
19        <NA>       <NA> <NA>        16      17       NA
20        <NA>       <NA>    5        NA      NA        5
21        <NA>       <NA>    5        NA      NA        5
22        <NA>       <NA>    6        NA      NA        6
23        <NA>       <NA>    6        NA      NA        6
24        <NA>       <NA>   11        NA      NA       11
25        <NA>       <NA>   12        NA      NA       12
26        <NA>       <NA> <NA>         2       3       NA
27        <NA>       <NA> <NA>         4       5       NA
28        <NA>       <NA> <NA>         5       6       NA
29        <NA>       <NA> <NA>         2       3       NA
30        <NA>       <NA> <NA>         1      10       NA
31        <NA>       <NA> <NA>        10      11       NA
32        <NA>       <NA> <NA>        11      12       NA
33        <NA>       <NA> <NA>        18       2       NA
34        <NA>       <NA> <NA>         2       3       NA
35        <NA>       <NA> <NA>         1      10       NA
36        <NA>       <NA> <NA>        16      17       NA
37        <NA>          6    2        NA      NA        2
38        <NA>          6    3        NA      NA        3
39        <NA>          6    4        NA      NA        4
40        <NA>          6    5        NA      NA        5
41        <NA>          6    6        NA      NA        6
42        <NA>         12    1        NA      NA        1
43        <NA>         12    2        NA      NA        2
44        <NA>         12    3        NA      NA        3
45        <NA>         12    4        NA      NA        4
46        <NA>         12    5        NA      NA        5
47        <NA>         12    6        NA      NA        6
48        <NA>         12    7        NA      NA        7
49        <NA>         12    8        NA      NA        8
50        <NA>         12    9        NA      NA        9
51        <NA>         12   12        NA      NA       12
52        <NA>         18    4        NA      NA        4
53        <NA>         18    5        NA      NA        5
54        <NA>         18    6        NA      NA        6
55        <NA>         18    7        NA      NA        7
56        <NA>         18    8        NA      NA        8
57        <NA>         18    9        NA      NA        9
58        <NA>         18   12        NA      NA       12
59        <NA>         18   13        NA      NA       13
60        <NA>         18   14        NA      NA       14
61        <NA>         18   17        NA      NA       17
62    Familiar       <NA>    5        NA      NA        5
63    Familiar       <NA>    5        NA      NA        5
64    Familiar       <NA>    6        NA      NA        6
65    Familiar       <NA>    6        NA      NA        6
66    Familiar       <NA>    7        NA      NA        7
67  Unfamiliar       <NA>    1        NA      NA        1
68  Unfamiliar       <NA>    1        NA      NA        1
69  Unfamiliar       <NA>    1        NA      NA        1
70  Unfamiliar       <NA>    6        NA      NA        6
71  Unfamiliar       <NA>    6        NA      NA        6
72  Unfamiliar       <NA>    9        NA      NA        9
73    Familiar         12 <NA>         5       6       NA
74    Familiar         12 <NA>         7       8       NA
75    Familiar         12 <NA>         8       9       NA
76    Familiar         12 <NA>         1      10       NA
77    Familiar         12 <NA>        11      12       NA
78    Familiar         18 <NA>         5       6       NA
79    Familiar         18 <NA>         6       7       NA
80    Familiar         18 <NA>         1      10       NA
81    Familiar         18 <NA>        11      12       NA
82    Familiar         18 <NA>        12      13       NA
83    Familiar         18 <NA>        14      15       NA
84    Familiar         18 <NA>        15      16       NA
85    Familiar         18 <NA>        17      18       NA
86  Unfamiliar         12 <NA>         8       9       NA
87  Unfamiliar         12 <NA>         1      10       NA
88  Unfamiliar         12 <NA>        10      11       NA
89  Unfamiliar         18 <NA>         8       9       NA
90  Unfamiliar         18 <NA>         1      10       NA
91  Unfamiliar         18 <NA>        10      11       NA
92  Unfamiliar         18 <NA>        11      12       NA
93  Unfamiliar         18 <NA>        12      13       NA
94  Unfamiliar         18 <NA>        14      15       NA
95  Unfamiliar         18 <NA>        16      17       NA
96        <NA>          6    1        NA      NA        1
97        <NA>         12    1        NA      NA        1
98        <NA>         12   10        NA      NA       10
99        <NA>         12   11        NA      NA       11
100       <NA>         12   12        NA      NA       12
101       <NA>         18    1        NA      NA        1
102       <NA>         18    2        NA      NA        2
103   Familiar       <NA>    5        NA      NA        5
104   Familiar       <NA>    5        NA      NA        5
105   Familiar       <NA>    6        NA      NA        6
106   Familiar       <NA>    6        NA      NA        6
107   Familiar       <NA>   11        NA      NA       11
108   Familiar       <NA>   12        NA      NA       12
109 Unfamiliar       <NA>    5        NA      NA        5
110 Unfamiliar       <NA>    5        NA      NA        5
111 Unfamiliar       <NA>    6        NA      NA        6
112 Unfamiliar       <NA>    6        NA      NA        6
113 Unfamiliar       <NA>    9        NA      NA        9
114 Unfamiliar       <NA>   10        NA      NA       10
115 Unfamiliar       <NA>   11        NA      NA       11
116 Unfamiliar       <NA>   12        NA      NA       12
117   Familiar          6 <NA>         2       3       NA
118   Familiar          6 <NA>         4       5       NA
119   Familiar         12 <NA>         2       3       NA
120   Familiar         12 <NA>         1      10       NA
121   Familiar         18 <NA>         2       3       NA
122   Familiar         18 <NA>         1      10       NA
123   Familiar         18 <NA>        12      13       NA
124   Familiar         18 <NA>        16      17       NA
125 Unfamiliar         12 <NA>        10      11       NA
126 Unfamiliar         18 <NA>        18       2       NA
127 Unfamiliar         18 <NA>        16      17       NA
                       contrast   estimate       SE          df    t.ratio
1                 step3 - step2  -33.56574 12.50357 15062.35721  -2.684492
2                 step4 - step3  -33.91350 12.66661 15057.98530  -2.677393
3                 step5 - step4   71.51715 12.54122 15062.40004   5.702567
4                 step9 - step8   43.63567 12.70730 15060.24200   3.433907
5                step10 - step1 -228.51790 12.68627 15073.82154 -18.013008
6               step11 - step10  -35.97678 12.68606 15073.31528  -2.835931
7               step12 - step11  -43.32398 12.73377 15074.24092  -3.402290
8                 step4 - step3  -28.05095 12.66316 15060.04603  -2.215162
9                 step5 - step4   56.57229 12.59276 15057.95033   4.492447
10                step6 - step5   38.43542 12.57887 15060.30329   3.055553
11                step7 - step6  -48.99955 12.54927 15059.78548  -3.904573
12                step9 - step8   37.93261 12.66632 15064.62945   2.994763
13               step10 - step1 -200.52957 12.81899 15075.45550 -15.643163
14              step11 - step10  -31.33092 12.76970 15071.84302  -2.453535
15              step12 - step11  -46.02632 12.64941 15066.75999  -3.638615
16              step13 - step12   99.60248 12.90271 15072.73072   7.719501
17              step15 - step14  -45.18438 12.63689 15064.85206  -3.575593
18              step16 - step15  -65.64876 12.71200 15066.28404  -5.164313
19              step17 - step16   28.78718 12.86659 15067.44042   2.237359
20              block1 - block2  163.52799 56.33855    55.76702   2.902595
21              block1 - block3  125.34785 56.43078    58.79585   2.221267
22              block1 - block2  357.39259 56.92722    58.04690   6.278062
23              block1 - block3  333.59673 56.71083    59.93516   5.882417
24              block2 - block3  352.13859 58.10563    63.04211   6.060318
25              block2 - block3  422.80537 58.26814    63.74731   7.256202
26                step3 - step2 -120.04553 32.77200 15715.75483  -3.663051
27                step5 - step4  139.42875 33.13624 15717.57112   4.207742
28                step6 - step5  179.73631 33.04420 15709.40071   5.439270
29                step3 - step2 -144.74001 36.85544 15707.22582  -3.927236
30               step10 - step1 -157.13092 37.37295 15705.29065  -4.204403
31              step11 - step10  257.26751 37.37650 15700.12671   6.883135
32              step12 - step11  120.80813 37.51009 15699.21353   3.220683
33               step2 - step18 -140.07816 37.19307 15699.04937  -3.766244
34                step3 - step2 -214.38558 37.17864 15699.47648  -5.766365
35               step10 - step1 -263.85950 37.75745 15699.43201  -6.988276
36              step17 - step16  174.05899 37.90890 15699.31037   4.591508
37        Familiar - Unfamiliar  -81.54887 30.38849    39.04478  -2.683545
38        Familiar - Unfamiliar  -85.39109 30.63328    40.30931  -2.787527
39        Familiar - Unfamiliar -109.66529 30.67211    40.51734  -3.575408
40        Familiar - Unfamiliar -113.68632 30.50086    39.62378  -3.727316
41        Familiar - Unfamiliar  -89.45968 30.52724    39.76585  -2.930487
42        Familiar - Unfamiliar -201.63413 32.04920    48.26471  -6.291393
43        Familiar - Unfamiliar -101.61057 31.63080    45.77511  -3.212393
44        Familiar - Unfamiliar  -88.53537 31.83865    46.98499  -2.780751
45        Familiar - Unfamiliar -134.62302 31.73254    46.36903  -4.242428
46        Familiar - Unfamiliar -106.60323 31.61028    45.65407  -3.372423
47        Familiar - Unfamiliar -111.44401 31.54169    45.27341  -3.533229
48        Familiar - Unfamiliar  -81.70012 31.99226    47.91798  -2.553746
49        Familiar - Unfamiliar -120.45301 31.71829    46.27851  -3.797589
50        Familiar - Unfamiliar -184.78040 32.00241    47.96836  -5.773953
51        Familiar - Unfamiliar -101.83874 32.08948    48.50135  -3.173587
52        Familiar - Unfamiliar -115.46405 33.85111    59.99745  -3.410939
53        Familiar - Unfamiliar  -98.59366 33.81933    59.77452  -2.915305
54        Familiar - Unfamiliar  -74.04295 33.70336    58.96567  -2.196901
55        Familiar - Unfamiliar  -89.95989 33.83183    59.87864  -2.659031
56        Familiar - Unfamiliar  -75.09129 33.79308    59.59094  -2.222091
57        Familiar - Unfamiliar -125.56361 33.93103    60.57665  -3.700554
58        Familiar - Unfamiliar -102.49214 33.82435    59.81411  -3.030129
59        Familiar - Unfamiliar  -69.47924 34.51249    64.82516  -2.013162
60        Familiar - Unfamiliar  -67.56835 33.45642    57.27266  -2.019593
61        Familiar - Unfamiliar  -97.87529 33.57419    58.07319  -2.915195
62   difficulty6 - difficulty12  -51.28278 20.94163  9430.34154  -2.448844
63   difficulty6 - difficulty18  -53.40267 22.11827  9446.14281  -2.414415
64   difficulty6 - difficulty12  -78.48397 20.82333  9426.34648  -3.769040
65   difficulty6 - difficulty18  -99.25472 22.05769  9444.88799  -4.499779
66  difficulty12 - difficulty18   46.80408 22.07668  9432.94114   2.120068
67   difficulty6 - difficulty12 -178.71621 24.15678  9460.89695  -7.398181
68   difficulty6 - difficulty18  -50.81621 25.52294  9457.74401  -1.991002
69  difficulty12 - difficulty18  127.90000 26.95635  9451.94510   4.744708
70   difficulty6 - difficulty12 -100.46831 22.84936  9462.54423  -4.396986
71   difficulty6 - difficulty18  -83.83799 24.70783  9460.47801  -3.393176
72  difficulty12 - difficulty18   61.96759 26.72384  9458.60428   2.318813
73                step6 - step5   46.13690 20.27170  8940.97553   2.275927
74                step8 - step7  -61.06871 20.43850  8955.57845  -2.987926
75                step9 - step8   72.64022 20.42515  8946.17873   3.556411
76               step10 - step1 -235.77405 20.22905  8958.18590 -11.655220
77              step12 - step11  -80.61605 20.69035  8954.69595  -3.896313
78                step6 - step5   64.78774 22.55771  8934.99820   2.872088
79                step7 - step6  -64.16835 22.40338  8942.74069  -2.864226
80               step10 - step1 -203.81096 22.40762  8953.02128  -9.095608
81              step12 - step11  -55.04805 22.55817  8935.98450  -2.440271
82              step13 - step12  111.84327 22.84280  8949.32438   4.896216
83              step15 - step14 -113.60885 22.06962  8929.85622  -5.147749
84              step16 - step15  -57.92880 22.31793  8935.75623  -2.595617
85              step18 - step17   76.78450 22.53172  8947.28654   3.407840
86                step9 - step8  136.96760 24.08921  8942.41601   5.685849
87               step10 - step1 -385.67004 24.84990  8967.76519 -15.519985
88              step11 - step10  -69.17505 24.44880  8954.23438  -2.829385
89                step9 - step8   95.32713 27.15625  8942.41481   3.510320
90               step10 - step1 -218.13097 27.01986  8944.56138  -8.072987
91              step11 - step10 -131.79181 27.09476  8942.74952  -4.864107
92              step12 - step11   84.51239 27.35981  8934.53863   3.088924
93              step13 - step12   78.83037 27.71889  8957.41027   2.843922
94              step15 - step14 -170.72401 26.94402  8944.00222  -6.336250
95              step17 - step16   78.83950 26.86272  8938.16723   2.934904
96        Familiar - Unfamiliar  134.79689 62.81431   161.73787   2.145958
97        Familiar - Unfamiliar  153.66799 66.49009   200.98456   2.311141
98        Familiar - Unfamiliar -187.79667 66.63311   202.22735  -2.818369
99        Familiar - Unfamiliar -391.31462 66.07930   195.67307  -5.921894
100       Familiar - Unfamiliar -262.87431 66.60263   202.16727  -3.946906
101       Familiar - Unfamiliar  194.85638 72.18484   275.65895   2.699408
102       Familiar - Unfamiliar  148.81590 70.99920   257.73920   2.096022
103  difficulty6 - difficulty12  151.89997 54.06047  9463.06083   2.809816
104  difficulty6 - difficulty18  201.66524 56.96201  9466.19734   3.540346
105  difficulty6 - difficulty12  286.01006 53.77780  9461.03421   5.318367
106  difficulty6 - difficulty18  323.04576 56.81441  9466.14653   5.685983
107 difficulty12 - difficulty18  135.83319 57.39020  9467.25477   2.366836
108 difficulty12 - difficulty18  192.24313 57.64659  9466.91592   3.334857
109  difficulty6 - difficulty12  208.69301 58.36860  9431.49811   3.575433
110  difficulty6 - difficulty18  170.56182 63.32654  9401.74617   2.693370
111  difficulty6 - difficulty12  235.20060 58.55290  9426.79314   4.016890
112  difficulty6 - difficulty18  266.87289 63.20871  9401.28690   4.222090
113 difficulty12 - difficulty18  158.73650 68.29755  9376.50504   2.324190
114 difficulty12 - difficulty18  309.30881 67.34831  9369.69959   4.592674
115 difficulty12 - difficulty18  522.07374 68.12426  9360.32328   7.663551
116 difficulty12 - difficulty18  364.11451 67.68639  9365.75560   5.379434
117               step3 - step2 -193.86830 50.86624  8921.37129  -3.811336
118               step5 - step4  195.80733 51.46632  8935.11885   3.804572
119               step3 - step2 -246.59784 51.37268  8915.52053  -4.800175
120              step10 - step1 -195.16786 50.84247  8933.65068  -3.838678
121               step3 - step2 -252.50652 56.64359  8906.56254  -4.457813
122              step10 - step1 -236.02515 56.31174  8929.10643  -4.191403
123             step13 - step12  162.79877 57.39492  8918.11591   2.836466
124             step17 - step16  153.50477 56.45065  8907.36591   2.719274
125             step11 - step10  245.34272 61.43528  8919.29162   3.993515
126              step2 - step18 -394.40100 66.40623  8907.05051  -5.939217
127             step17 - step16  188.37136 67.48214  8910.48195   2.791425
         p.value     lower.CL     upper.CL
1   1.061114e-02  -68.6688510    1.5373808
2   1.061114e-02  -69.4743567    1.6473522
3   6.011574e-08   36.3083265  106.7259641
4   1.674933e-03    7.9605996   79.3107308
5   8.705913e-71 -264.1339339 -192.9018617
6   9.150636e-03  -71.5922083   -0.3613473
7   1.674933e-03  -79.0733729   -7.5745925
8   3.791542e-02  -65.7150635    9.6131548
9   3.014675e-05   19.1175788   94.0270098
10  4.782068e-03    1.0220028   75.8488428
11  3.223318e-04  -86.3249176  -11.6741742
12  5.196423e-03    0.2591132   75.6061163
13  1.693070e-53 -238.6571694 -162.4019764
14  2.406724e-02  -69.3119210    6.6500804
15  7.792345e-04  -83.6495152   -8.4031197
16  1.054803e-13   61.2258842  137.9790853
17  8.512833e-04  -82.7703480   -7.5984027
18  1.384921e-06 -103.4581318  -27.8393783
19  3.791542e-02   -9.4819924   67.0563611
20  1.587421e-02   24.4652032  302.5907784
21  4.529520e-02  -13.7204299  264.4161392
22  1.412637e-07  217.0477015  497.7374698
23  2.903254e-07  193.9162634  473.2771945
24  8.362354e-08  236.0252794  468.2518982
25  6.729030e-10  306.3924936  539.2182415
26  3.333963e-04 -201.9097701  -38.1812909
27  5.187334e-05   56.6546494  222.2028544
28  2.171971e-07   97.1921258  262.2804933
29  2.876494e-04 -248.2091018  -41.2709247
30  1.316110e-04 -262.0528786  -52.2089661
31  6.076651e-11  152.3355630  362.1994545
32  3.203645e-03   15.5011414  226.1151201
33  7.068900e-04 -250.7009996  -29.4553293
34  7.014413e-08 -324.9654814 -103.8056776
35  4.921139e-11 -376.1609678 -151.5580366
36  2.512997e-05   61.3070916  286.8108943
37  1.062959e-02 -143.0131258  -20.0846061
38  8.063716e-03 -147.2884532  -23.4937271
39  9.221708e-04 -171.6312783  -47.6992978
40  6.039049e-04 -175.3490916  -52.0235503
41  5.583755e-03 -151.1688388  -27.7505122
42  8.796836e-08 -266.0642420 -137.2040244
43  2.411372e-03 -165.2885162  -37.9326268
44  7.778943e-03 -152.5870092  -24.4837215
45  1.047468e-04 -198.4836079  -70.7624418
46  1.526266e-03 -170.2444286  -42.9620303
47  9.581862e-04 -174.9616410  -47.9263774
48  1.389372e-02 -146.0277232  -17.3725188
49  4.242831e-04 -184.2882482  -56.6177761
50  5.553068e-07 -249.1266464 -120.4341529
51  2.614084e-03 -166.3417333  -37.3357414
52  1.163794e-03 -183.1764025  -47.7516956
53  4.995344e-03 -166.2476423  -30.9396853
54  3.197008e-02 -141.4840400   -6.6018640
55  1.003790e-02 -157.6364484  -22.2833349
56  3.008567e-02 -142.6970658   -7.4855189
57  4.661968e-04 -193.4224778  -57.7047363
58  3.607664e-03 -170.1552444  -34.8290390
59  4.825376e-02 -138.4089740   -0.5495075
60  4.811351e-02 -134.5567658   -0.5799349
61  5.042795e-03 -165.0795290  -30.6710537
62  2.366910e-02 -101.4255669   -1.1399881
63  2.366910e-02 -106.3627957   -0.4425484
64  2.473144e-04 -128.3435068  -28.6244392
65  2.065133e-05 -152.0697864  -46.4396461
66  3.402631e-02    3.5290227   90.0791282
67  4.494539e-13 -236.5573285 -120.8750882
68  4.650942e-02 -111.9284780   10.2960577
69  3.178023e-06   63.3555582  192.4444383
70  3.328905e-05 -155.1789402  -45.7576732
71  1.040561e-03 -142.9985536  -24.6774319
72  2.042639e-02    9.5831179  114.3520704
73  4.574791e-02  -10.7805769  103.0543689
74  7.040976e-03 -118.4544867   -3.6829421
75  1.259664e-03   15.2919104  129.9885211
76  3.620557e-30 -292.5717590 -178.9763470
77  4.918979e-04 -138.7089511  -22.5231539
78  1.187175e-02   -2.3133136  131.8888030
79  1.187175e-02 -130.8103130    2.4736164
80  1.942344e-18 -270.4655102 -137.1564010
81  3.122805e-02 -122.1504635   12.0543727
82  5.633175e-06   43.8942162  179.7923278
83  2.288604e-06 -179.2580158  -47.9596923
84  2.296837e-02 -124.3165926    8.4589834
85  2.795133e-03    9.7607879  143.8082135
86  6.712664e-08   69.3315926  204.6036139
87  1.261443e-52 -455.4418060 -315.8982647
88  1.558045e-02 -137.8206653   -0.5294326
89  1.911532e-03   14.5470989  176.1071575
90  1.317165e-14 -298.5052673 -137.7566638
91  6.626413e-06 -212.3889203  -51.1946992
92  6.850971e-03    3.1268204  165.8979673
93  1.084670e-02   -3.6232784  161.2840206
94  2.097694e-09 -250.8727128  -90.5753123
95  9.477506e-03   -1.0673917  158.7463838
96  3.336773e-02   10.7549618  258.8388263
97  2.183908e-02   22.5603346  284.7756494
98  5.306248e-03 -319.1814432  -56.4118927
99  1.407909e-08 -521.6336954 -260.9955480
100 1.092230e-04 -394.1992236 -131.5494015
101 7.375544e-03   52.7527851  336.9599763
102 3.705558e-02    9.0035171  288.6282900
103 7.450735e-03   22.4572838  281.3426530
104 1.204564e-03   65.2751028  338.0553857
105 1.606395e-07  157.2441897  414.7759313
106 4.017583e-08  187.0090355  459.0824772
107 1.796089e-02   23.3360772  248.3303059
108 8.567123e-04   79.2434494  305.2428172
109 1.054193e-03   68.9348302  348.4511971
110 1.062887e-02   18.9322202  322.1914199
111 8.914347e-05   95.0011042  375.4000915
112 7.329760e-05  115.5254223  418.2203650
113 2.013655e-02   24.8584886  292.6145138
114 4.433107e-06  177.2914920  441.3261334
115 1.988553e-14  388.5353724  655.6121125
116 7.652212e-08  231.4344722  496.7945513
117 2.859940e-04 -320.9429530  -66.7936458
118 2.859940e-04   67.2335731  324.3810800
119 1.611051e-05 -390.8385981 -102.3570889
120 6.227607e-04 -337.9198584  -52.4158535
121 1.424826e-04 -421.0008940  -84.0121400
122 2.379215e-04 -403.5322772  -68.5180309
123 2.590720e-02   -7.9305110  333.5280492
124 2.785969e-02  -14.4156848  321.4252270
125 6.562346e-04   72.8488947  417.8365528
126 5.051001e-08 -591.9357382 -196.8662580
127 4.469994e-02  -12.3638079  389.1065277

Plots

# =========================================
# Plotting utilities (Learning & Test)
# Always request CIs and normalize CI column names
# =========================================
suppressPackageStartupMessages({
  library(dplyr)
  library(ggplot2)
  library(emmeans)
  library(stringr)
  library(readr)
  library(purrr)
})

alpha <- 0.05
padj_method <- "BH"

numify <- function(x) {
  if (is.numeric(x)) return(x)
  if (is.factor(x))  return(readr::parse_number(levels(x))[as.integer(x)])
  readr::parse_number(as.character(x))
}

# Ensure lower.CL/upper.CL exist (and df if provided)
std_emm_cols <- function(df) {
  nm <- names(df)
  if (!("df" %in% nm)) df <- dplyr::mutate(df, df = NA_real_)
  lower_candidates <- c("lower.CL","asymp.LCL","LCL","lower.HPD")
  upper_candidates <- c("upper.CL","asymp.UCL","UCL","upper.HPD")
  if (!("lower.CL" %in% nm)) {
    src <- lower_candidates[lower_candidates %in% nm][1]
    if (!is.na(src)) df <- dplyr::mutate(df, lower.CL = .data[[src]])
  }
  if (!("upper.CL" %in% nm)) {
    src <- upper_candidates[upper_candidates %in% nm][1]
    if (!is.na(src)) df <- dplyr::mutate(df, upper.CL = .data[[src]])
  }
  df
}

every_int_breaks <- function(x)
  seq(floor(min(x, na.rm=TRUE)), ceiling(max(x, na.rm=TRUE)), by = 1)

tops_fun <- function(emm_df, facet_cols) {
  emm_df %>%
    group_by(across(all_of(c(facet_cols, "step_num")))) %>%
    summarise(
      ymax  = suppressWarnings(max(upper.CL, na.rm = TRUE)),
      span  = diff(range(emmean, na.rm = TRUE)),
      bump  = ifelse(is.finite(span) & span > 0, 0.08*span, 0.08*abs(ymax)),
      y_top = ymax + bump,
      .groups = "drop"
    ) %>%
    mutate(y_top = ifelse(is.finite(y_top), y_top, ymax*1.05))
}

theme_pub <- theme_classic(base_size = 13) +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1),
        legend.position = "bottom")

pal_blocks     <- scales::hue_pal()(length(unique(df_learning_acc$block)))
pal_conds      <- c(Familiar = "#1B9E77", Unfamiliar = "#D95F02")
pal_difficulty <- c(`6`="#2E7D32", `12`="#F9A825", `18`="#C62828")

# Observed steps per difficulty (test phase)
obs_test_steps <- df_test_acc %>%
  mutate(step_num = numify(step)) %>%
  group_by(difficulty) %>%
  summarise(max_step = max(step_num, na.rm = TRUE), .groups = "drop")

# =========================================
# LEARNING PHASE
# =========================================

# A) Learning — same steps between blocks
make_learning_between_blocks_plot <- function(model, data, ylab) {
  emm_lines <- summary(emmeans(model, ~ step | block), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), block = factor(block))

  obs_steps <- data %>% mutate(step_num = numify(step)) %>%
    group_by(block) %>% summarise(max_step = max(step_num, na.rm = TRUE), .groups="drop")
  emm_lines <- left_join(emm_lines, obs_steps, by="block") %>% filter(step_num <= max_step)

  pairs_df <- pairs(emmeans(model, ~ block | step)) %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame() %>%
    mutate(step_num = numify(step)) %>% filter(p.value < alpha)

  if (nrow(pairs_df) == 0) {
    return(
      ggplot(emm_lines, aes(step_num, emmean, color = block, fill = block, group = block)) +
        geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
        geom_line() + geom_point(size = 1.6) +
        scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
        scale_color_manual(values = pal_blocks, name = "Block") +
        scale_fill_manual(values  = pal_blocks, guide = "none") +
        labs(x = "Step-Position", y = ylab) + theme_pub
    )
  }

  short_label <- function(s) {
    nums <- stringr::str_extract_all(s, "\\d+")[[1]]
    paste(nums, collapse = "–")
  }
  pairs_df <- pairs_df %>% mutate(label_short = vapply(contrast, short_label, character(1)))

  present <- unique(pairs_df$label_short)
  shape_pool <- c(19, 0, 17, 15, 18, 8, 7, 4)
  shape_vals <- setNames(shape_pool[seq_along(present)], present)
  off_pool   <- c(-0.18, -0.06, 0, 0.06, 0.18, -0.12, 0.12, 0.24)
  off_vals   <- setNames(off_pool[seq_along(present)], present)

  tops <- tops_fun(emm_lines, facet_cols = character(0))
  sig_marks <- left_join(pairs_df, tops, by = "step_num") %>%
    mutate(x_nudged = step_num + unname(off_vals[label_short]))

  ggplot(emm_lines, aes(step_num, emmean, color = block, fill = block, group = block)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_blocks, name = "Block") +
    scale_fill_manual(values  = pal_blocks, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    geom_point(data = sig_marks,
               aes(x = x_nudged, y = y_top, shape = label_short),
               inherit.aes = FALSE, size = 3) +
    scale_shape_manual(values = shape_vals, breaks = names(shape_vals),
                       name = "Sig. block contrasts") +
    guides(shape = guide_legend(nrow = 1, byrow = TRUE,
                                keywidth = 0.8, keyheight = 0.8))
}

# B) Learning — successive steps, facets by block
make_learning_successive_by_block_plot <- function(model, data, ylab) {
  emm_lines <- summary(emmeans(model, ~ step | block), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), block = factor(block))

  obs_steps <- data %>% mutate(step_num = numify(step)) %>%
    group_by(block) %>% summarise(max_step = max(step_num, na.rm = TRUE), .groups="drop")
  emm_lines <- left_join(emm_lines, obs_steps, by="block") %>% filter(step_num <= max_step)

  succ <- contrast(emmeans(model, ~ step | block), "consec") %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame()

  succ_marks <- succ %>%
    mutate(step_to = numify(str_extract(contrast, "(?<=\\s|p|P)\\d+$")),
           step_to = ifelse(is.na(step_to), numify(str_extract(contrast, "(?<=step)\\d+$")), step_to),
           block = factor(block)) %>%
    filter(p.value < alpha) %>%
    rename(step_num = step_to)

  tops <- tops_fun(emm_lines, facet_cols = "block")
  succ_marks <- left_join(succ_marks, tops, by = c("block","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = block, fill = block, group = block)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(. ~ block, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_blocks, name = "Block") +
    scale_fill_manual(values  = pal_blocks, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(succ_marks) > 0)
        geom_text(data = succ_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# =========================================
# TEST PHASE
# =========================================

# C) Test — facets by difficulty, lines per condition
make_test_cond_diff_per_step_plot <- function(model, data, ylab) {
  emm_lines <- summary(emmeans(model, ~ step | difficulty * cond), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), difficulty = factor(difficulty), cond = factor(cond)) %>%
    left_join(obs_test_steps, by = "difficulty") %>% filter(step_num <= max_step)

  pairs_cond <- pairs(emmeans(model, ~ cond | difficulty + step)) %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame() %>%
    mutate(step_num = numify(step)) %>% filter(p.value < alpha) %>%
    select(difficulty, step_num) %>% distinct()

  tops <- tops_fun(emm_lines, facet_cols = "difficulty")
  sig_marks <- left_join(pairs_cond, tops, by = c("difficulty","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = cond, fill = cond, group = cond)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(. ~ difficulty, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_conds, name = "Condition") +
    scale_fill_manual(values  = pal_conds, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(sig_marks) > 0)
        geom_text(data = sig_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# D) Test — successive steps, facets cond × difficulty
make_test_successive_by_cond_diff_plot <- function(model, data, ylab) {
  emm_lines <- summary(emmeans(model, ~ step | cond * difficulty), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), cond = factor(cond), difficulty = factor(difficulty)) %>%
    left_join(obs_test_steps, by = "difficulty") %>% filter(step_num <= max_step)

  succ <- contrast(emmeans(model, ~ step | cond * difficulty), "consec") %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame()

  succ_marks <- succ %>%
    mutate(step_to = numify(str_extract(contrast, "(?<=\\s|p|P)\\d+$")),
           step_to = ifelse(is.na(step_to), numify(str_extract(contrast, "(?<=step)\\d+$")), step_to),
           cond = factor(cond), difficulty = factor(difficulty)) %>%
    filter(p.value < alpha) %>%
    rename(step_num = step_to)

  tops <- tops_fun(emm_lines, facet_cols = c("cond","difficulty"))
  succ_marks <- left_join(succ_marks, tops, by = c("cond","difficulty","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = difficulty, fill = difficulty, group = difficulty)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(cond ~ difficulty, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_difficulty, name = "Difficulty") +
    scale_fill_manual(values  = pal_difficulty, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(succ_marks) > 0)
        geom_text(data = succ_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# E) Test — difficulties per condition
make_test_difficulty_per_condition_plot <- function(model, data, ylab) {

  emm_lines <- summary(emmeans(model, ~ step | cond * difficulty), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), cond = factor(cond), difficulty = factor(difficulty)) %>%
    left_join(obs_test_steps, by = "difficulty") %>% filter(step_num <= max_step)

  pairs_raw <- pairs(emmeans(model, ~ difficulty | cond + step)) %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame() %>%
    mutate(step_num = numify(step)) %>% filter(p.value < alpha)

  norm_contrast <- function(s) {
    nums <- sort(as.integer(stringr::str_extract_all(s, "\\d+")[[1]]))
    paste(nums, collapse = "–")
  }
  pairs_diff <- pairs_raw %>% mutate(contrast_short = vapply(contrast, norm_contrast, character(1)))

  present <- sort(unique(pairs_diff$contrast_short))
  shape_lookup <- c("6–12" = 19, "6–18" = 0, "12–18" = 17)
  shape_vals   <- shape_lookup[present]
  off_lookup   <- c("6–12" = -0.12, "6–18" = 0, "12–18" = 0.12)

  pairs_diff <- pairs_diff %>% mutate(x_nudged = step_num + unname(off_lookup[contrast_short]))

  tops <- tops_fun(emm_lines, facet_cols = "cond")
  sig_marks <- pairs_diff %>%
    select(cond, step_num, contrast_short, x_nudged) %>% distinct() %>%
    left_join(tops, by = c("cond","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = difficulty, fill = difficulty, group = difficulty)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(. ~ cond, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_difficulty, name = "Difficulty") +
    scale_fill_manual(values  = pal_difficulty, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(sig_marks) > 0)
        geom_point(data = sig_marks,
                   aes(x_nudged, y_top, shape = contrast_short),
                   inherit.aes = FALSE, size = 3) else NULL } +
    scale_shape_manual(values = shape_vals, breaks = names(shape_vals),
                       name = "Sig. difficulty contrasts") +
    guides(shape = guide_legend(nrow = 1, byrow = TRUE,
                                keywidth = 0.8, keyheight = 0.8))
}

# =========================================
# BUILD ALL PLOTS (θ & RT versions)
# =========================================

p_learn_between_theta <- make_learning_between_blocks_plot(M_theta_learning, df_learning_acc, ylab = expression(theta~"ERD/S"))
p_learn_between_rt    <- make_learning_between_blocks_plot(M_RT_learning,    df_learning_acc, ylab = "RT (ms)")

p_learn_succ_theta <- make_learning_successive_by_block_plot(M_theta_learning, df_learning_acc, ylab = expression(theta~"ERD/S"))
p_learn_succ_rt    <- make_learning_successive_by_block_plot(M_RT_learning,    df_learning_acc, ylab = "RT (ms)")

p_test_cond_theta <- make_test_cond_diff_per_step_plot(M_theta_test, df_test_acc, ylab = expression(theta~"ERD/S"))
p_test_cond_rt    <- make_test_cond_diff_per_step_plot(M_RT_test,    df_test_acc, ylab = "RT (ms)")

p_test_succ_theta <- make_test_successive_by_cond_diff_plot(M_theta_test, df_test_acc, ylab = expression(theta~"ERD/S"))
p_test_succ_rt    <- make_test_successive_by_cond_diff_plot(M_RT_test,    df_test_acc, ylab = "RT (ms)")

p_test_diff_theta <- make_test_difficulty_per_condition_plot(M_theta_test, df_test_acc, ylab = expression(theta~"ERD/S"))
p_test_diff_rt    <- make_test_difficulty_per_condition_plot(M_RT_test,    df_test_acc, ylab = "RT (ms)")

p_learn_between_theta

p_learn_between_rt

p_learn_succ_theta

p_learn_succ_rt

p_test_cond_theta

p_test_cond_rt

p_test_succ_theta

p_test_succ_rt

p_test_diff_theta

p_test_diff_rt

2nd version of graphs

# =========================================
# Plotting utilities (Learning & Test)
# =========================================
suppressPackageStartupMessages({
  library(dplyr)
  library(ggplot2)
  library(emmeans)
  library(stringr)
  library(readr)
  library(purrr)
})

alpha <- 0.05
padj_method <- "BH"

# ---------------------------
# Helpers
# ---------------------------
numify <- function(x) {
  if (is.numeric(x)) return(x)
  if (is.factor(x))  return(readr::parse_number(levels(x))[as.integer(x)])
  readr::parse_number(as.character(x))
}

# Ensure lower.CL/upper.CL exist (and df if provided)
std_emm_cols <- function(df) {
  nm <- names(df)
  if (!("df" %in% nm)) df <- dplyr::mutate(df, df = NA_real_)
  lower_candidates <- c("lower.CL","asymp.LCL","LCL","lower.HPD")
  upper_candidates <- c("upper.CL","asymp.UCL","UCL","upper.HPD")
  if (!("lower.CL" %in% nm)) {
    src <- lower_candidates[lower_candidates %in% nm][1]
    if (!is.na(src)) df <- dplyr::mutate(df, lower.CL = .data[[src]])
  }
  if (!("upper.CL" %in% nm)) {
    src <- upper_candidates[upper_candidates %in% nm][1]
    if (!is.na(src)) df <- dplyr::mutate(df, upper.CL = .data[[src]])
  }
  df
}

every_int_breaks <- function(x)
  seq(floor(min(x, na.rm=TRUE)), ceiling(max(x, na.rm=TRUE)), by = 1)

tops_fun <- function(emm_df, facet_cols) {
  emm_df %>%
    group_by(across(all_of(c(facet_cols, "step_num")))) %>%
    summarise(
      ymax  = suppressWarnings(max(upper.CL, na.rm = TRUE)),
      span  = diff(range(emmean, na.rm = TRUE)),
      bump  = ifelse(is.finite(span) & span > 0, 0.08*span, 0.08*abs(ymax)),
      y_top = ymax + bump,
      .groups = "drop"
    ) %>%
    mutate(y_top = ifelse(is.finite(y_top), y_top, ymax*1.05))
}

theme_pub <- theme_classic(base_size = 13) +
  theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust = 1),
        legend.position = "bottom")

# ---------------------------
# Palettes & relabeling
# ---------------------------
pal_conds      <- c(Familiar = "#1B9E77", Unfamiliar = "#D95F02")
pal_difficulty <- c(`6`="#2E7D32", `12`="#F9A825", `18`="#C62828")

# Display-only relabels for blocks → Difficulty
block_label_map <- c(`1` = "6-Step", `2` = "12-Step", `3` = "18-Step")
block_to_num    <- c(`1` = "6",      `2` = "12",       `3` = "18")

# Green / Yellow / Red for blocks 1/2/3
pal_blocks <- c(`1`="#2E7D32", `2`="#F9A825", `3`="#C62828")

# Test-phase contrast facet order (EN-DASH)
contrast_levels <- c("6–12","6–18","12–18")
contrast_to_diffs <- list(
  `6–12` = c("6","12"),
  `6–18` = c("6","18"),
  `12–18`= c("12","18")
)

# ---------------------------
# Observed steps per difficulty (test phase)
# ---------------------------
obs_test_steps <- df_test_acc %>%
  mutate(step_num = numify(step)) %>%
  group_by(difficulty) %>%
  summarise(max_step = max(step_num, na.rm = TRUE), .groups = "drop")

# =========================================
# LEARNING PHASE
# =========================================

# A) Learning — BETWEEN difficulties (keep FACETED CONTRASTS: 6–12, 6–18, 12–18)
make_learning_between_blocks_plot <- function(model, data, ylab) {

  emm_lines_base <- summary(emmeans(model, ~ step | block), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step),
           block = factor(block, levels = c("1","2","3")))

  obs_steps <- data %>% mutate(step_num = numify(step)) %>%
    group_by(block) %>% summarise(max_step = max(step_num, na.rm = TRUE), .groups="drop")
  emm_lines_base <- left_join(emm_lines_base, obs_steps, by="block") %>% filter(step_num <= max_step)

  pairs_df <- pairs(emmeans(model, ~ block | step)) %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame() %>%
    mutate(step_num = numify(step))

  to_diff_label <- function(s) {
    nums <- stringr::str_extract_all(s, "\\d+")[[1]]
    if (length(nums) == 2) paste(block_to_num[nums], collapse = "–") else s
  }
  pairs_df <- pairs_df %>%
    mutate(contrast_short = vapply(contrast, to_diff_label, character(1))) %>%
    filter(contrast_short %in% contrast_levels) %>%
    mutate(contrast_short = factor(contrast_short, levels = contrast_levels, ordered = TRUE))

  emm_faceted <- purrr::map_dfr(contrast_levels, function(k) {
    diffs <- list(`6–12`=c("1","2"),`6–18`=c("1","3"),`12–18`=c("2","3"))[[k]]
    emm_lines_base %>%
      filter(as.character(block) %in% diffs) %>%
      mutate(contrast_short = factor(k, levels = contrast_levels, ordered = TRUE))
  })

  sig_marks <- pairs_df %>%
    filter(p.value < alpha) %>%
    select(contrast_short, step_num) %>% distinct()

  tops <- tops_fun(emm_faceted, facet_cols = "contrast_short")
  sig_marks <- left_join(sig_marks, tops, by = c("contrast_short","step_num"))

  ggplot(emm_faceted, aes(step_num, emmean, color = block, fill = block, group = block)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(. ~ contrast_short, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_blocks, breaks = names(block_label_map),
                       labels = unname(block_label_map), name = "Difficulty") +
    scale_fill_manual(values  = pal_blocks, breaks = names(block_label_map),
                      labels = unname(block_label_map), guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(sig_marks) > 0)
        geom_text(data = sig_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# B) Learning — SUCCESSIVE steps (WITHIN difficulty), FACET BY DIFFICULTY ONLY
make_learning_successive_by_block_plot <- function(model, data, ylab) {

  emm_lines <- summary(emmeans(model, ~ step | block), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step),
           block = factor(block, levels = c("1","2","3")))

  obs_steps <- data %>% mutate(step_num = numify(step)) %>%
    group_by(block) %>% summarise(max_step = max(step_num, na.rm = TRUE), .groups="drop")
  emm_lines <- left_join(emm_lines, obs_steps, by="block") %>% filter(step_num <= max_step)

  # successive (consec) contrasts WITHIN each block
  succ <- contrast(emmeans(model, ~ step | block), "consec") %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame()

  succ_marks <- succ %>%
    mutate(step_to = numify(str_extract(contrast, "(?<=\\s|p|P)\\d+$")),
           step_to = ifelse(is.na(step_to), numify(str_extract(contrast, "(?<=step)\\d+$")), step_to),
           block   = factor(block, levels = c("1","2","3"))) %>%
    filter(p.value < alpha) %>%
    rename(step_num = step_to)

  tops <- tops_fun(emm_lines, facet_cols = "block")
  succ_marks <- left_join(succ_marks, tops, by = c("block","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = block, fill = block, group = block)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(. ~ block, scales = "free_x", space = "free_x",
               labeller = labeller(block = as_labeller(block_label_map))) +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_blocks, breaks = names(block_label_map),
                       labels = unname(block_label_map), name = "Difficulty") +
    scale_fill_manual(values  = pal_blocks, breaks = names(block_label_map),
                      labels = unname(block_label_map), guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(succ_marks) > 0)
        geom_text(data = succ_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# =========================================
# TEST PHASE (unchanged; contrast facets retained)
# =========================================

# C) Test — facets by difficulty, lines per condition
make_test_cond_diff_per_step_plot <- function(model, data, ylab) {
  emm_lines <- summary(emmeans(model, ~ step | difficulty * cond), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), difficulty = factor(difficulty), cond = factor(cond)) %>%
    left_join(obs_test_steps, by = "difficulty") %>% filter(step_num <= max_step)

  pairs_cond <- pairs(emmeans(model, ~ cond | difficulty + step)) %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame() %>%
    mutate(step_num = numify(step)) %>% filter(p.value < alpha) %>%
    select(difficulty, step_num) %>% distinct()

  tops <- tops_fun(emm_lines, facet_cols = "difficulty")
  sig_marks <- left_join(pairs_cond, tops, by = c("difficulty","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = cond, fill = cond, group = cond)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(. ~ difficulty, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_conds, name = "Condition") +
    scale_fill_manual(values  = pal_conds, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(sig_marks) > 0)
        geom_text(data = sig_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# D) Test — successive steps, facets cond × difficulty
make_test_successive_by_cond_diff_plot <- function(model, data, ylab) {
  emm_lines <- summary(emmeans(model, ~ step | cond * difficulty), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step), cond = factor(cond), difficulty = factor(difficulty)) %>%
    left_join(obs_test_steps, by = "difficulty") %>% filter(step_num <= max_step)

  succ <- contrast(emmeans(model, ~ step | cond * difficulty), "consec") %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame()

  succ_marks <- succ %>%
    mutate(step_to = numify(str_extract(contrast, "(?<=\\s|p|P)\\d+$")),
           step_to = ifelse(is.na(step_to), numify(str_extract(contrast, "(?<=step)\\d+$")), step_to),
           cond = factor(cond), difficulty = factor(difficulty)) %>%
    filter(p.value < alpha) %>%
    rename(step_num = step_to)

  tops <- tops_fun(emm_lines, facet_cols = c("cond","difficulty"))
  succ_marks <- left_join(succ_marks, tops, by = c("cond","difficulty","step_num"))

  ggplot(emm_lines, aes(step_num, emmean, color = difficulty, fill = difficulty, group = difficulty)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(cond ~ difficulty, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_difficulty, name = "Difficulty") +
    scale_fill_manual(values  = pal_difficulty, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(succ_marks) > 0)
        geom_text(data = succ_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# E) Test — difficulties per condition (FACET BY CONTRAST × CONDITION, ordered)
make_test_difficulty_per_condition_plot <- function(model, data, ylab) {

  emm_lines <- summary(emmeans(model, ~ step | cond * difficulty), infer = c(TRUE, TRUE)) %>%
    as.data.frame() %>% std_emm_cols() %>%
    mutate(step_num = numify(step),
           cond = factor(cond),
           difficulty = factor(difficulty)) %>%
    left_join(obs_test_steps, by = "difficulty") %>% filter(step_num <= max_step)

  pairs_raw <- pairs(emmeans(model, ~ difficulty | cond + step)) %>%
    summary(infer = c(TRUE, TRUE), adjust = padj_method) %>% as.data.frame() %>%
    mutate(step_num = numify(step))

  norm_contrast <- function(s) {
    nums <- sort(as.integer(stringr::str_extract_all(s, "\\d+")[[1]]))
    paste(nums, collapse = "–")
  }
  pairs_df <- pairs_raw %>%
    mutate(contrast_short = vapply(contrast, norm_contrast, character(1))) %>%
    filter(contrast_short %in% contrast_levels) %>%
    mutate(contrast_short = factor(contrast_short, levels = contrast_levels, ordered = TRUE))

  emm_faceted <- purrr::map_dfr(contrast_levels, function(k) {
    diffs <- contrast_to_diffs[[k]]
    emm_lines %>%
      filter(as.character(difficulty) %in% diffs) %>%
      mutate(contrast_short = factor(k, levels = contrast_levels, ordered = TRUE))
  })

  sig_marks <- pairs_df %>%
    filter(p.value < alpha) %>%
    select(cond, contrast_short, step_num) %>% distinct()

  tops <- tops_fun(emm_faceted, facet_cols = c("cond","contrast_short"))
  sig_marks <- left_join(sig_marks, tops, by = c("cond","contrast_short","step_num"))

  ggplot(emm_faceted, aes(step_num, emmean, color = difficulty, fill = difficulty, group = difficulty)) +
    geom_ribbon(aes(ymin = lower.CL, ymax = upper.CL), alpha = 0.15, linewidth = 0) +
    geom_line() + geom_point(size = 1.6) +
    facet_grid(cond ~ contrast_short, scales = "free_x", space = "free_x") +
    scale_x_continuous(breaks = function(x) every_int_breaks(x)) +
    scale_color_manual(values = pal_difficulty, name = "Difficulty") +
    scale_fill_manual(values  = pal_difficulty, guide = "none") +
    labs(x = "Step-Position", y = ylab) +
    theme_pub +
    { if(nrow(sig_marks) > 0)
        geom_text(data = sig_marks, aes(step_num, y_top, label = "*"),
                  inherit.aes = FALSE, size = 4) else NULL }
}

# =========================================
# BUILD ALL PLOTS (θ & RT versions)
# =========================================

p_learn_between_theta <- make_learning_between_blocks_plot(M_theta_learning, df_learning_acc, ylab = expression(theta~"ERD/S"))
p_learn_between_rt    <- make_learning_between_blocks_plot(M_RT_learning,    df_learning_acc, ylab = "RT (ms)")

p_learn_succ_theta <- make_learning_successive_by_block_plot(M_theta_learning, df_learning_acc, ylab = expression(theta~"ERD/S"))
p_learn_succ_rt    <- make_learning_successive_by_block_plot(M_RT_learning,    df_learning_acc, ylab = "RT (ms)")

p_test_cond_theta <- make_test_cond_diff_per_step_plot(M_theta_test, df_test_acc, ylab = expression(theta~"ERD/S"))
p_test_cond_rt    <- make_test_cond_diff_per_step_plot(M_RT_test,    df_test_acc, ylab = "RT (ms)")

p_test_succ_theta <- make_test_successive_by_cond_diff_plot(M_theta_test, df_test_acc, ylab = expression(theta~"ERD/S"))
p_test_succ_rt    <- make_test_successive_by_cond_diff_plot(M_RT_test,    df_test_acc, ylab = "RT (ms)")

p_test_diff_theta <- make_test_difficulty_per_condition_plot(M_theta_test, df_test_acc, ylab = expression(theta~"ERD/S"))
p_test_diff_rt    <- make_test_difficulty_per_condition_plot(M_RT_test,    df_test_acc, ylab = "RT (ms)")

# Print (optional)
p_learn_between_theta

p_learn_between_rt

p_learn_succ_theta

p_learn_succ_rt

p_test_cond_theta

p_test_cond_rt

p_test_succ_theta

p_test_succ_rt

p_test_diff_theta

p_test_diff_rt

# ==========================================================
# All-pairs (non-adjacent allowed) step contrasts
#   - Learning: within block (theta & RT)
#   - Test: within condition × difficulty (theta & RT)
# ==========================================================

suppressPackageStartupMessages({
  library(dplyr)
  library(emmeans)
  library(stringr)
  library(readr)
  library(purrr)
})

alpha <- 0.05
padj_method <- "BH"

# robust parser for "step12" / factor / numeric
numify <- function(x) {
  if (is.numeric(x)) return(x)
  if (is.factor(x))  return(readr::parse_number(levels(x))[as.integer(x)])
  readr::parse_number(as.character(x))
}

# parse step numbers out of a contrast label like "step7 - step3" or "7 - 3"
parse_steps <- function(lbl) {
  v <- stringr::str_extract_all(lbl, "\\d+")[[1]]
  tibble(step_from = as.integer(v[2]), step_to = as.integer(v[1]))
}

# ---- observed step grids for filtering (avoid impossible steps) ----
obs_learning <- df_learning_acc %>%
  mutate(step_num = numify(step)) %>%
  distinct(block, step_num)

obs_test <- df_test_acc %>%
  mutate(step_num = numify(step)) %>%
  distinct(cond, difficulty, step_num)

# ---------- 1) Learning: θ, all pairwise steps within block ----------
L_theta_allpairs <- {
  emm <- emmeans(M_theta_learning, ~ step | block)
  out <- pairs(emm) %>% summary(infer = TRUE, adjust = padj_method) %>% as.data.frame()

  steps_parsed <- map_dfr(out$contrast, parse_steps)
  out <- bind_cols(out, steps_parsed) %>%
    mutate(step_from = as.integer(step_from),
           step_to   = as.integer(step_to),
           distance  = abs(step_to - step_from)) %>%
    # keep only pairs we actually observed for that block
    inner_join(obs_learning, by = c("block","step_from" = "step_num")) %>%
    inner_join(obs_learning, by = c("block","step_to"   = "step_num")) %>%
    transmute(phase = "learning", dv = "theta",
              block, step_from, step_to, distance,
              estimate, SE, df, t.ratio, lower.CL, upper.CL, p.value) %>%
    filter(p.value < alpha) %>%
    arrange(block, step_from, step_to)
}

# ---------- 2) Learning: RT, all pairwise steps within block ----------
L_rt_allpairs <- {
  emm <- emmeans(M_RT_learning, ~ step | block)
  out <- pairs(emm) %>% summary(infer = TRUE, adjust = padj_method) %>% as.data.frame()

  steps_parsed <- map_dfr(out$contrast, parse_steps)
  out <- bind_cols(out, steps_parsed) %>%
    mutate(step_from = as.integer(step_from),
           step_to   = as.integer(step_to),
           distance  = abs(step_to - step_from)) %>%
    inner_join(obs_learning, by = c("block","step_from" = "step_num")) %>%
    inner_join(obs_learning, by = c("block","step_to"   = "step_num")) %>%
    transmute(phase = "learning", dv = "RT",
              block, step_from, step_to, distance,
              estimate, SE, df, t.ratio, lower.CL, upper.CL, p.value) %>%
    filter(p.value < alpha) %>%
    arrange(block, step_from, step_to)
}

# ---------- 3) Test: θ, all pairwise steps within cond × difficulty ----------
T_theta_allpairs <- {
  emm <- emmeans(M_theta_test, ~ step | cond * difficulty)
  out <- pairs(emm) %>% summary(infer = TRUE, adjust = padj_method) %>% as.data.frame()

  steps_parsed <- map_dfr(out$contrast, parse_steps)
  out <- bind_cols(out, steps_parsed) %>%
    mutate(step_from = as.integer(step_from),
           step_to   = as.integer(step_to),
           distance  = abs(step_to - step_from)) %>%
    inner_join(obs_test, by = c("cond","difficulty","step_from" = "step_num")) %>%
    inner_join(obs_test, by = c("cond","difficulty","step_to"   = "step_num")) %>%
    transmute(phase = "test", dv = "theta",
              cond, difficulty, step_from, step_to, distance,
              estimate, SE, df, t.ratio, lower.CL, upper.CL, p.value) %>%
    filter(p.value < alpha) %>%
    arrange(cond, difficulty, step_from, step_to)
}

# ---------- 4) Test: RT, all pairwise steps within cond × difficulty ----------
T_rt_allpairs <- {
  emm <- emmeans(M_RT_test, ~ step | cond * difficulty)
  out <- pairs(emm) %>% summary(infer = TRUE, adjust = padj_method) %>% as.data.frame()

  steps_parsed <- map_dfr(out$contrast, parse_steps)
  out <- bind_cols(out, steps_parsed) %>%
    mutate(step_from = as.integer(step_from),
           step_to   = as.integer(step_to),
           distance  = abs(step_to - step_from)) %>%
    inner_join(obs_test, by = c("cond","difficulty","step_from" = "step_num")) %>%
    inner_join(obs_test, by = c("cond","difficulty","step_to"   = "step_num")) %>%
    transmute(phase = "test", dv = "RT",
              cond, difficulty, step_from, step_to, distance,
              estimate, SE, df, t.ratio, lower.CL, upper.CL, p.value) %>%
    filter(p.value < alpha) %>%
    arrange(cond, difficulty, step_from, step_to)
}

# ---------- Combined significant table ----------
allpairs_sig <- bind_rows(
  L_theta_allpairs,
  L_rt_allpairs,
  T_theta_allpairs,
  T_rt_allpairs
)

# peek
print(allpairs_sig)
       phase    dv block step_from step_to distance   estimate       SE
1   learning theta     1         3       1        2  148.31071 33.19302
2   learning theta     1         3       2        1  120.04553 32.77200
3   learning theta     1         4       1        3  155.17271 33.37875
4   learning theta     1         4       2        2  126.90753 32.95692
5   learning theta     1         5       3        2 -132.56675 32.95168
6   learning theta     1         5       4        1 -139.42875 33.13624
7   learning theta     1         6       1        5 -163.99235 33.28426
8   learning theta     1         6       2        4 -192.25753 32.86624
9   learning theta     1         6       3        3 -312.30306 33.23499
10  learning theta     1         6       4        2 -319.16506 33.40901
11  learning theta     1         6       5        1 -179.73631 33.04420
12  learning theta     2         2      10        8 -104.16405 36.97213
13  learning theta     2         2      11        9  153.10346 36.69438
14  learning theta     2         2      12       10  273.91159 37.08795
15  learning theta     2         3       1        2  197.70688 37.26051
16  learning theta     2         3       2        1  144.74001 36.85544
17  learning theta     2         3      11        8  297.84347 37.25034
18  learning theta     2         3      12        9  418.65160 37.63753
19  learning theta     2         4       1        3  223.92683 37.26668
20  learning theta     2         4       2        2  170.95997 36.86083
21  learning theta     2         4      11        7  324.06342 37.25373
22  learning theta     2         4      12        8  444.87155 37.63815
23  learning theta     2         5       1        4  235.92715 36.74047
24  learning theta     2         5       2        3  182.96029 36.33589
25  learning theta     2         5      11        6  336.06374 36.79762
26  learning theta     2         5      12        7  456.87187 37.19092
27  learning theta     2         6       1        5  250.05544 37.20487
28  learning theta     2         6       2        4  197.08857 36.79929
29  learning theta     2         6      10        4   92.92452 37.43572
30  learning theta     2         6      11        5  350.19203 37.20001
31  learning theta     2         6      12        6  471.00016 37.58658
32  learning theta     2         7       1        6  248.53428 36.88640
33  learning theta     2         7       2        5  195.56741 36.48378
34  learning theta     2         7      10        3   91.40336 37.21347
35  learning theta     2         7      11        4  348.67087 36.93872
36  learning theta     2         7      12        5  469.47900 37.33086
37  learning theta     2         8       1        7  234.36870 37.38120
38  learning theta     2         8       2        6  181.40183 36.97722
39  learning theta     2         8      11        3  334.50529 37.37920
40  learning theta     2         8      12        4  455.31342 37.76613
41  learning theta     2         9       1        8  198.65596 37.22734
42  learning theta     2         9       2        7  145.68909 36.82205
43  learning theta     2         9      11        2  298.79255 37.22240
44  learning theta     2         9      12        3  419.60068 37.60982
45  learning theta     2        10       1        9  157.13092 37.37295
46  learning theta     2        11       1       10 -100.13659 37.09740
47  learning theta     2        11      10        1 -257.26751 37.37650
48  learning theta     2        12       1       11 -220.94472 37.48752
49  learning theta     2        12      10        2 -378.07564 37.76213
50  learning theta     2        12      11        1 -120.80813 37.51009
51  learning theta     3         2      10        8 -220.09477 37.35923
52  learning theta     3         2      11        9 -239.94170 37.12865
53  learning theta     3         2      12       10 -189.80035 37.01525
54  learning theta     3         2      13       11 -150.13842 37.85224
55  learning theta     3         2      14       12 -179.50013 36.94793
56  learning theta     3         2      15       13 -196.77899 37.15206
57  learning theta     3         2      16       14 -113.74061 37.17120
58  learning theta     3         2      18       16  140.07816 37.19307
59  learning theta     3         3       1        2  258.15031 37.58098
60  learning theta     3         3       2        1  214.38558 37.17864
61  learning theta     3         3      16       13  100.64497 37.48217
62  learning theta     3         3      17       14  274.70396 37.90224
63  learning theta     3         3      18       15  354.46374 37.51091
64  learning theta     3         4       1        3  245.64022 37.42134
65  learning theta     3         4       2        2  201.87549 37.01755
66  learning theta     3         4      16       12   88.13488 37.32296
67  learning theta     3         4      17       13  262.19387 37.75979
68  learning theta     3         4      18       14  341.95365 37.34996
69  learning theta     3         5       1        4  229.45145 37.37346
70  learning theta     3         5       2        3  185.68672 36.97136
71  learning theta     3         5      17       12  246.00510 37.71414
72  learning theta     3         5      18       13  325.76488 37.30418
73  learning theta     3         6       1        5  257.96401 37.37348
74  learning theta     3         6       2        4  214.19928 36.97139
75  learning theta     3         6      16       10  100.45867 37.27828
76  learning theta     3         6      17       11  274.51767 37.71294
77  learning theta     3         6      18       12  354.27745 37.30441
78  learning theta     3         7       1        6  267.94727 37.28544
79  learning theta     3         7       2        5  224.18254 36.88252
80  learning theta     3         7      16        9  110.44193 37.19261
81  learning theta     3         7      17       10  284.50092 37.62970
82  learning theta     3         7      18       11  364.26070 37.21549
83  learning theta     3         8       1        7  271.57226 37.60437
84  learning theta     3         8       2        6  227.80753 37.20249
85  learning theta     3         8      16        8  114.06692 37.50546
86  learning theta     3         8      17        9  288.12591 37.92442
87  learning theta     3         8      18       10  367.88569 37.53486
88  learning theta     3         9       1        8  232.85077 37.39393
89  learning theta     3         9       2        7  189.08604 36.99309
90  learning theta     3         9      17        8  249.40442 37.73622
91  learning theta     3         9      18        9  329.16420 37.32581
92  learning theta     3        10       1        9  263.85950 37.75745
93  learning theta     3        11       1       10  283.70643 37.52763
94  learning theta     3        12       1       11  233.56508 37.41663
95  learning theta     3        13       1       12  193.90316 38.24391
96  learning theta     3        13      11        2  -89.80328 38.11682
97  learning theta     3        14       1       13  223.26486 37.34932
98  learning theta     3        15       1       14  240.54372 37.55258
99  learning theta     3        16       1       15  157.50534 37.57242
100 learning theta     3        16      10        6 -106.35416 37.66289
101 learning theta     3        16      11        5 -126.20109 37.43424
102 learning theta     3        17      10        7 -280.41315 38.08915
103 learning theta     3        17      11        6 -300.26008 37.87355
104 learning theta     3        17      12        5 -250.11873 37.75871
105 learning theta     3        17      13        4 -210.45681 38.56979
106 learning theta     3        17      14        3 -239.81851 37.69716
107 learning theta     3        17      15        2 -257.09737 37.88101
108 learning theta     3        17      16        1 -174.05899 37.90890
109 learning theta     3        18       1       17  -96.31343 37.59491
110 learning theta     3        18      10        8 -360.17293 37.68966
111 learning theta     3        18      11        7 -380.01986 37.46006
112 learning theta     3        18      12        6 -329.87851 37.34740
113 learning theta     3        18      13        5 -290.21659 38.17769
114 learning theta     3        18      14        4 -319.57829 37.28034
115 learning theta     3        18      15        3 -336.85715 37.48339
116 learning theta     3        18      16        2 -253.81877 37.50199
117 learning    RT     1         2       1        1  226.35221 11.09918
118 learning    RT     1         3       1        2  252.14005 11.26839
119 learning    RT     1         3       2        1   25.78784 11.11999
120 learning    RT     1         4       1        3  249.93090 11.33614
121 learning    RT     1         5       1        4  234.32918 11.16214
122 learning    RT     1         6       1        5  254.04634 11.30581
123 learning    RT     1         6       2        4   27.69413 11.15622
124 learning    RT     2         2       1        1  241.11623 12.42882
125 learning    RT     2         2      12       10  -66.70243 12.58777
126 learning    RT     2         3       1        2  274.68196 12.64523
127 learning    RT     2         3       2        1   33.56574 12.50357
128 learning    RT     2         3      10        7   46.16407 12.71890
129 learning    RT     2         3      12        9  -33.13669 12.77672
130 learning    RT     2         4       1        3  308.59547 12.64705
131 learning    RT     2         4       2        2   67.47924 12.50409
132 learning    RT     2         4       3        1   33.91350 12.66661
133 learning    RT     2         4      10        6   80.07757 12.71796
134 learning    RT     2         4      11        7   44.10079 12.64043
135 learning    RT     2         5       1        4  237.07832 12.46609
136 learning    RT     2         5       3        2  -37.60364 12.53969
137 learning    RT     2         5       4        1  -71.51715 12.54122
138 learning    RT     2         5      11        6  -27.41635 12.48713
139 learning    RT     2         5      12        7  -70.74034 12.62429
140 learning    RT     2         6       1        5  223.78599 12.62672
141 learning    RT     2         6       3        3  -50.89597 12.65135
142 learning    RT     2         6       4        2  -84.80947 12.65177
143 learning    RT     2         6      11        5  -40.70868 12.62327
144 learning    RT     2         6      12        6  -84.03267 12.75994
145 learning    RT     2         7       1        6  239.61455 12.51587
146 learning    RT     2         7       3        4  -35.06741 12.58798
147 learning    RT     2         7       4        3  -68.98091 12.58956
148 learning    RT     2         7      12        5  -68.20410 12.67136
149 learning    RT     2         8       1        7  235.76787 12.68968
150 learning    RT     2         8       3        5  -38.91410 12.71688
151 learning    RT     2         8       4        4  -72.82760 12.71769
152 learning    RT     2         8      11        3  -28.72681 12.68788
153 learning    RT     2         8      12        4  -72.05079 12.82201
154 learning    RT     2         9       1        8  192.13220 12.63561
155 learning    RT     2         9       2        7  -48.98403 12.49316
156 learning    RT     2         9       3        6  -82.54976 12.66026
157 learning    RT     2         9       4        5 -116.46326 12.66057
158 learning    RT     2         9       5        4  -44.94612 12.52853
159 learning    RT     2         9       6        3  -31.65379 12.64430
160 learning    RT     2         9       7        2  -47.48235 12.57872
161 learning    RT     2         9       8        1  -43.63567 12.70730
162 learning    RT     2         9      10        1  -36.38570 12.70988
163 learning    RT     2         9      11        2  -72.36247 12.63271
164 learning    RT     2         9      12        3 -115.68646 12.76595
165 learning    RT     2        10       1        9  228.51790 12.68627
166 learning    RT     2        11       1       10  264.49468 12.59099
167 learning    RT     2        11      10        1   35.97678 12.68606
168 learning    RT     2        12       1       11  307.81866 12.72668
169 learning    RT     2        12      10        2   79.30076 12.82021
170 learning    RT     2        12      11        1   43.32398 12.73377
171 learning    RT     3         2       1        1  243.83381 12.64589
172 learning    RT     3         2      10        8   43.30424 12.67719
173 learning    RT     3         2      12       10  -34.05300 12.55853
174 learning    RT     3         2      13       11   65.54949 12.85020
175 learning    RT     3         2      14       12   62.55417 12.53418
176 learning    RT     3         2      16       14  -48.27896 12.61293
177 learning    RT     3         3       1        2  269.27221 12.75741
178 learning    RT     3         3      10        7   68.74264 12.78174
179 learning    RT     3         3      11        8   37.41172 12.70756
180 learning    RT     3         3      13       10   90.98788 12.95199
181 learning    RT     3         3      14       11   87.99257 12.64682
182 learning    RT     3         3      15       12   42.80820 12.71076
183 learning    RT     3         3      18       15   32.01851 12.73008
184 learning    RT     3         4       1        3  297.32316 12.70074
185 learning    RT     3         4       2        2   53.48935 12.55630
186 learning    RT     3         4       3        1   28.05095 12.66316
187 learning    RT     3         4      10        6   96.79359 12.72775
188 learning    RT     3         4      11        7   65.46267 12.64988
189 learning    RT     3         4      13        9  119.03884 12.90404
190 learning    RT     3         4      14       10  116.04353 12.58934
191 learning    RT     3         4      15       11   70.85915 12.66004
192 learning    RT     3         4      17       13   33.99758 12.81528
193 learning    RT     3         4      18       14   60.06946 12.67382
194 learning    RT     3         5       1        4  240.75087 12.68360
195 learning    RT     3         5       3        2  -28.52134 12.64870
196 learning    RT     3         5       4        1  -56.57229 12.59276
197 learning    RT     3         5      10        5   40.22130 12.71315
198 learning    RT     3         5      12        7  -37.13594 12.59392
199 learning    RT     3         5      13        8   62.46654 12.88737
200 learning    RT     3         5      14        9   59.47123 12.57343
201 learning    RT     3         5      16       11  -51.36190 12.64926
202 learning    RT     3         6       1        5  202.31545 12.68404
203 learning    RT     3         6       2        4  -41.51836 12.54093
204 learning    RT     3         6       3        3  -66.95676 12.64842
205 learning    RT     3         6       4        2  -95.00772 12.59269
206 learning    RT     3         6       5        1  -38.43542 12.57887
207 learning    RT     3         6      11        5  -29.54505 12.63533
208 learning    RT     3         6      12        6  -75.57136 12.59448
209 learning    RT     3         6      16       10  -89.79732 12.65084
210 learning    RT     3         6      17       11  -61.01014 12.79895
211 learning    RT     3         6      18       12  -34.93825 12.65966
212 learning    RT     3         7       1        6  251.31499 12.65238
213 learning    RT     3         7       4        3  -46.00817 12.56516
214 learning    RT     3         7       6        1   48.99955 12.54927
215 learning    RT     3         7      10        3   50.78542 12.68557
216 learning    RT     3         7      13        6   73.03067 12.85743
217 learning    RT     3         7      14        7   70.03536 12.54133
218 learning    RT     3         7      16        9  -40.79777 12.62056
219 learning    RT     3         8       1        7  251.54790 12.76547
220 learning    RT     3         8       4        4  -45.77527 12.67256
221 learning    RT     3         8       6        2   49.23245 12.65604
222 learning    RT     3         8      10        2   51.01832 12.78954
223 learning    RT     3         8      13        5   73.26357 12.95984
224 learning    RT     3         8      14        6   70.26826 12.65494
225 learning    RT     3         8      16        8  -40.56487 12.72831
226 learning    RT     3         9       1        8  213.61528 12.69031
227 learning    RT     3         9       2        7  -30.21853 12.55067
228 learning    RT     3         9       3        6  -55.65693 12.65739
229 learning    RT     3         9       4        5  -83.70788 12.60091
230 learning    RT     3         9       5        4  -27.13559 12.58685
231 learning    RT     3         9       7        2  -37.69971 12.55756
232 learning    RT     3         9       8        1  -37.93261 12.66632
233 learning    RT     3         9      12        3  -64.27153 12.60022
234 learning    RT     3         9      13        4   35.33096 12.89623
235 learning    RT     3         9      14        5   32.33565 12.58058
236 learning    RT     3         9      16        7  -78.49748 12.65782
237 learning    RT     3         9      17        8  -49.71030 12.80737
238 learning    RT     3        10       1        9  200.52957 12.81899
239 learning    RT     3        11       1       10  231.86049 12.73589
240 learning    RT     3        11      10        1   31.33092 12.76970
241 learning    RT     3        12       1       11  277.88681 12.69917
242 learning    RT     3        12      10        2   77.35724 12.72863
243 learning    RT     3        12      11        1   46.02632 12.64941
244 learning    RT     3        13       1       12  178.28433 12.98796
245 learning    RT     3        13      11        2  -53.57617 12.94349
246 learning    RT     3        13      12        1  -99.60248 12.90271
247 learning    RT     3        14       1       13  181.27964 12.67474
248 learning    RT     3        14      11        3  -50.58086 12.62760
249 learning    RT     3        14      12        2  -96.60717 12.58788
250 learning    RT     3        15       1       14  226.46401 12.74732
251 learning    RT     3        15      12        3  -51.42280 12.65904
252 learning    RT     3        15      13        2   48.17969 12.94527
253 learning    RT     3        15      14        1   45.18438 12.63689
254 learning    RT     3        16       1       15  292.11277 12.75275
255 learning    RT     3        16      10        6   91.58319 12.78305
256 learning    RT     3        16      11        5   60.25227 12.70450
257 learning    RT     3        16      13        3  113.82844 12.95439
258 learning    RT     3        16      14        2  110.83313 12.64224
259 learning    RT     3        16      15        1   65.64876 12.71200
260 learning    RT     3        17       1       16  263.32558 12.90469
261 learning    RT     3        17      10        7   62.79601 12.93012
262 learning    RT     3        17      11        6   31.46509 12.85723
263 learning    RT     3        17      13        4   85.04126 13.09607
264 learning    RT     3        17      14        3   82.04595 12.79568
265 learning    RT     3        17      15        2   36.86157 12.85558
266 learning    RT     3        17      16        1  -28.78718 12.86659
267 learning    RT     3        18       1       17  237.25370 12.75996
268 learning    RT     3        18      10        8   36.72413 12.79283
269 learning    RT     3        18      12        6  -40.63311 12.67231
270 learning    RT     3        18      13        5   58.96937 12.96254
271 learning    RT     3        18      14        4   55.97406 12.64943
272 learning    RT     3        18      16        2  -54.85907 12.72572
273     test theta  <NA>         3       1        2  251.51432 50.93097
274     test theta  <NA>         3       2        1  193.86830 50.86624
275     test theta  <NA>         4       1        3  249.18536 51.32401
276     test theta  <NA>         4       2        2  191.53934 51.32855
277     test theta  <NA>         5       3        2 -198.13628 51.01561
278     test theta  <NA>         5       4        1 -195.80733 51.46632
279     test theta  <NA>         6       3        3 -296.82798 51.10410
280     test theta  <NA>         6       4        2 -294.49902 51.54233
281     test theta  <NA>         2      10        8 -156.32252 51.49081
282     test theta  <NA>         3       1        2  285.44318 50.77147
283     test theta  <NA>         3       2        1  246.59784 51.37268
284     test theta  <NA>         3      11        8  132.10010 51.39329
285     test theta  <NA>         3      12        9  223.67735 51.96044
286     test theta  <NA>         4       1        3  349.06456 50.84663
287     test theta  <NA>         4       2        2  310.21922 51.47484
288     test theta  <NA>         4      10        6  153.89670 51.50432
289     test theta  <NA>         4      11        7  195.72147 51.49518
290     test theta  <NA>         4      12        8  287.29872 52.02620
291     test theta  <NA>         5       1        4  249.20319 50.77126
292     test theta  <NA>         5       2        3  210.35785 51.37824
293     test theta  <NA>         5      12        7  187.43736 51.93851
294     test theta  <NA>         6       1        5  284.62159 50.34204
295     test theta  <NA>         6       2        4  245.77625 51.01135
296     test theta  <NA>         6      11        5  131.27851 51.03659
297     test theta  <NA>         6      12        6  222.85576 51.56051
298     test theta  <NA>         7       1        6  282.42333 50.73993
299     test theta  <NA>         7       2        5  243.57799 51.43961
300     test theta  <NA>         7      11        4  129.08025 51.42773
301     test theta  <NA>         7      12        5  220.65750 51.92656
302     test theta  <NA>         8       1        7  231.25733 50.77279
303     test theta  <NA>         8       2        6  192.41199 51.38510
304     test theta  <NA>         8       4        4 -117.80723 51.39780
305     test theta  <NA>         8      12        4  169.49150 51.92525
306     test theta  <NA>         9       1        8  168.84398 50.76151
307     test theta  <NA>         9       2        7  129.99864 51.40262
308     test theta  <NA>         9       3        6 -116.59921 51.32173
309     test theta  <NA>         9       4        5 -180.22058 51.39944
310     test theta  <NA>         9       6        3 -115.77762 50.92507
311     test theta  <NA>        10       1        9  195.16786 50.84247
312     test theta  <NA>        11       1       10  153.34309 50.84738
313     test theta  <NA>        12      10        2 -133.40202 51.98896
314     test theta  <NA>         2      10        8 -202.56527 56.45183
315     test theta  <NA>         2      11        9 -225.55931 56.75555
316     test theta  <NA>         2      12       10 -190.39200 56.54381
317     test theta  <NA>         2      15       13 -144.88951 56.07631
318     test theta  <NA>         2      18       16  133.06008 56.83761
319     test theta  <NA>         3       1        2  285.96640 56.53717
320     test theta  <NA>         3       2        1  252.50652 56.64359
321     test theta  <NA>         3      13       10  224.91329 57.51547
322     test theta  <NA>         3      14       11  129.17403 56.09009
323     test theta  <NA>         3      16       13  182.89932 56.67336
324     test theta  <NA>         3      17       14  336.40409 56.44747
325     test theta  <NA>         3      18       15  385.56660 56.83676
326     test theta  <NA>         4       1        3  276.40274 56.75988
327     test theta  <NA>         4       2        2  242.94285 56.86335
328     test theta  <NA>         4      13        9  215.34962 57.73513
329     test theta  <NA>         4      16       12  173.33566 56.89457
330     test theta  <NA>         4      17       13  326.84043 56.66898
331     test theta  <NA>         4      18       14  376.00293 57.05836
332     test theta  <NA>         5       1        4  268.81139 56.64097
333     test theta  <NA>         5       2        3  235.35150 56.76144
334     test theta  <NA>         5      13        8  207.75827 57.61045
335     test theta  <NA>         5      16       11  165.74431 56.77763
336     test theta  <NA>         5      17       12  319.24908 56.56525
337     test theta  <NA>         5      18       13  368.41158 56.94046
338     test theta  <NA>         6       1        5  291.50021 56.42205
339     test theta  <NA>         6       2        4  258.04032 56.54786
340     test theta  <NA>         6      13        7  230.44709 57.40161
341     test theta  <NA>         6      14        8  134.70783 55.97529
342     test theta  <NA>         6      16       10  188.43313 56.57708
343     test theta  <NA>         6      17       11  341.93790 56.35125
344     test theta  <NA>         6      18       12  391.10040 56.72240
345     test theta  <NA>         7       1        6  291.22742 56.18487
346     test theta  <NA>         7       2        5  257.76754 56.40064
347     test theta  <NA>         7      13        6  230.17431 57.16562
348     test theta  <NA>         7      14        7  134.43505 55.73985
349     test theta  <NA>         7      16        9  188.16035 56.38712
350     test theta  <NA>         7      17       10  341.66512 56.17463
351     test theta  <NA>         7      18       11  390.82762 56.47598
352     test theta  <NA>         8       1        7  260.02250 56.74841
353     test theta  <NA>         8       2        6  226.56262 56.87517
354     test theta  <NA>         8      13        5  198.96939 57.73282
355     test theta  <NA>         8      16        8  156.95543 56.89231
356     test theta  <NA>         8      17        9  310.46020 56.67945
357     test theta  <NA>         8      18       10  359.62270 57.05590
358     test theta  <NA>         9       1        8  230.95649 56.30148
359     test theta  <NA>         9       2        7  197.49661 56.47767
360     test theta  <NA>         9      13        4  169.90338 57.27456
361     test theta  <NA>         9      16        7  127.88941 56.47925
362     test theta  <NA>         9      17        8  281.39418 56.26612
363     test theta  <NA>         9      18        9  330.55669 56.60255
364     test theta  <NA>        10       1        9  236.02515 56.31174
365     test theta  <NA>        11       1       10  259.01919 56.64126
366     test theta  <NA>        12       1       11  223.85188 56.42266
367     test theta  <NA>        13      10        3 -174.97204 57.29251
368     test theta  <NA>        13      11        2 -197.96608 57.61776
369     test theta  <NA>        13      12        1 -162.79877 57.39492
370     test theta  <NA>        14       1       13  156.79237 55.87540
371     test theta  <NA>        15       1       14  178.34939 55.88241
372     test theta  <NA>        16      10        6 -132.95808 56.46747
373     test theta  <NA>        16      11        5 -155.95212 56.79795
374     test theta  <NA>        17      10        7 -286.46285 56.24192
375     test theta  <NA>        17      11        6 -309.45689 56.57231
376     test theta  <NA>        17      12        5 -274.28958 56.33469
377     test theta  <NA>        17      14        3 -207.23007 55.86437
378     test theta  <NA>        17      15        2 -228.78709 55.85046
379     test theta  <NA>        17      16        1 -153.50477 56.45065
380     test theta  <NA>        18      10        8 -335.62535 56.61265
381     test theta  <NA>        18      11        7 -358.61939 56.94055
382     test theta  <NA>        18      12        6 -323.45208 56.72284
383     test theta  <NA>        18      13        5 -160.65331 57.59710
384     test theta  <NA>        18      14        4 -256.39257 56.17808
385     test theta  <NA>        18      15        3 -277.94959 56.18508
386     test theta  <NA>        18      16        2 -202.66727 56.82394
387     test theta  <NA>         5       3        2 -172.14127 52.28243
388     test theta  <NA>         5       4        1 -125.51186 52.03291
389     test theta  <NA>         6       1        5 -172.85085 53.82093
390     test theta  <NA>         6       2        4 -171.17755 51.92538
391     test theta  <NA>         6       3        3 -276.46870 52.35761
392     test theta  <NA>         6       4        2 -229.83930 52.09475
393     test theta  <NA>         2      10        8  154.28924 60.44523
394     test theta  <NA>         2      11        9  399.63197 59.88363
395     test theta  <NA>         2      12       10  362.76891 60.01637
396     test theta  <NA>         3      10        7  199.38741 61.20147
397     test theta  <NA>         3      11        8  444.73013 60.64352
398     test theta  <NA>         3      12        9  407.86708 60.77531
399     test theta  <NA>         4       1        3  150.14738 61.25507
400     test theta  <NA>         4       2        2  142.15494 59.21538
401     test theta  <NA>         4      10        6  296.44418 60.81956
402     test theta  <NA>         4      11        7  541.78691 60.24363
403     test theta  <NA>         4      12        8  504.92385 60.37656
404     test theta  <NA>         5       1        4  165.22369 60.90194
405     test theta  <NA>         5       2        3  157.23125 58.83586
406     test theta  <NA>         5      10        5  311.52049 60.44523
407     test theta  <NA>         5      11        6  556.86322 59.88363
408     test theta  <NA>         5      12        7  520.00016 60.01637
409     test theta  <NA>         6      10        4  233.70065 60.56740
410     test theta  <NA>         6      11        5  479.04337 60.00648
411     test theta  <NA>         6      12        6  442.18031 60.13897
412     test theta  <NA>         7      10        3  241.73069 61.72090
413     test theta  <NA>         7      11        4  487.07342 61.16885
414     test theta  <NA>         7      12        5  450.21036 61.29832
415     test theta  <NA>         8      10        2  205.31899 60.81524
416     test theta  <NA>         8      11        3  450.66171 60.23661
417     test theta  <NA>         8      12        4  413.79865 60.38763
418     test theta  <NA>         9       4        5 -198.32656 60.50557
419     test theta  <NA>         9       5        4 -213.40287 60.14762
420     test theta  <NA>         9       6        3 -135.58302 60.27013
421     test theta  <NA>         9       7        2 -143.61307 61.44573
422     test theta  <NA>         9      11        2  343.46035 61.15073
423     test theta  <NA>         9      12        3  306.59729 61.28397
424     test theta  <NA>        10       1        9 -146.29680 62.45479
425     test theta  <NA>        11       1       10 -391.63953 61.89650
426     test theta  <NA>        11      10        1 -245.34272 61.43528
427     test theta  <NA>        12       1       11 -354.77647 62.04192
428     test theta  <NA>        12      10        2 -208.47967 61.57894
429     test theta  <NA>         2      17       15  289.23351 66.40605
430     test theta  <NA>         2      18       16  394.40100 66.40623
431     test theta  <NA>         3      17       14  348.93698 67.11587
432     test theta  <NA>         3      18       15  454.10446 67.11853
433     test theta  <NA>         4      17       13  338.12651 67.29269
434     test theta  <NA>         4      18       14  443.29400 67.30879
435     test theta  <NA>         5      17       12  357.56113 67.28898
436     test theta  <NA>         5      18       13  462.72862 67.30332
437     test theta  <NA>         6      17       11  349.54477 67.10282
438     test theta  <NA>         6      18       12  454.71226 67.11667
439     test theta  <NA>         7      17       10  294.29433 67.68784
440     test theta  <NA>         7      18       11  399.46181 67.68829
441     test theta  <NA>         8      17        9  296.54718 67.12003
442     test theta  <NA>         8      18       10  401.71466 67.12205
443     test theta  <NA>         9      17        8  341.02596 67.86601
444     test theta  <NA>         9      18        9  446.19344 67.84064
445     test theta  <NA>        16      10        6 -205.10928 67.48661
446     test theta  <NA>        17       1       16 -301.81411 67.87972
447     test theta  <NA>        17      10        7 -393.48064 66.75305
448     test theta  <NA>        17      11        6 -360.90285 68.07501
449     test theta  <NA>        17      12        5 -239.80668 67.48490
450     test theta  <NA>        17      13        4 -237.91443 68.89769
451     test theta  <NA>        17      14        3 -259.79689 66.75502
452     test theta  <NA>        17      15        2 -256.20699 67.67272
453     test theta  <NA>        17      16        1 -188.37136 67.48214
454     test theta  <NA>        18       1       17 -406.98159 67.87994
455     test theta  <NA>        18      10        8 -498.64813 66.75445
456     test theta  <NA>        18      11        7 -466.07034 68.09193
457     test theta  <NA>        18      12        6 -344.97416 67.48605
458     test theta  <NA>        18      13        5 -343.08192 68.91252
459     test theta  <NA>        18      14        4 -364.96438 66.75488
460     test theta  <NA>        18      15        3 -361.37447 67.68910
461     test theta  <NA>        18      16        2 -293.53884 67.49831
462     test    RT  <NA>         2       1        1  254.22867 20.04119
463     test    RT  <NA>         3       1        2  289.10105 20.23512
464     test    RT  <NA>         4       1        3  310.80059 20.39251
465     test    RT  <NA>         4       2        2   56.57192 20.42054
466     test    RT  <NA>         5       1        4  299.01571 20.10529
467     test    RT  <NA>         6       1        5  280.08001 20.12629
468     test    RT  <NA>         2       1        1  238.23851 20.23294
469     test    RT  <NA>         2      12       10  -80.03112 20.69964
470     test    RT  <NA>         3       1        2  275.58715 20.20192
471     test    RT  <NA>         4       1        3  292.87773 20.23096
472     test    RT  <NA>         4       2        2   54.63922 20.48580
473     test    RT  <NA>         4      10        6   57.10368 20.49396
474     test    RT  <NA>         4      11        7   55.22415 20.49141
475     test    RT  <NA>         5       1        4  255.22323 20.20087
476     test    RT  <NA>         5      12        7  -63.04640 20.66588
477     test    RT  <NA>         6       1        5  209.08633 20.03437
478     test    RT  <NA>         6       3        3  -66.50081 20.27247
479     test    RT  <NA>         6       4        2  -83.79140 20.30285
480     test    RT  <NA>         6       5        1  -46.13690 20.27170
481     test    RT  <NA>         6      12        6 -109.18330 20.51342
482     test    RT  <NA>         7       1        6  205.67986 20.19066
483     test    RT  <NA>         7       3        4  -69.90728 20.44260
484     test    RT  <NA>         7       4        3  -87.19787 20.47194
485     test    RT  <NA>         7       5        2  -49.54337 20.43729
486     test    RT  <NA>         7      12        5 -112.58977 20.66159
487     test    RT  <NA>         8       1        7  266.74858 20.20223
488     test    RT  <NA>         8       6        2   57.66224 20.27653
489     test    RT  <NA>         8       7        1   61.06871 20.43850
490     test    RT  <NA>         8      12        4  -51.52105 20.66323
491     test    RT  <NA>         9       1        8  194.10836 20.19631
492     test    RT  <NA>         9       3        6  -81.47879 20.42540
493     test    RT  <NA>         9       4        5  -98.76937 20.45633
494     test    RT  <NA>         9       5        4  -61.11487 20.42039
495     test    RT  <NA>         9       8        1  -72.64022 20.42515
496     test    RT  <NA>         9      12        3 -124.16127 20.66337
497     test    RT  <NA>        10       1        9  235.77405 20.22905
498     test    RT  <NA>        11       1       10  237.65358 20.23104
499     test    RT  <NA>        12       1       11  318.26963 20.42474
500     test    RT  <NA>        12      10        2   82.49558 20.68905
501     test    RT  <NA>        12      11        1   80.61605 20.69035
502     test    RT  <NA>         2       1        1  224.99988 22.49695
503     test    RT  <NA>         2      12       10  -79.70579 22.51125
504     test    RT  <NA>         2      14       12   73.01504 22.32690
505     test    RT  <NA>         2      16       14  -98.52262 22.56109
506     test    RT  <NA>         2      17       15  -66.55989 22.47266
507     test    RT  <NA>         3       1        2  264.46143 22.49671
508     test    RT  <NA>         3      10        7   60.65047 22.47328
509     test    RT  <NA>         3      13       10   71.59902 22.89016
510     test    RT  <NA>         3      14       11  112.47658 22.32669
511     test    RT  <NA>         3      16       13  -59.06108 22.56090
512     test    RT  <NA>         4       1        3  294.64147 22.58507
513     test    RT  <NA>         4       2        2   69.64159 22.63786
514     test    RT  <NA>         4      10        6   90.83052 22.56082
515     test    RT  <NA>         4      13        9  101.77907 22.97726
516     test    RT  <NA>         4      14       10  142.65663 22.41520
517     test    RT  <NA>         4      18       14   79.86620 22.70829
518     test    RT  <NA>         5       1        4  263.64062 22.53730
519     test    RT  <NA>         5      10        5   59.82967 22.51587
520     test    RT  <NA>         5      13        8   70.77822 22.92783
521     test    RT  <NA>         5      14        9  111.65578 22.36776
522     test    RT  <NA>         5      16       11  -59.88188 22.60217
523     test    RT  <NA>         6       1        5  198.85288 22.45111
524     test    RT  <NA>         6       3        3  -65.60855 22.51556
525     test    RT  <NA>         6       4        2  -95.78859 22.59927
526     test    RT  <NA>         6       5        1  -64.78774 22.55771
527     test    RT  <NA>         6      11        5  -50.80475 22.55905
528     test    RT  <NA>         6      12        6 -105.85280 22.47174
529     test    RT  <NA>         6      15        9  -66.74082 22.27695
530     test    RT  <NA>         6      16       10 -124.66962 22.52093
531     test    RT  <NA>         6      17       11  -92.70690 22.43274
532     test    RT  <NA>         7       1        6  263.02123 22.36032
533     test    RT  <NA>         7       6        1   64.16835 22.40338
534     test    RT  <NA>         7      10        3   59.21027 22.35710
535     test    RT  <NA>         7      13        6   70.15882 22.75527
536     test    RT  <NA>         7      14        7  111.03639 22.19107
537     test    RT  <NA>         7      16        9  -60.50127 22.44353
538     test    RT  <NA>         8       1        7  252.25127 22.58087
539     test    RT  <NA>         8       6        2   53.39839 22.60579
540     test    RT  <NA>         8      12        4  -52.45441 22.60134
541     test    RT  <NA>         8      13        5   59.38886 22.97596
542     test    RT  <NA>         8      14        6  100.26642 22.41397
543     test    RT  <NA>         8      16        8  -71.27124 22.64730
544     test    RT  <NA>         9       1        8  207.39645 22.40460
545     test    RT  <NA>         9       3        6  -57.06497 22.48127
546     test    RT  <NA>         9       4        5  -87.24502 22.56914
547     test    RT  <NA>         9       5        4  -56.24417 22.51982
548     test    RT  <NA>         9       7        2  -55.62478 22.35438
549     test    RT  <NA>         9      12        3  -97.30922 22.43449
550     test    RT  <NA>         9      14        5   55.41161 22.23505
551     test    RT  <NA>         9      15        6  -58.19724 22.23597
552     test    RT  <NA>         9      16        7 -116.12605 22.48116
553     test    RT  <NA>         9      17        8  -84.16332 22.39693
554     test    RT  <NA>        10       1        9  203.81096 22.40762
555     test    RT  <NA>        11       1       10  249.65763 22.53867
556     test    RT  <NA>        12       1       11  304.70568 22.45121
557     test    RT  <NA>        12      10        2  100.89472 22.42920
558     test    RT  <NA>        12      11        1   55.04805 22.55817
559     test    RT  <NA>        13       1       12  192.86240 22.79872
560     test    RT  <NA>        13      11        2  -56.79523 22.93151
561     test    RT  <NA>        13      12        1 -111.84327 22.84280
562     test    RT  <NA>        14       1       13  151.98484 22.23825
563     test    RT  <NA>        14      10        4  -51.82611 22.23768
564     test    RT  <NA>        14      11        3  -97.67279 22.36900
565     test    RT  <NA>        14      12        2 -152.72083 22.28125
566     test    RT  <NA>        15       1       14  265.59370 22.23976
567     test    RT  <NA>        15      10        5   61.78274 22.23357
568     test    RT  <NA>        15      13        2   72.73129 22.63635
569     test    RT  <NA>        15      14        1  113.60885 22.06962
570     test    RT  <NA>        16       1       15  323.52250 22.49127
571     test    RT  <NA>        16      10        6  119.71155 22.47798
572     test    RT  <NA>        16      11        5   73.86487 22.60785
573     test    RT  <NA>        16      13        3  130.66010 22.88464
574     test    RT  <NA>        16      14        2  171.53766 22.32185
575     test    RT  <NA>        16      15        1   57.92880 22.31793
576     test    RT  <NA>        17       1       16  291.55977 22.40721
577     test    RT  <NA>        17      10        7   87.74882 22.39000
578     test    RT  <NA>        17      13        4   98.69737 22.80195
579     test    RT  <NA>        17      14        3  139.57493 22.23740
580     test    RT  <NA>        18       1       17  214.77527 22.53209
581     test    RT  <NA>        18      12        6  -89.93040 22.57519
582     test    RT  <NA>        18      14        4   62.79043 22.36355
583     test    RT  <NA>        18      15        3  -50.81842 22.36505
584     test    RT  <NA>        18      16        2 -108.74723 22.61528
585     test    RT  <NA>        18      17        1  -76.78450 22.53172
586     test    RT  <NA>         2       1        1  203.08802 21.27481
587     test    RT  <NA>         3       1        2  234.11818 21.43841
588     test    RT  <NA>         4       1        3  231.54352 21.34002
589     test    RT  <NA>         5       1        4  215.73761 21.36814
590     test    RT  <NA>         6       1        5  221.02856 21.40712
591     test    RT  <NA>         2       1        1  338.26207 24.23937
592     test    RT  <NA>         2      11        9 -116.58301 23.83669
593     test    RT  <NA>         2      12       10  -79.80296 23.88912
594     test    RT  <NA>         3       1        2  388.68592 24.52993
595     test    RT  <NA>         3      11        8  -66.15917 24.13515
596     test    RT  <NA>         4       1        3  359.88884 24.37850
597     test    RT  <NA>         4      11        7  -94.95624 23.97894
598     test    RT  <NA>         4      12        8  -58.17619 24.03158
599     test    RT  <NA>         5       1        4  350.25413 24.23937
600     test    RT  <NA>         5      11        6 -104.59095 23.83669
601     test    RT  <NA>         5      12        7  -67.81089 23.88912
602     test    RT  <NA>         6       1        5  299.27646 24.28720
603     test    RT  <NA>         6       3        3  -89.40946 23.77535
604     test    RT  <NA>         6       4        2  -60.61238 23.62250
605     test    RT  <NA>         6       5        1  -50.97768 23.47400
606     test    RT  <NA>         6      10        4  -86.39358 24.10569
607     test    RT  <NA>         6      11        5 -155.56863 23.88496
608     test    RT  <NA>         6      12        6 -118.78857 23.93729
609     test    RT  <NA>         7       1        6  325.61388 24.74402
610     test    RT  <NA>         7       3        4  -63.07204 24.24036
611     test    RT  <NA>         7      10        3  -60.05616 24.56141
612     test    RT  <NA>         7      11        4 -129.23121 24.34391
613     test    RT  <NA>         7      12        5  -92.45115 24.39519
614     test    RT  <NA>         8       1        7  347.92970 24.38405
615     test    RT  <NA>         8      11        3 -106.91538 23.97761
616     test    RT  <NA>         8      12        4  -70.13533 24.03483
617     test    RT  <NA>         9       1        8  210.96210 24.72138
618     test    RT  <NA>         9       2        7 -127.29997 23.94342
619     test    RT  <NA>         9       3        6 -177.72382 24.23696
620     test    RT  <NA>         9       4        5 -148.92674 24.08477
621     test    RT  <NA>         9       5        4 -139.29204 23.94342
622     test    RT  <NA>         9       6        3  -88.31436 23.99154
623     test    RT  <NA>         9       7        2 -114.65178 24.45515
624     test    RT  <NA>         9       8        1 -136.96760 24.08921
625     test    RT  <NA>         9      10        1 -174.70794 24.56275
626     test    RT  <NA>         9      11        2 -243.88299 24.33832
627     test    RT  <NA>         9      12        3 -207.10293 24.39177
628     test    RT  <NA>        10       1        9  385.67004 24.84990
629     test    RT  <NA>        11       1       10  454.84508 24.62934
630     test    RT  <NA>        11      10        1   69.17505 24.44880
631     test    RT  <NA>        12       1       11  418.06503 24.68760
632     test    RT  <NA>         2       1        1  227.65397 26.88347
633     test    RT  <NA>         2      11        9 -122.26880 26.96784
634     test    RT  <NA>         2      14       12   80.04063 26.43816
635     test    RT  <NA>         2      15       13  -90.68338 26.80827
636     test    RT  <NA>         2      16       14 -108.06685 26.73231
637     test    RT  <NA>         3       1        2  283.14925 27.16166
638     test    RT  <NA>         3      10        7   65.01829 26.71402
639     test    RT  <NA>         3      11        8  -66.77352 27.22502
640     test    RT  <NA>         3      13       10   96.56924 27.56705
641     test    RT  <NA>         3      14       11  135.53592 26.71884
642     test    RT  <NA>         4       1        3  242.37427 27.22993
643     test    RT  <NA>         4      11        7 -107.54851 27.29154
644     test    RT  <NA>         4      14       10   94.76093 26.79357
645     test    RT  <NA>         4      15       11  -75.96308 27.13740
646     test    RT  <NA>         4      16       12  -93.34656 27.07235
647     test    RT  <NA>         5       1        4  228.24381 27.22275
648     test    RT  <NA>         5      11        6 -121.67897 27.31689
649     test    RT  <NA>         5      14        9   80.63047 26.78593
650     test    RT  <NA>         5      15       10  -90.09354 27.15861
651     test    RT  <NA>         5      16       11 -107.47702 27.07726
652     test    RT  <NA>         6       1        5  188.00677 27.15564
653     test    RT  <NA>         6       3        3  -95.14248 26.86009
654     test    RT  <NA>         6      11        5 -161.91600 27.23819
655     test    RT  <NA>         6      12        6  -77.40361 27.00517
656     test    RT  <NA>         6      15        9 -130.33058 27.08019
657     test    RT  <NA>         6      16       10 -147.71405 26.99855
658     test    RT  <NA>         6      17       11  -68.87456 26.71313
659     test    RT  <NA>         6      18       12  -62.83521 26.71751
660     test    RT  <NA>         7       1        6  236.25818 27.37943
661     test    RT  <NA>         7      11        4 -113.66459 27.45113
662     test    RT  <NA>         7      14        7   88.64484 26.94321
663     test    RT  <NA>         7      15        8  -82.07917 27.29411
664     test    RT  <NA>         7      16        9  -99.46264 27.22622
665     test    RT  <NA>         8       1        7  240.35682 27.16248
666     test    RT  <NA>         8      11        3 -109.56595 27.22638
667     test    RT  <NA>         8      14        6   92.74348 26.71372
668     test    RT  <NA>         8      15        7  -77.98053 27.07298
669     test    RT  <NA>         8      16        8  -95.36401 26.99802
670     test    RT  <NA>         9       1        8  145.02969 27.45464
671     test    RT  <NA>         9       2        7  -82.62428 26.88061
672     test    RT  <NA>         9       3        6 -138.11956 27.15861
673     test    RT  <NA>         9       4        5  -97.34458 27.23288
674     test    RT  <NA>         9       5        4  -83.21411 27.22995
675     test    RT  <NA>         9       7        2  -91.22849 27.37424
676     test    RT  <NA>         9       8        1  -95.32713 27.15625
677     test    RT  <NA>         9      10        1  -73.10127 27.01691
678     test    RT  <NA>         9      11        2 -204.89308 27.53900
679     test    RT  <NA>         9      12        3 -120.38069 27.30733
680     test    RT  <NA>         9      15        6 -173.30766 27.37744
681     test    RT  <NA>         9      16        7 -190.69113 27.30677
682     test    RT  <NA>         9      17        8 -111.85164 27.01555
683     test    RT  <NA>         9      18        9 -105.81229 27.00716
684     test    RT  <NA>        10       1        9  218.13097 27.01986
685     test    RT  <NA>        11       1       10  349.92278 27.53515
686     test    RT  <NA>        11      10        1  131.79181 27.09476
687     test    RT  <NA>        12       1       11  265.41038 27.31022
688     test    RT  <NA>        12      11        1  -84.51239 27.35981
689     test    RT  <NA>        13       1       12  186.58001 27.85317
690     test    RT  <NA>        13      11        2 -163.34277 27.93824
691     test    RT  <NA>        13      12        1  -78.83037 27.71889
692     test    RT  <NA>        14       1       13  147.61334 27.01968
693     test    RT  <NA>        14      10        4  -70.51763 26.57551
694     test    RT  <NA>        14      11        3 -202.30944 27.10285
695     test    RT  <NA>        14      12        2 -117.79704 26.86851
696     test    RT  <NA>        15       1       14  318.33735 27.38422
697     test    RT  <NA>        15      10        5  100.20639 26.94214
698     test    RT  <NA>        15      13        2  131.75734 27.78693
699     test    RT  <NA>        15      14        1  170.72401 26.94402
700     test    RT  <NA>        16       1       15  335.72083 27.30954
701     test    RT  <NA>        16      10        6  117.58986 26.86314
702     test    RT  <NA>        16      12        4   70.31044 27.14104
703     test    RT  <NA>        16      13        3  149.14082 27.71810
704     test    RT  <NA>        16      14        2  188.10749 26.86215
705     test    RT  <NA>        17       1       16  256.88133 27.01877
706     test    RT  <NA>        17      11        6  -93.04144 27.09706
707     test    RT  <NA>        17      13        4   70.30132 27.42343
708     test    RT  <NA>        17      14        3  109.26799 26.57475
709     test    RT  <NA>        17      15        2  -61.45602 26.93818
710     test    RT  <NA>        17      16        1  -78.83950 26.86272
711     test    RT  <NA>        18       1       17  250.84199 27.01886
712     test    RT  <NA>        18      11        7  -99.08079 27.10298
713     test    RT  <NA>        18      13        5   64.26198 27.42804
714     test    RT  <NA>        18      14        4  103.22865 26.57466
715     test    RT  <NA>        18      15        3  -67.49537 26.94371
716     test    RT  <NA>        18      16        2  -84.87884 26.86811
           df    t.ratio     lower.CL     upper.CL       p.value       cond
1   15718.352   4.468130   50.8676765  245.7537470  1.702658e-05       <NA>
2   15715.755   3.663051   23.8384470  216.2526140  3.409735e-04       <NA>
3   15719.585   4.648848   57.1844447  253.1609816  8.412709e-06       <NA>
4   15716.928   3.850709   30.1575885  223.6574753  1.773647e-04       <NA>
5   15716.383  -4.023066 -229.3012854  -35.8322156  9.619047e-05       <NA>
6   15717.571  -4.207742 -236.7051084  -42.1523954  4.863126e-05       <NA>
7   15711.634  -4.927024 -261.7032318  -66.2814647  2.530235e-06       <NA>
8   15708.787  -5.849697 -288.7412628  -95.7737962  2.511300e-08       <NA>
9   15700.920  -9.396816 -409.8693137 -214.7368064  4.786593e-20       <NA>
10  15701.238  -9.553263 -417.2421853 -221.0879375  2.157567e-20       <NA>
11  15709.401  -5.439270 -276.7424668  -82.7301524  2.036223e-07       <NA>
12  15704.640  -2.817367 -228.7050066   20.3769012  8.887935e-03       <NA>
13  15701.046   4.172395   29.4980922  276.7088199  6.250120e-05       <NA>
14  15701.250   7.385461  148.9804954  398.8426782  6.581568e-13       <NA>
15  15708.095   5.306070   72.1945155  323.2192503  2.775291e-07       <NA>
16  15707.226   3.927236   20.5921346  268.8878919  1.675135e-04       <NA>
17  15701.481   7.995724  172.3653513  423.3215872  6.060090e-15       <NA>
18  15701.462  11.123248  291.8692355  545.4339645  1.166300e-27       <NA>
19  15708.786   6.008769   98.3937058  349.4599641  5.732015e-09       <NA>
20  15707.884   4.637984   46.7939191  295.1260114  7.802528e-06       <NA>
21  15701.908   8.698817  198.5738830  449.5529597  1.869028e-17       <NA>
22  15701.711  11.819699  318.0871101  571.6559940  5.575953e-31       <NA>
23  15699.381   6.421452  112.1665446  359.6877654  4.582348e-10       <NA>
24  15699.085   5.035250   60.5624961  305.3580746  1.137357e-06       <NA>
25  15701.227   9.132757  212.1106089  460.0168739  4.485985e-19       <NA>
26  15701.486  12.284500  331.5939172  582.1498270  3.477414e-33       <NA>
27  15706.825   6.721040  124.7304941  375.3803864  6.483358e-11       <NA>
28  15705.947   5.355771   73.1298291  321.0473120  2.280745e-07       <NA>
29  15699.233   2.482242  -33.1780355  219.0270713  2.269396e-02       <NA>
30  15700.751   9.413762  224.8834611  475.5005921  3.588529e-20       <NA>
31  15700.689  12.531072  344.3894114  597.6109034  2.472505e-34       <NA>
32  15699.368   6.737830  124.2821097  372.7864567  6.099894e-11       <NA>
33  15699.093   5.360394   72.6714730  318.4633541  2.280745e-07       <NA>
34  15703.954   2.456191  -33.9505334  216.7572551  2.378135e-02       <NA>
35  15700.592   9.439171  224.2424586  473.0992805  3.134022e-20       <NA>
36  15700.862  12.576163  343.7296507  595.2283500  2.472505e-34       <NA>
37  15706.141   6.269694  108.4497852  360.2876168  1.166660e-09       <NA>
38  15705.227   4.905772   56.8437244  305.9599383  2.139137e-06       <NA>
39  15700.461   8.948970  208.5931235  460.4174513  2.190452e-18       <NA>
40  15700.567  12.056130  328.0978465  582.5289898  4.169320e-32       <NA>
41  15706.829   5.336292   73.2553221  324.0566064  2.441582e-07       <NA>
42  15705.945   3.956572   21.6536771  269.7245120  1.527346e-04       <NA>
43  15700.760   8.027224  173.4085467  424.1765546  5.030858e-15       <NA>
44  15700.771  11.156680  292.9116731  546.2896896  9.375923e-28       <NA>
45  15705.291   4.204403   31.2398126  283.0220321  5.604081e-05       <NA>
46  15701.629  -2.699288 -225.0995296   24.8263569  1.240842e-02       <NA>
47  15700.127  -6.883135 -383.1706068 -131.3644107  2.359170e-11       <NA>
48  15701.883  -5.893820 -347.2217847  -94.6676496  1.105064e-08       <NA>
49  15700.164 -10.012031 -505.2777273 -250.8735516  1.309801e-22       <NA>
50  15699.214  -3.220683 -247.1612270    5.5449655  2.416464e-03       <NA>
51  15699.293  -5.891308 -354.3590703  -85.8304689  1.424305e-08       <NA>
52  15699.324  -6.462442 -373.3772967 -106.5061040  4.917455e-10       <NA>
53  15699.209  -5.127625 -322.8284293  -56.7722673  9.463968e-07       <NA>
54  15699.228  -3.966434 -286.1745249  -14.1023217  2.038509e-04       <NA>
55  15699.108  -4.858192 -312.2862538  -46.7140037  3.519160e-06       <NA>
56  15699.206  -5.296583 -330.2987504  -63.2592299  3.892750e-07       <NA>
57  15699.132  -3.059912 -247.3291581   19.8479409  5.850288e-03       <NA>
58  15699.049   3.766244    6.4110303  273.7452986  4.544293e-04       <NA>
59  15699.701   6.869174  123.0890682  393.2115559  3.942700e-11       <NA>
60  15699.476   5.766365   80.7703224  348.0008366  2.869532e-08       <NA>
61  15699.242   2.685143  -34.0611432  235.3510850  1.762536e-02       <NA>
62  15699.181   7.247698  138.4881851  410.9197425  3.393898e-12       <NA>
63  15699.593   9.449617  219.6543394  489.2731485  9.868945e-20       <NA>
64  15699.680   6.564175  111.1527144  380.1277232  2.663288e-10       <NA>
65  15699.440   5.453507   68.8391376  334.9118349  1.667449e-07       <NA>
66  15699.173   2.361412  -45.9990596  222.2688147  4.285176e-02       <NA>
67  15699.525   6.943733  126.4900307  397.8977104  2.529899e-11       <NA>
68  15699.539   9.155395  207.7226676  476.1846337  1.326892e-18       <NA>
69  15699.358   6.139422   95.1360219  363.7668766  3.414909e-09       <NA>
70  15699.213   5.022448   52.8164003  318.5570331  1.547302e-06       <NA>
71  15699.373   6.522887  110.4653047  381.5448973  3.398285e-10       <NA>
72  15699.293   8.732664  191.6984313  459.8313310  3.803515e-17       <NA>
73  15699.333   6.902328  123.6485081  392.2795199  3.250697e-11       <NA>
74  15699.241   5.793650   81.3288415  347.0697214  2.497534e-08       <NA>
75  15699.088   2.694831  -33.5146876  234.4320333  1.739739e-02       <NA>
76  15699.391   7.279138  138.9821973  410.0531343  2.833508e-12       <NA>
77  15699.339   9.496933  220.2101883  488.3447035  7.547146e-20       <NA>
78  15699.167   7.186378  133.9481800  401.9463568  4.835200e-12       <NA>
79  15699.067   6.078287   91.6314899  356.7335818  4.753806e-09       <NA>
80  15699.111   2.969459  -23.2235510  244.1074054  7.618780e-03       <NA>
81  15699.418   7.560542  149.2645989  419.7372414  3.829626e-13       <NA>
82  15699.112   9.787880  230.5130089  498.0083917  7.510452e-21       <NA>
83  15699.694   7.221828  136.4269843  406.7175325  3.908565e-12       <NA>
84  15699.505   6.123449   94.1065500  361.5085018  3.677958e-09       <NA>
85  15699.249   3.041341  -20.7229140  248.8567485  6.117799e-03       <NA>
86  15699.193   7.597371  151.8303947  424.4214257  3.255966e-13       <NA>
87  15699.639   9.801173  232.9901984  502.7811823  7.510452e-21       <NA>
88  15699.257   6.226967   98.4617742  367.2397615  2.016498e-09       <NA>
89  15699.179   5.111389   56.1376234  322.0344471  1.010286e-06       <NA>
90  15699.409   6.609152  113.7852836  385.0235556  2.034783e-10       <NA>
91  15699.263   8.818676  195.0200314  463.3083681  1.955396e-17       <NA>
92  15699.432   6.988276  128.1640552  399.5549491  1.925663e-11       <NA>
93  15699.335   7.559935  148.8369485  418.5759172  3.829626e-13       <NA>
94  15699.311   6.242280   99.0945122  368.0356495  1.879840e-09       <NA>
95  15699.271   5.070171   56.4594340  331.3468778  1.230069e-06       <NA>
96  15699.703  -2.356001 -226.7902432   47.1836891  4.285176e-02       <NA>
97  15699.118   5.977749   89.0361817  357.4935408  8.625552e-09       <NA>
98  15699.291   6.405517  105.5845505  375.5028949  6.935577e-10       <NA>
99  15699.281   4.192047   22.4748850  292.5357973  7.875616e-05       <NA>
100 15699.146  -2.823845 -241.7097766   29.0014546  1.191673e-02       <NA>
101 15699.150  -3.371274 -260.7349597    8.3327763  2.013206e-03       <NA>
102 15699.300  -7.362021 -417.3006970 -143.5256109  1.616071e-12       <NA>
103 15699.683  -7.927962 -436.3727847 -164.1473847  2.797158e-14       <NA>
104 15699.417  -6.624134 -385.8186927 -114.4187725  1.902703e-10       <NA>
105 15699.284  -5.456519 -349.0716983  -71.8419169  1.667449e-07       <NA>
106 15699.641  -6.361712 -375.2972945 -104.3397316  8.963231e-10       <NA>
107 15699.208  -6.786972 -393.2368893 -120.9578596  6.721296e-11       <NA>
108 15699.310  -4.591508 -310.2987078  -37.8192781  1.280206e-05       <NA>
109 15699.236  -2.561874 -231.4247328   38.7978690  2.491069e-02       <NA>
110 15699.406  -9.556279 -495.6247502 -224.7211180  5.344828e-20       <NA>
111 15699.437 -10.144667 -514.6465297 -245.3931999  6.354218e-22       <NA>
112 15699.281  -8.832703 -464.1002992 -195.6567263  1.917894e-17       <NA>
113 15699.256  -7.601733 -427.4223114 -153.0108642  3.255966e-13       <NA>
114 15699.162  -8.572301 -453.5590548 -185.5975315  1.412358e-16       <NA>
115 15699.252  -8.986837 -471.5676722 -202.1466370  5.410823e-18       <NA>
116 15699.204  -6.768141 -388.5961327 -119.0414135  7.380405e-11       <NA>
117 15077.401  20.393606  193.7687258  258.9357027  9.687572e-91       <NA>
118 15079.753  22.375866  219.0597952  285.2203041 3.007487e-108       <NA>
119 15067.401   2.319052   -6.8567687   58.4324394  4.372618e-02       <NA>
120 15091.858  22.047263  216.6517654  283.2100434 2.378991e-105       <NA>
121 15085.434  20.993221  201.5608641  267.0974949  6.765742e-96       <NA>
122 15100.094  22.470417  220.8562396  287.2364399 7.656585e-109       <NA>
123 15079.751   2.482394   -5.0568127   60.4450636  3.265269e-02       <NA>
124 15059.283  19.399763  199.2492719  282.9831856  1.046827e-81       <NA>
125 15071.867  -5.298985 -109.1048119  -24.3000472  2.886584e-07       <NA>
126 15068.780  21.722189  232.0860560  317.2778717 1.054479e-101       <NA>
127 15062.357   2.684492   -8.5530052   75.6844754  1.140081e-02       <NA>
128 15068.133   3.629564    3.3199783   89.0081537  6.064334e-04       <NA>
129 15076.577  -2.593522  -76.1755293    9.9021403  1.426354e-02       <NA>
130 15068.191  24.400591  265.9934145  351.1975177 3.496452e-127       <NA>
131 15060.140   5.396572   25.3587316  109.5997431  1.820381e-07       <NA>
132 15057.985   2.677393   -8.7544598   76.5814643  1.140081e-02       <NA>
133 15064.847   6.296419   37.2366645  122.9184721  1.215343e-09       <NA>
134 15065.733   3.488869    1.5210459   86.6805350  9.729080e-04       <NA>
135 15063.188  19.017851  195.0858199  279.0708217  9.810668e-79       <NA>
136 15063.894  -2.998770  -79.8440526    4.6367665  4.715779e-03       <NA>
137 15062.400  -5.702567 -113.7627139  -29.2715767  3.778704e-08       <NA>
138 15069.266  -2.195570  -69.4797014   14.6469917  3.951288e-02       <NA>
139 15073.790  -5.603511 -113.2657163  -28.2149587  6.133134e-08       <NA>
140 15069.806  17.723209  181.2524208  266.3195614  9.302376e-69       <NA>
141 15058.014  -4.022968  -93.5125113   -8.2794342  1.361247e-04       <NA>
142 15057.815  -6.703367 -127.4274434  -42.1915066  9.942962e-11       <NA>
143 15067.727  -3.224893  -83.2306301    1.8132611  2.315291e-03       <NA>
144 15076.077  -6.585664 -127.0149866  -41.0503478  2.058506e-10       <NA>
145 15062.501  19.144864  197.4543936  281.7747148  1.067032e-79       <NA>
146 15067.260  -2.785786  -77.4704706    7.3356512  8.606525e-03       <NA>
147 15066.097  -5.479217 -111.3892979  -26.5725260  1.193683e-07       <NA>
148 15072.713  -5.382539 -110.8880582  -25.5201501  1.892206e-07       <NA>
149 15076.060  18.579500  193.0222243  278.5135107  2.751394e-75       <NA>
150 15065.174  -3.060035  -81.7513736    3.9231810  3.954649e-03       <NA>
151 15064.421  -5.726480 -115.6676113  -29.9875858  3.448225e-08       <NA>
152 15075.872  -2.264115  -71.4663841   14.0127679  3.383390e-02       <NA>
153 15078.300  -5.619305 -115.2421992  -28.8593824  5.853583e-08       <NA>
154 15071.869  15.205609  149.5686722  234.6957325  4.720653e-51       <NA>
155 15064.143  -3.920868  -91.0676967   -6.9003561  2.016900e-04       <NA>
156 15060.317  -6.520386 -125.1963091  -39.9032140  2.984833e-10       <NA>
157 15059.250  -9.198896 -159.1108637  -73.8156639  2.245369e-19       <NA>
158 15064.652  -3.587500  -87.1489508   -2.7432862  6.907758e-04       <NA>
159 15058.126  -2.503403  -74.2466007   10.9390231  1.805619e-02       <NA>
160 15069.973  -3.774817  -89.8542177   -5.1104860  3.536261e-04       <NA>
161 15060.242  -3.433907  -86.4406640   -0.8306665  1.158011e-03       <NA>
162 15066.990  -2.862788  -79.1993946    6.4280036  7.116322e-03       <NA>
163 15071.852  -5.728182 -114.9162279  -29.8087187  3.448225e-08       <NA>
164 15073.099  -9.062110 -158.6890308  -72.6838812  7.281465e-19       <NA>
165 15073.822  18.013008  185.7837282  271.2520674  6.384336e-71       <NA>
166 15071.485  21.006658  222.0814528  306.9078985  2.268261e-95       <NA>
167 15073.315   2.835931   -6.7566651   78.7102208  7.549274e-03       <NA>
168 15075.249  24.186870  264.9483558  350.6889608 2.600526e-125       <NA>
169 15078.422   6.185606   36.1154189  122.4861022  2.326912e-09       <NA>
170 15074.241   3.402290    0.4298073   86.2181581  1.263378e-03       <NA>
171 15066.780  19.281662  198.3856720  289.2819506  1.415623e-80       <NA>
172 15063.419   3.415919   -2.2563714   88.8648482  1.300194e-03       <NA>
173 15061.806  -2.711544  -79.1871559   11.0811571  1.127266e-02       <NA>
174 15070.787   5.101050   19.3671011  111.7318696  1.138466e-06       <NA>
175 15058.589   4.990689   17.5075225  107.6008269  1.980408e-06       <NA>
176 15064.231  -3.827735  -93.6086397   -2.9492717  2.879305e-04       <NA>
177 15074.707  21.107114  223.4232734  315.1211460  6.700926e-96       <NA>
178 15066.560   5.378190   22.8062644  114.6790092  2.849573e-07       <NA>
179 15071.342   2.944051   -8.2580613   83.0814942  5.772030e-03       <NA>
180 15069.569   7.025010   44.4396468  137.5361207  1.219729e-11       <NA>
181 15065.990   6.957681   42.5410835  133.4440627  1.900246e-11       <NA>
182 15065.455   3.367870   -2.8730870   88.4894825  1.528813e-03       <NA>
183 15066.377   2.515186  -13.7321876   77.7692055  1.938102e-02       <NA>
184 15069.599  23.409913  251.6779175  342.9684106 6.839708e-117       <NA>
185 15057.112   4.259963    8.3632071   98.6154984  5.334322e-05       <NA>
186 15060.046   2.215162  -17.4592458   73.5611545  4.054322e-02       <NA>
187 15064.130   7.604927   51.0512716  142.5359107  1.924396e-13       <NA>
188 15066.897   5.174965   20.0002082  110.9251335  8.215088e-07       <NA>
189 15072.571   9.224925   72.6629299  165.4147464  2.726185e-19       <NA>
190 15060.945   9.217601   70.7986191  161.2884358  2.764514e-19       <NA>
191 15065.881   5.597071   25.3601599  116.3581444  8.930571e-08       <NA>
192 15066.762   2.652895  -12.0593117   80.0544746  1.328579e-02       <NA>
193 15063.715   4.739650   14.5209555  105.6179711  6.356707e-06       <NA>
194 15068.767  18.981275  195.1672190  286.3345205  3.490749e-78       <NA>
195 15062.146  -2.254883  -73.9795687   16.9368888  3.733038e-02       <NA>
196 15057.950  -4.492447 -101.8294809  -11.3151077  1.973242e-05       <NA>
197 15064.412   3.163756   -5.4685499   85.9111435  2.947737e-03       <NA>
198 15060.889  -2.948720  -82.3973027    8.1254209  5.752501e-03       <NA>
199 15071.919   4.847112   16.1505488  108.7825388  3.950507e-06       <NA>
200 15061.372   4.729912   14.2834990  104.6589673  6.543050e-06       <NA>
201 15063.931  -4.060467  -96.8221335   -5.9016610  1.214678e-04       <NA>
202 15069.392  15.950394  156.7302083  247.9006856  9.022054e-56       <NA>
203 15057.125  -3.310630  -86.5892728    3.5525442  1.853984e-03       <NA>
204 15061.134  -5.293684 -112.4140071  -21.4995183  4.428211e-07       <NA>
205 15057.867  -7.544673 -140.2646548  -49.7507794  2.933412e-13       <NA>
206 15060.303  -3.055553  -83.6427108    6.7718653  4.198889e-03       <NA>
207 15068.126  -2.338288  -74.9552322   15.8651397  3.026483e-02       <NA>
208 15061.865  -6.000358 -120.8347230  -30.3080044  8.803884e-09       <NA>
209 15066.695  -7.098130 -135.2632490  -44.3313911  7.485815e-12       <NA>
210 15065.894  -4.766809 -107.0083411  -15.0119302  5.780814e-06       <NA>
211 15066.252  -2.759810  -80.4358696   10.5593621  9.954429e-03       <NA>
212 15065.500  19.863066  205.8435476  296.7864382  2.779653e-85       <NA>
213 15059.543  -3.661566  -91.1661773   -0.8501650  5.420424e-04       <NA>
214 15059.785   3.904573    3.8986481   94.1004438  2.197717e-04       <NA>
215 15066.135   4.003401    5.1946813   96.3761587  1.499821e-04       <NA>
216 15070.890   5.680035   26.8222771  119.2390568  5.829032e-08       <NA>
217 15057.589   5.584365   24.9630002  115.1077124  9.360941e-08       <NA>
218 15063.751  -3.232644  -86.1548698    4.5593216  2.411008e-03       <NA>
219 15074.782  19.705340  205.6700179  297.4257766  5.019243e-84       <NA>
220 15061.957  -3.612157  -91.3192360   -0.2312976  6.385080e-04       <NA>
221 15060.883   3.890037    3.7478458   94.7170548  2.298652e-04       <NA>
222 15065.988   3.989065    5.0539159   96.9827327  1.568784e-04       <NA>
223 15069.654   5.653121   26.6871191  119.8400235  6.633430e-08       <NA>
224 15066.110   5.552637   24.7876180  115.7489032  1.094520e-07       <NA>
225 15067.213  -3.186980  -86.3092121    5.1794725  2.755151e-03       <NA>
226 15067.371  16.832943  168.0075049  259.2230601  6.197262e-62       <NA>
227 15061.324  -2.407722  -75.3244644   14.8874068  2.533862e-02       <NA>
228 15063.152  -4.397190 -101.1463773  -10.1674771  2.963717e-05       <NA>
229 15058.564  -6.643002 -128.9943699  -38.4213932  1.621275e-10       <NA>
230 15061.688  -2.155868  -72.3715405   18.1003660  4.666465e-02       <NA>
231 15060.464  -3.002152  -82.8304090    7.4309882  4.949793e-03       <NA>
232 15064.629  -2.994763  -83.4541630    7.5889335  5.010837e-03       <NA>
233 15058.705  -5.100826 -109.5555351  -18.9875213  1.138466e-06       <NA>
234 15075.210   2.739635  -11.0168616   81.6787747  1.046857e-02       <NA>
235 15060.684   2.570283  -12.8777588   77.5490506  1.673303e-02       <NA>
236 15065.109  -6.201502 -123.9884876  -33.0064814  2.660647e-09       <NA>
237 15067.152  -3.881384  -95.7387586   -3.6818417  2.346893e-04       <NA>
238 15075.456  15.643163  154.4593360  246.5998098  1.015842e-53       <NA>
239 15064.519  18.205282  186.0889039  277.6320826  3.973043e-72       <NA>
240 15071.843   2.453535  -14.5621830   77.2240237  2.280054e-02       <NA>
241 15069.476  21.882286  232.2472078  323.5264136 8.231712e-103       <NA>
242 15065.598   6.077421   31.6117452  123.1027304  5.628338e-09       <NA>
243 15066.760   3.638615    0.5655526   91.4870823  5.844258e-04       <NA>
244 15079.448  13.726888  131.6068218  224.9618301  1.137766e-41       <NA>
245 15077.977  -4.139237 -100.0938327   -7.0585019  8.934095e-05       <NA>
246 15072.731  -7.719501 -145.9735980  -53.2313714  8.630203e-14       <NA>
247 15066.188  14.302433  135.7278161  226.8314571  4.047842e-45       <NA>
248 15065.378  -4.005578  -95.9632718   -5.1984414  1.499821e-04       <NA>
249 15060.369  -7.674617 -141.8468348  -51.3675133  1.171202e-13       <NA>
250 15073.325  17.765621  180.6513636  272.2766603  8.575073e-69       <NA>
251 15065.428  -4.062142  -96.9181741   -5.9274234  1.214678e-04       <NA>
252 15072.335   3.721799    1.6556153   94.7037567  4.339257e-04       <NA>
253 15064.852   3.575593   -0.2314102   90.6001609  7.247412e-04       <NA>
254 15070.520  22.905863  246.2805887  337.9449453 2.742645e-112       <NA>
255 15067.841   7.164424   45.6421196  137.5242686  4.809755e-12       <NA>
256 15069.318   4.742593   14.5935053  105.9110423  6.356707e-06       <NA>
257 15071.912   8.786866   67.2716101  160.3852720  1.301642e-17       <NA>
258 15062.550   8.766891   65.3981181  156.2681427  1.479239e-17       <NA>
259 15066.284   5.164313   19.9630268  111.3344834  8.498381e-07       <NA>
260 15076.138  20.405420  216.9473619  309.7038033  7.813055e-90       <NA>
261 15070.491   4.856569   16.3263904  109.2656290  3.845281e-06       <NA>
262 15073.900   2.447269  -14.7425651   77.6727439  2.295906e-02       <NA>
263 15072.850   6.493645   37.9752125  132.1073008  4.264566e-10       <NA>
264 15069.037   6.412006   36.0594987  128.0323934  7.071179e-10       <NA>
265 15065.794   2.867360   -9.3401617   83.0633031  7.206405e-03       <NA>
266 15067.440  -2.237359  -75.0284968   17.4541280  3.867450e-02       <NA>
267 15069.305  18.593615  191.3956300  283.1117715  3.948790e-75       <NA>
268 15068.870   2.870679   -9.2521083   82.7003639  7.206405e-03       <NA>
269 15062.360  -3.206449  -86.1761879    4.9099680  2.608063e-03       <NA>
270 15072.268   4.549214   12.3832308  105.5555187  1.537559e-05       <NA>
271 15061.508   4.425026   10.5132027  101.4349255  2.653118e-05       <NA>
272 15063.784  -4.310880 -100.5941132   -9.1240193  4.316683e-05       <NA>
273  9005.684   4.938338  101.9818616  401.0467774  4.010360e-06   Familiar
274  8921.371   3.811336   44.5255093  343.2110896  3.064222e-04   Familiar
275  8998.705   4.855142   98.4989111  399.8718114  4.587220e-06   Familiar
276  8935.657   3.731634   40.8392794  342.2394030  3.589150e-04   Familiar
277  8923.360  -3.883837 -347.9176217  -48.3549479  3.064222e-04   Familiar
278  8935.119  -3.804572 -346.9118983  -44.7027548  3.064222e-04   Familiar
279  8922.318  -5.808301 -446.8691163 -146.7868370  8.555026e-08   Familiar
280  8937.322  -5.713732 -445.8267293 -143.1713077  8.555026e-08   Familiar
281  8924.062  -3.035930 -329.7956755   17.1506437  6.900912e-03   Familiar
282  8933.240   5.622118  114.3935595  456.4928077  3.206025e-07   Familiar
283  8915.521   4.800175   73.5226177  419.6730693  1.181437e-05   Familiar
284  8919.735   2.570377  -41.0445270  305.2447223  2.429038e-02   Familiar
285  8934.695   4.304762   48.6220646  398.7326357  8.577390e-05   Familiar
286  8933.792   6.865047  177.7616971  520.3674163  4.679459e-10   Familiar
287  8920.018   6.026618  136.7998350  483.6385982  5.744095e-08   Familiar
288  8925.497   2.988035  -19.6219589  327.4153603  7.432694e-03   Familiar
289  8924.142   3.800773   22.2336000  369.2093415  5.637375e-04   Familiar
290  8933.443   5.522193  112.0218900  462.5755564  3.785974e-07   Familiar
291  8935.392   4.908352   78.1542856  420.2521016  8.812871e-06   Familiar
292  8915.023   4.094298   37.2638697  383.4518374  1.879627e-04   Familiar
293  8928.258   3.608832   12.4559354  362.4187849  1.074276e-03   Familiar
294  8925.665   5.653755  115.0186616  454.2245259  3.206025e-07   Familiar
295  8915.723   4.818070   73.9183552  417.6341522  1.181437e-05   Familiar
296  8924.516   2.572243  -40.6643593  303.2213750  2.429038e-02   Familiar
297  8931.764   4.322218   49.1478458  396.5636749  8.577390e-05   Familiar
298  8927.808   5.566096  111.4799111  453.3667551  3.538238e-07   Familiar
299  8925.037   4.735222   70.2773208  416.8786652  1.466438e-05   Familiar
300  8923.111   2.509935  -44.1804075  302.3409019  2.660440e-02   Familiar
301  8925.012   4.249415   45.7162967  395.5987026  1.020681e-04   Familiar
302  8934.175   4.554749   60.2032465  402.3114156  3.188590e-05   Familiar
303  8918.147   3.744509   19.2949201  365.5290619  6.669088e-04   Familiar
304  8920.664  -2.292068 -290.9670484   55.3525973  4.622930e-02   Familiar
305  8923.798   3.264144   -5.4453076  344.4283029  3.306267e-03   Familiar
306  8934.999   3.326221   -2.1720746  339.8600260  2.777884e-03   Familiar
307  8919.755   2.529027  -43.1774355  303.1747067  2.606999e-02   Familiar
308  8919.091  -2.271927 -289.5027691   56.3043532  4.622930e-02   Familiar
309  8918.665  -3.506275 -353.3859441   -7.0552179  1.506976e-03   Familiar
310  8915.874  -2.273490 -287.3448536   55.7896174  4.622930e-02   Familiar
311  8933.651   3.838678   23.8790253  366.4566866  5.137776e-04   Familiar
312  8933.698   3.015752  -17.9622793  324.6484512  7.069246e-03   Familiar
313  8921.352  -2.565968 -308.5534807   41.7494357  2.429038e-02   Familiar
314  8908.590  -3.588285 -405.4801982    0.3496565  1.089382e-03   Familiar
315  8908.331  -3.974225 -429.5659544  -21.5526685  2.655710e-04   Familiar
316  8906.777  -3.367159 -393.6375556   12.8535541  2.244053e-03   Familiar
317  8911.942  -2.583792 -346.4545865   56.6755631  2.235133e-02   Familiar
318  8918.660   2.341057  -71.2414236  337.3615803  4.148486e-02   Familiar
319  8930.441   5.058025   82.7449401  489.1878603  3.147776e-06   Familiar
320  8906.563   4.457813   48.9023221  456.1107118  4.007322e-05   Familiar
321  8919.317   3.910484   18.1752481  431.6513226  3.301751e-04   Familiar
322  8913.886   2.302974  -72.4405586  330.7886109  4.526930e-02   Familiar
323  8909.669   3.227254  -20.8118780  386.6105215  3.489418e-03   Familiar
324  8907.451   5.959595  133.5048324  539.3033533  4.015748e-08   Familiar
325  8918.491   6.783754  181.2681442  589.8650464  6.351859e-10   Familiar
326  8930.887   4.869685   72.3807540  480.4247162  6.985066e-06   Familiar
327  8907.471   4.272398   38.5487355  447.3369683  9.059108e-05   Familiar
328  8919.892   3.729958    7.8220041  422.8772365  6.700673e-04   Familiar
329  8910.531   3.046612  -31.1706513  377.8419646  6.122997e-03   Familiar
330  8908.369   5.767537  123.1449651  530.5358904  9.782835e-08   Familiar
331  8919.109   6.589796  170.9079575  581.0979030  1.780066e-09   Familiar
332  8930.847   4.745883   65.2168238  472.4059494  1.240618e-05   Familiar
333  8907.740   4.146327   31.3236938  439.3793131  1.490586e-04   Familiar
334  8918.946   3.606260    0.6788102  414.8377334  1.038866e-03   Familiar
335  8909.513   2.919183  -38.3416859  369.8303023  8.971629e-03   Familiar
336  8909.079   5.643909  115.9264986  522.5716600  1.747499e-07   Familiar
337  8918.887   6.470119  163.7403782  573.0827854  3.154217e-09   Familiar
338  8929.748   5.166424   88.6925298  494.3078839  1.963002e-06   Familiar
339  8907.878   4.563220   54.7802146  461.3004327  2.519533e-05   Familiar
340  8918.346   4.014645   24.1182872  436.7758969  2.354749e-04   Familiar
341  8913.114   2.406559  -66.4941438  335.9098094  3.575284e-02   Familiar
342  8911.821   3.330556  -14.9319748  391.7982317  2.465708e-03   Familiar
343  8909.432   6.067973  139.3845125  544.4912866  2.291901e-08   Familiar
344  8917.624   6.894990  187.2129930  594.9878111  4.401107e-10   Familiar
345  8923.690   5.183378   89.2722090  493.1826384  1.892741e-06   Familiar
346  8915.707   4.570294   55.0366804  460.4984006  2.519533e-05   Familiar
347  8911.236   4.026446   24.6937160  435.6549017  2.298845e-04   Familiar
348  8906.765   2.411830  -65.9206874  334.7907867  3.575284e-02   Familiar
349  8914.802   3.336938  -14.5219169  390.8426074  2.455311e-03   Familiar
350  8914.084   6.082197  139.7466541  543.5835786  2.291901e-08   Familiar
351  8909.543   6.920245  187.8258941  593.8293436  4.401107e-10   Familiar
352  8930.217   4.582023   56.0417317  464.0032772  2.519533e-05   Familiar
353  8909.128   3.983507   22.1260386  430.9992039  2.618068e-04   Familiar
354  8920.115   3.446383   -8.5499097  406.4886890  1.746539e-03   Familiar
355  8910.492   2.758816  -47.5427853  361.4536373  1.389660e-02   Familiar
356  8910.008   5.477474  106.7271318  514.1932625  4.157345e-07   Familiar
357  8919.272   6.302989  154.5365602  564.7088390  6.895519e-09   Familiar
358  8927.076   4.102139   28.5821733  433.3308072  1.750396e-04   Familiar
359  8912.209   3.496897   -5.5111502  400.5043643  1.476906e-03   Familiar
360  8914.652   2.966472  -35.9687649  375.7755158  7.832484e-03   Familiar
361  8912.984   2.264361  -75.1240242  330.9028479  4.941238e-02   Familiar
362  8912.267   5.001130   79.1468335  483.6415323  4.039368e-06   Familiar
363  8914.725   5.839961  127.1000775  534.0132934  6.890295e-08   Familiar
364  8929.106   4.191403   33.6139892  438.4363188  1.259584e-04   Familiar
365  8929.338   4.572978   55.4235777  462.6148116  2.519533e-05   Familiar
366  8930.061   3.967411   21.0420123  426.6617556  2.667513e-04   Familiar
367  8917.542  -3.054013 -380.9086709   30.9645924  6.078895e-03   Familiar
368  8918.056  -3.435851 -405.0718345    9.1396747  1.780163e-03   Familiar
369  8918.116  -2.836466 -369.1035319   43.5059936  1.146712e-02   Familiar
370  8922.361   2.806108  -44.0504362  357.6351842  1.240104e-02   Familiar
371  8924.442   3.191512  -22.5186233  379.2174131  3.880207e-03   Familiar
372  8910.804  -2.354596 -335.9291797   70.0130285  4.057653e-02   Familiar
373  8913.539  -2.745735 -360.1111167   48.2068842  1.423997e-02   Familiar
374  8908.353  -5.093404 -488.6232495  -84.3024439  2.745561e-06   Familiar
375  8911.308  -5.470113 -512.8048293 -106.1089454  4.157345e-07   Familiar
376  8906.262  -4.868929 -476.7834490  -71.7957043  6.985066e-06   Familiar
377  8912.476  -3.709521 -408.0333232   -6.4268102  7.103061e-04   Familiar
378  8910.109  -4.096422 -429.5403948  -28.0337803  1.750396e-04   Familiar
379  8907.366  -2.719274 -356.4154526   49.4059104  1.519620e-02   Familiar
380  8916.892  -5.928451 -539.1182709 -132.1324275  4.411539e-08   Familiar
381  8917.381  -6.298137 -563.2909276 -153.9478521  6.895519e-09   Familiar
382  8918.034  -5.702326 -527.3410374 -119.5631209  1.332734e-07   Familiar
383  8914.400  -2.789260 -367.6848297   46.3782097  1.285702e-02   Familiar
384  8909.436  -4.563926 -458.3234799  -54.4616585  2.519533e-05   Familiar
385  8911.603  -4.947036 -479.9056534  -75.9935267  5.104225e-06   Familiar
386  8917.692  -3.566583 -406.9196311    1.5850839  1.158854e-03   Familiar
387  8918.367  -3.292527 -325.6419933  -18.6405514  3.737920e-03 Unfamiliar
388  8921.085  -2.412163 -278.2800024   27.2562745  3.969561e-02 Unfamiliar
389  8941.542  -3.211592 -330.8684878  -14.8332089  3.974071e-03 Unfamiliar
390  8911.766  -3.296607 -323.6300078  -18.7250925  3.737920e-03 Unfamiliar
391  8920.342  -5.280392 -430.1901553 -122.7472538  1.979162e-06 Unfamiliar
392  8913.996  -4.411947 -382.7890329  -76.8895595  7.773668e-05 Unfamiliar
393  8915.280   2.552546  -49.3515398  357.9300280  2.280277e-02 Unfamiliar
394  8912.541   6.673475  197.8831925  601.3807432  1.343920e-10 Unfamiliar
395  8912.626   6.044500  160.5729665  564.9648559  6.859224e-09 Unfamiliar
396  8920.506   3.257886   -6.8010982  405.5759154  2.655683e-03 Unfamiliar
397  8917.630   7.333514  240.4213284  649.0389363  1.608932e-12 Unfamiliar
398  8917.891   6.711065  203.1142799  612.6198716  1.127420e-10 Unfamiliar
399  8918.675   2.451183  -56.2217337  356.5164955  2.940674e-02 Unfamiliar
400  8907.960   2.400642  -57.3425012  341.6523829  3.277341e-02 Unfamiliar
401  8918.865   4.874159   91.5423254  501.3460444  3.668210e-06 Unfamiliar
402  8913.771   8.993265  338.8253168  744.7485005  9.546877e-18 Unfamiliar
403  8913.838   8.362911  301.5144049  708.3332991  1.161751e-15 Unfamiliar
404  8917.372   2.712946  -39.9557429  370.4031230  1.520639e-02 Unfamiliar
405  8904.748   2.672371  -40.9876276  355.4501275  1.659999e-02 Unfamiliar
406  8915.280   5.153765  107.8797101  515.1612780  9.561989e-07 Unfamiliar
407  8912.541   9.299088  355.1144425  758.6119931  1.157094e-18 Unfamiliar
408  8912.626   8.664306  317.8042165  722.1961059  1.174403e-16 Unfamiliar
409  8916.100   3.858522   29.6482837  437.7530085  3.296526e-04 Unfamiliar
410  8913.350   7.983194  276.8807219  681.2060178  2.077496e-14 Unfamiliar
411  8913.435   7.352641  239.5713002  644.7893262  1.608932e-12 Unfamiliar
412  8920.117   3.916513   33.7921958  449.6691887  2.715267e-04 Unfamiliar
413  8918.030   7.962769  280.9947915  693.1520406  2.077496e-14 Unfamiliar
414  8917.745   7.344579  243.6955253  656.7251935  1.608932e-12 Unfamiliar
415  8918.254   3.376111    0.4316741  410.2062976  1.874203e-03 Unfamiliar
416  8911.964   7.481525  247.7237400  653.5996791  7.583797e-13 Unfamiliar
417  8915.385   6.852374  210.3519173  617.2453886  4.647081e-11 Unfamiliar
418  8911.682  -3.277823 -402.1706668    5.5175418  2.566951e-03 Unfamiliar
419  8910.368  -3.547985 -416.0410442  -10.7646991  1.073014e-03 Unfamiliar
420  8911.220  -2.249589 -338.6339166   67.4678692  4.491548e-02 Unfamiliar
421  8916.997  -2.337234 -350.6245338   63.3983941  3.667529e-02 Unfamiliar
422  8915.756   5.616619  137.4427215  549.4779709  7.787125e-08 Unfamiliar
423  8915.330   5.002896  100.1308030  513.0637760  1.999239e-06 Unfamiliar
424  8926.449  -2.342443 -356.7077317   64.1141237  3.667529e-02 Unfamiliar
425  8923.701  -6.327329 -600.1695956 -183.1094599  1.232508e-09 Unfamiliar
426  8919.292  -3.993515 -452.3189509  -38.3664967  2.062451e-04 Unfamiliar
427  8923.819  -5.718335 -563.7964307 -145.7565115  4.580240e-08 Unfamiliar
428  8920.697  -3.385568 -415.9398725   -1.0194617  1.874203e-03 Unfamiliar
429  8907.059   4.355529   50.5383356  527.9286915  7.878203e-05 Unfamiliar
430  8907.051   5.939217  155.7051901  633.0968061  4.545901e-08 Unfamiliar
431  8909.686   5.199023  107.6904086  590.1835417  1.740670e-06 Unfamiliar
432  8909.873   6.765709  212.8483373  695.3605820  4.315209e-10 Unfamiliar
433  8909.765   5.024714   96.2443534  580.0086747  3.744726e-06 Unfamiliar
434  8910.948   6.585975  201.3539981  685.2339991  1.107651e-09 Unfamiliar
435  8909.562   5.313814  115.6923276  599.4299374  1.121481e-06 Unfamiliar
436  8910.744   6.875272  220.8082848  704.6489493  4.165908e-10 Unfamiliar
437  8908.688   5.209092  108.3451010  590.7444467  1.740670e-06 Unfamiliar
438  8909.846   6.774953  213.4628237  695.9616931  4.315209e-10 Unfamiliar
439  8913.001   4.347817   50.9918483  537.5968065  7.878203e-05 Unfamiliar
440  8912.790   5.901491  156.1577260  642.7658978  4.963744e-08 Unfamiliar
441  8910.483   4.418162   55.2856637  537.8086937  6.420913e-05 Unfamiliar
442  8910.472   5.984839  160.4458965  642.9834300  3.824432e-08 Unfamiliar
443  8910.054   5.024989   97.0830189  584.9688922  3.744726e-06 Unfamiliar
444  8908.248   6.577081  202.3416719  690.0452083  1.107651e-09 Unfamiliar
445  8911.776  -3.039259 -447.6884543   37.4698847  1.137214e-02 Unfamiliar
446  8912.530  -4.446308 -545.8062793  -57.8219357  5.881621e-05 Unfamiliar
447  8908.083  -5.894572 -633.4230670 -153.5382224  4.963744e-08 Unfamiliar
448  8912.544  -5.301547 -605.5969888 -116.2087125  1.124313e-06 Unfamiliar
449  8911.022  -3.553486 -482.3797208    2.7663676  1.948853e-03 Unfamiliar
450  8913.224  -3.453156 -485.5656687    9.7368035  2.747309e-03 Unfamiliar
451  8908.601  -3.891796 -499.7463910  -19.8473949  5.476862e-04 Unfamiliar
452  8910.929  -3.785972 -499.4551171  -12.9588583  8.130858e-04 Unfamiliar
453  8910.482  -2.791425 -430.9344702   54.1917504  2.438178e-02 Unfamiliar
454  8912.468  -5.995609 -650.9745545 -162.9886296  3.824432e-08 Unfamiliar
455  8908.080  -7.469886 -738.5956128 -258.7006457  1.343853e-11 Unfamiliar
456  8913.576  -6.844722 -710.8253055 -221.3153649  4.165908e-10 Unfamiliar
457  8910.873  -5.111784 -587.5513400 -102.3969823  2.623223e-06 Unfamiliar
458  8914.396  -4.978513 -590.7864617  -95.3773727  4.539583e-06 Unfamiliar
459  8908.556  -5.467232 -604.9133726 -125.0153823  5.525340e-07 Unfamiliar
460  8912.130  -5.338740 -604.6814689 -118.0674756  1.048034e-06 Unfamiliar
461  8911.743  -4.348832 -536.1600827  -50.9176062  7.878203e-05 Unfamiliar
462  9002.785  12.685311  195.3880789  313.0692557  4.393849e-36   Familiar
463  9018.697  14.287092  229.6910965  348.5110017  4.154842e-45   Familiar
464  9016.138  15.240918  250.9285377  370.6726350  1.251157e-50   Familiar
465  8965.896   2.770343   -3.3825277  116.5263658  1.402813e-02   Familiar
466  9006.305  14.872487  239.9869151  358.0445146  1.436384e-48   Familiar
467  8999.974  13.916128  220.9895596  339.1704690  5.351341e-43   Familiar
468  8959.063  11.774785  170.0735868  306.4034319  9.924379e-31   Familiar
469  8970.631  -3.866305 -149.7683394  -10.2939028  3.497278e-04   Familiar
470  8956.708  13.641629  207.5267103  343.6475882  1.305910e-40   Familiar
471  8958.495  14.476708  224.7194661  361.0359978  1.897819e-45   Familiar
472  8947.937   2.667175  -14.3776361  123.6560814  1.631468e-02   Familiar
473  8958.293   2.786367  -11.9406119  126.1479698  1.215643e-02   Familiar
474  8954.865   2.694990  -13.8115807  124.2598887  1.551487e-02   Familiar
475  8958.884  12.634272  187.1663640  323.2800975  3.674446e-35   Familiar
476  8962.919  -3.050748 -132.6698904    6.5770910  6.043989e-03   Familiar
477  8946.043  10.436380  141.5903486  276.5823209  1.733712e-24   Familiar
478  8940.054  -3.280351 -134.7989722    1.7973431  2.862065e-03   Familiar
479  8941.017  -4.127075 -152.1919098  -15.3908847  1.439348e-04   Familiar
480  8940.976  -2.275927 -114.4324465   22.1586545  4.440238e-02   Familiar
481  8964.674  -5.322530 -178.2931468  -40.0734446  4.940951e-07   Familiar
482  8952.274  10.186883  137.6573719  273.7023567  2.030101e-23   Familiar
483  8963.673  -3.419687 -138.7785293   -1.0360406  1.807038e-03   Familiar
484  8965.183  -4.259384 -156.1679750  -18.2277603  8.542196e-05   Familiar
485  8956.802  -2.424165 -118.3967714   19.3100386  3.072663e-02   Familiar
486  8961.263  -5.449231 -182.1988105  -42.9807217  2.636442e-07   Familiar
487  8957.461  13.203917  198.6871078  334.8100496  3.205977e-38   Familiar
488  8947.900   2.843792  -10.6495813  125.9740692  1.053200e-02   Familiar
489  8955.578   2.987926   -7.7887400  129.9261687  6.884510e-03   Familiar
490  8956.752  -2.493368 -121.1356425   18.0935390  2.613528e-02   Familiar
491  8959.038   9.611079  126.0668341  262.1498918  5.484647e-21   Familiar
492  8947.159  -3.989091 -150.2921483  -12.6654243  2.338893e-04   Familiar
493  8947.512  -4.828305 -167.6869132  -29.8518249  6.159243e-06   Familiar
494  8938.913  -2.992836 -129.9113525    7.6816169  6.884510e-03   Familiar
495  8946.179  -3.556411 -141.4527204   -3.8277111  1.133697e-03   Familiar
496  8961.740  -6.008762 -193.7763016  -54.5462334  1.068293e-08   Familiar
497  8958.186  11.655220  167.6222240  303.9258820  2.986960e-30   Familiar
498  8958.581  11.746977  169.4950484  305.8121075  1.176631e-30   Familiar
499  8960.432  15.582553  249.4585265  387.0807344  3.219697e-52   Familiar
500  8954.388   3.987402   12.7939884  152.1971665  2.338893e-04   Familiar
501  8954.696   3.896313   10.9101133  150.3219917  3.246526e-04   Familiar
502  8955.411  10.001352  144.1352497  305.8645158  2.774294e-22   Familiar
503  8929.781  -3.540709 -160.6219357    1.2103485  1.305662e-03   Familiar
504  8940.102   3.270272   -7.2384160  153.2684958  3.270533e-03   Familiar
505  8935.901  -4.366926 -179.6178827  -17.4273547  5.281103e-05   Familiar
506  8931.300  -2.961816 -147.3373285   14.2175440  7.951743e-03   Familiar
507  8955.118  11.755559  183.5976319  345.3252194  2.468519e-30   Familiar
508  8932.478   2.698782  -20.1291674  141.4301075  1.631305e-02   Familiar
509  8951.301   3.127939  -10.6790242  153.8770669  5.003710e-03   Familiar
510  8939.837   5.037764   32.2238868  192.7292788  2.721221e-06   Familiar
511  8935.606  -2.617851 -140.1556682   22.0335166  1.913341e-02   Familiar
512  8956.185  13.045853  213.4600922  375.8228507  7.676103e-37   Familiar
513  8931.581   3.076333  -11.7296306  151.0128081  5.642143e-03   Familiar
514  8934.374   4.026029    9.7362226  171.9248092  2.083547e-04   Familiar
515  8952.391   4.429556   19.1879333  184.3702011  4.176869e-05   Familiar
516  8940.881   6.364280   62.0857684  223.2274889  1.574749e-09   Familiar
517  8950.730   3.517050   -1.7581242  161.4905187  1.397827e-03   Familiar
518  8956.750  11.697968  182.6309439  344.6503049  4.220262e-30   Familiar
519  8934.205   2.657222  -21.1030609  140.7623985  1.796501e-02   Familiar
520  8951.321   3.087000  -11.6352286  153.1916688  5.612322e-03   Familiar
521  8941.556   4.991818   31.2554588  192.0561044  3.215245e-06   Familiar
522  8936.327  -2.649386 -141.1248205   21.3610664  1.796501e-02   Familiar
523  8954.332   8.857152  118.1530003  279.5527590  9.975521e-18   Familiar
524  8935.231  -2.913921 -146.5401417   15.3230499  9.124044e-03   Familiar
525  8933.250  -4.238569 -177.0211200  -14.5560636  8.690811e-05   Familiar
526  8934.998  -2.872088 -145.8708777   16.2953883  1.025172e-02   Familiar
527  8937.631  -2.252079 -131.8926661   30.2831636  4.433623e-02   Familiar
528  8932.700  -4.710486 -186.6268936  -25.0786997  1.199404e-05   Familiar
529  8935.711  -2.995959 -146.8147342   13.3330999  7.236739e-03   Familiar
530  8939.651  -5.535723 -205.6205144  -43.7187291  2.120136e-07   Familiar
531  8934.604  -4.132661 -173.3408062  -12.0729843  1.350360e-04   Familiar
532  8945.228  11.762858  182.6476727  343.3947833  2.468519e-30   Familiar
533  8942.741   2.864226  -16.3600203  144.6967169  1.033991e-02   Familiar
534  8939.005   2.648388  -21.1517352  139.5722801  1.796501e-02   Familiar
535  8941.016   3.083190  -11.6344077  151.9520552  5.612322e-03   Familiar
536  8930.463   5.003651   31.2711184  190.8016521  3.132537e-06   Familiar
537  8943.399  -2.695711 -141.1739536   20.1714068  1.631305e-02   Familiar
538  8954.786  11.171016  171.0849635  333.4175690  1.488702e-27   Familiar
539  8941.104   2.362155  -27.8575292  134.6543023  3.478900e-02   Familiar
540  8935.278  -2.320854 -133.6943643   28.7855441  3.790879e-02   Familiar
541  8953.290   2.584826  -23.1975705  141.9752944  2.045269e-02   Familiar
542  8941.837   4.473389   19.6999912  180.8328556  3.507319e-05   Familiar
543  8937.879  -3.147008 -152.6763803   10.1339099  4.777426e-03   Familiar
544  8950.317   9.256868  126.8637247  287.9291806  3.052112e-19   Familiar
545  8938.541  -2.538334 -137.8733140   23.7433681  2.306368e-02   Familiar
546  8940.044  -3.865677 -168.3692217   -6.1208159  3.793238e-04   Familiar
547  8937.206  -2.497541 -137.1910864   24.7027429  2.553914e-02   Familiar
548  8936.420  -2.488316 -135.9770418   24.7274911  2.553914e-02   Familiar
549  8935.910  -4.337483 -177.9494274  -16.6690199  5.866586e-05   Familiar
550  8935.411   2.492084  -24.5117263  135.3349460  2.553914e-02   Familiar
551  8938.516  -2.617256 -138.1238776   21.7293893  1.913341e-02   Familiar
552  8941.318  -5.165482 -196.9340027  -35.3180948  1.499348e-06   Familiar
553  8939.477  -3.757806 -164.6685137   -3.6581309  5.737512e-04   Familiar
554  8953.021   9.095608  123.2673842  284.3545270  1.248650e-18   Familiar
555  8954.149  11.076859  168.6430325  330.6722293  3.795831e-27   Familiar
556  8954.588  13.571903  224.0054261  385.4059265  1.156367e-39   Familiar
557  8930.355   4.498365   20.2735138  181.5159276  3.215013e-05   Familiar
558  8935.984   2.440271  -26.0367298  136.1328206  2.846101e-02   Familiar
559  8950.298   8.459353  110.9130459  274.8117627  2.975868e-16   Familiar
560  8950.199  -2.476733 -139.2218905   25.6314372  2.604418e-02   Familiar
561  8949.324  -4.896216 -193.9510877  -29.7354563  5.069858e-06   Familiar
562  8941.887   6.834389   72.0500417  231.9196439  7.065601e-11   Familiar
563  8937.920  -2.330554 -131.7588862   28.1066607  3.739817e-02   Familiar
564  8938.947  -4.366435 -178.0775845  -17.2679918  5.281103e-05   Familiar
565  8939.351  -6.854230 -232.8102175  -72.6314496  6.497772e-11   Familiar
566  8944.764  11.942290  185.6534617  345.5339319  3.855983e-31   Familiar
567  8934.211   2.778804  -18.1352863  141.7007688  1.307037e-02   Familiar
568  8940.463   3.213031   -8.6344789  154.0970639  3.878194e-03   Familiar
569  8929.856   5.147749   34.2801490  192.9375591  1.584418e-06   Familiar
570  8954.754  14.384361  242.6782800  404.3667228  3.257854e-44   Familiar
571  8937.765   5.325725   38.9150230  200.5080686  6.565944e-07   Familiar
572  8942.054   3.267223   -7.3984382  155.1281792  3.270533e-03   Familiar
573  8950.720   5.709510   48.4018753  212.9183190  8.131034e-08   Familiar
574  8939.614   7.684743   91.3023569  251.7729604  1.525414e-13   Familiar
575  8935.756   2.595617  -22.2924308  138.1500400  2.009732e-02   Familiar
576  8953.068  13.011873  211.0176846  372.1018653  8.914923e-37   Familiar
577  8932.471   3.919108    7.2685344  168.2291044  3.113568e-04   Familiar
578  8948.961   4.328462   16.7363959  180.6583455  5.954732e-05   Familiar
579  8937.797   6.276586   59.6431743  219.5066900  2.638779e-09   Familiar
580  8950.591   9.531973  133.7843017  295.7662467  2.486481e-20   Familiar
581  8949.151  -3.983595 -171.0762987   -8.7845055  2.434428e-04   Familiar
582  8936.092   2.807713  -17.5947861  143.1756489  1.214355e-02   Familiar
583  8938.892  -2.272225 -131.2090077   29.5721625  4.257559e-02   Familiar
584  8949.256  -4.808574 -190.0372135  -27.4572409  7.624833e-06   Familiar
585  8947.287  -3.407840 -157.7741589    4.2051574  2.053567e-03   Familiar
586  8971.408   9.545939  140.6254797  265.5505593  5.117640e-21 Unfamiliar
587  8976.419  10.920503  171.1753212  297.0610331  2.056749e-26 Unfamiliar
588  8976.048  10.850203  168.8895314  294.1975016  2.202361e-26 Unfamiliar
589  8974.340  10.096230  153.0010688  278.4741553  2.885348e-23 Unfamiliar
590  8980.898  10.325002  158.1775687  283.8795454  3.739183e-24 Unfamiliar
591  8949.505  13.955071  256.5994348  419.9247071  6.942797e-43 Unfamiliar
592  8940.743  -4.890907 -196.8890485  -36.2769782  2.930480e-06 Unfamiliar
593  8941.892  -3.340557 -160.2856268    0.6797163  1.731530e-03 Unfamiliar
594  8957.654  15.845375  306.0443983  471.3274359  1.898444e-54 Unfamiliar
595  8951.050  -2.741196 -147.4706773   15.1523427  1.124520e-02 Unfamiliar
596  8952.606  14.762553  277.7574855  442.0201951  1.258537e-47 Unfamiliar
597  8943.262  -3.959985 -175.7415236  -14.1709645  1.846427e-04 Unfamiliar
598  8944.209  -2.420822 -139.1388034   22.7864315  2.558361e-02 Unfamiliar
599  8949.505  14.449806  268.5914983  431.9167706  9.280223e-46 Unfamiliar
600  8940.743  -4.387814 -184.8969850  -24.2849148  2.939768e-05 Unfamiliar
601  8941.892  -2.838568 -148.2935633   12.6717798  8.814084e-03 Unfamiliar
602  8951.258  12.322394  217.4526742  381.1002433  8.633873e-34 Unfamiliar
603  8936.903  -3.760595 -169.5088521   -9.3100646  3.882426e-04 Unfamiliar
604  8933.671  -2.565875 -140.1968224   18.9720592  1.790291e-02 Unfamiliar
605  8927.305  -2.171666 -130.0618533   28.1065018  4.814321e-02 Unfamiliar
606  8949.180  -3.583950 -167.6058451   -5.1813082  7.243754e-04 Unfamiliar
607  8942.473  -6.513247 -236.0372782  -75.0999731  3.197181e-10 Unfamiliar
608  8943.628  -4.962491 -199.4335133  -38.1436218  2.126351e-06 Unfamiliar
609  8960.638  13.159297  242.2510989  408.9766540  2.544801e-38 Unfamiliar
610  8949.711  -2.601943 -144.7380195   18.5939384  1.656241e-02 Unfamiliar
611  8958.526  -2.445143 -142.8037308   22.6914129  2.453608e-02 Unfamiliar
612  8952.618  -5.308564 -211.2460441  -47.2163717  3.555827e-07 Unfamiliar
613  8953.381  -3.789728 -174.6387534  -10.2635462  3.578173e-04 Unfamiliar
614  8954.689  14.268744  265.7796543  430.0797452  1.021711e-44 Unfamiliar
615  8940.138  -4.458968 -187.6961864  -26.1345828  2.200711e-05 Unfamiliar
616  8947.126  -2.918070 -151.1088922   10.8382392  7.061639e-03 Unfamiliar
617  8952.348   8.533589  127.6755606  294.2486323  9.077984e-17 Unfamiliar
618  8937.726  -5.316699 -207.9656093  -46.6343398  3.555827e-07 Unfamiliar
619  8945.079  -7.332759 -259.3783754  -96.0692658  1.155397e-12 Unfamiliar
620  8940.361  -6.183440 -230.0685759  -67.7849118  2.541659e-09 Unfamiliar
621  8937.726  -5.817549 -219.9576728  -58.6264033  2.264942e-08 Unfamiliar
622  8939.490  -3.681062 -169.1421063   -7.4866182  5.139892e-04 Unfamiliar
623  8951.902  -4.688246 -197.0413989  -32.2621611  7.689832e-06 Unfamiliar
624  8942.416  -5.685849 -218.1243778  -55.8108288  4.663535e-08 Unfamiliar
625  8957.929  -7.112718 -257.4600464  -91.9558314  5.390581e-12 Unfamiliar
626  8948.117 -10.020533 -325.8790194 -161.8869564  9.881635e-23 Unfamiliar
627  8947.768  -8.490688 -289.2790244 -124.9268352  1.209748e-16 Unfamiliar
628  8967.765  15.519985  301.9505751  469.3894956  2.081382e-52 Unfamiliar
629  8962.654  18.467614  371.8686778  537.8214909  5.991640e-73 Unfamiliar
630  8954.234   2.829385  -13.1931457  151.5432436  8.814084e-03 Unfamiliar
631  8963.099  16.934208  334.8923157  501.2377369  7.973831e-62 Unfamiliar
632  8942.207   8.468177  131.0220494  324.2858943  4.015929e-16 Unfamiliar
633  8942.276  -4.533875 -219.2039774  -25.3336293  2.719899e-05 Unfamiliar
634  8932.432   3.027466  -14.9906771  175.0719424  5.647681e-03 Unfamiliar
635  8939.609  -3.382665 -187.0449949    5.6782351  1.869561e-03 Unfamiliar
636  8938.719  -4.042556 -204.1554563  -11.9782526  1.989573e-04 Unfamiliar
637  8948.349  10.424595  185.5174254  380.7810838  1.022095e-23 Unfamiliar
638  8936.695   2.433864  -31.0045664  161.0411445  2.790955e-02 Unfamiliar
639  8939.259  -2.452653 -164.6331565   31.0861152  2.682164e-02 Unfamiliar
640  8950.371   3.503068   -2.5197507  195.6582394  1.285695e-03 Unfamiliar
641  8938.922   5.072672   39.4957274  231.5761034  2.111150e-06 Unfamiliar
642  8945.909   8.901023  144.4970035  340.2515348  1.265424e-17 Unfamiliar
643  8937.310  -3.940727 -205.6472481   -9.4497641  2.846280e-04 Unfamiliar
644  8941.351   3.536704   -1.5478489  191.0697088  1.195428e-03 Unfamiliar
645  8935.927  -2.799203 -173.5077671   21.5816018  1.061464e-02 Unfamiliar
646  8943.713  -3.448041 -190.6573973    3.9642828  1.522673e-03 Unfamiliar
647  8942.890   8.384302  130.3923350  326.0952796  7.493520e-16 Unfamiliar
648  8952.352  -4.454350 -219.8687588  -23.4891771  3.832616e-05 Unfamiliar
649  8935.278   3.010180  -15.6508764  176.9118126  5.862545e-03 Unfamiliar
650  8949.258  -3.317310 -187.7144275    7.5273385  2.288753e-03 Unfamiliar
651  8942.368  -3.969272 -204.8055273  -10.1485108  2.585224e-04 Unfamiliar
652  8944.907   6.923304   90.3965426  285.6170062  4.008860e-11 Unfamiliar
653  8942.126  -3.542150 -191.6903848    1.4054244  1.195428e-03 Unfamiliar
654  8948.084  -5.944449 -259.8229219  -64.0090797  2.001314e-08 Unfamiliar
655  8944.578  -2.866251 -174.4729770   19.6657632  8.847093e-03 Unfamiliar
656  8944.469  -4.812764 -227.6696003  -32.9915544  7.467104e-06 Unfamiliar
657  8937.939  -5.471185 -244.7596326  -50.6684713  2.926838e-07 Unfamiliar
658  8934.701  -2.578303 -164.8942456   27.1451338  1.950661e-02 Unfamiliar
659  8937.640  -2.351836 -158.8706135   33.2001888  3.447581e-02 Unfamiliar
660  8953.574   8.629040  137.8435923  334.6727738  1.108704e-16 Unfamiliar
661  8945.114  -4.140616 -212.3369535  -14.9922308  1.373421e-04 Unfamiliar
662  8945.208   3.290062   -8.2018051  185.4914929  2.481380e-03 Unfamiliar
663  8941.461  -3.007211 -180.1871415   16.0288041  5.862545e-03 Unfamiliar
664  8947.719  -3.653193 -197.3265535   -1.5987330  8.133344e-04 Unfamiliar
665  8949.579   8.848854  142.7220290  337.9916121  1.789967e-17 Unfamiliar
666  8941.375  -4.024257 -207.4304673  -11.7014421  2.099257e-04 Unfamiliar
667  8934.402   3.471755   -3.2783065  188.7652692  1.419386e-03 Unfamiliar
668  8939.264  -2.880383 -175.2936459   19.3325835  8.579571e-03 Unfamiliar
669  8939.598  -3.532259 -192.4076835    1.6796719  1.195428e-03 Unfamiliar
670  8950.558   5.282520   46.3447400  243.7146447  7.390174e-07 Unfamiliar
671  8937.114  -3.073750 -179.2459532   13.9973941  4.990708e-03 Unfamiliar
672  8942.917  -5.085664 -235.7404743  -40.4986501  2.042420e-06 Unfamiliar
673  8945.340  -3.574524 -195.2324375    0.5432840  1.079307e-03 Unfamiliar
674  8946.037  -3.055977 -181.0914407   14.6632108  5.215661e-03 Unfamiliar
675  8947.072  -3.332640 -189.6244577    7.1674762  2.202566e-03 Unfamiliar
676  8942.415  -3.510320 -192.9395565    2.2853001  1.274355e-03 Unfamiliar
677  8939.459  -2.705760 -170.2128617   24.0103154  1.392863e-02 Unfamiliar
678  8950.904  -7.440106 -303.8812534 -105.9049124  1.120884e-12 Unfamiliar
679  8947.654  -4.408366 -218.5361401  -22.2252380  4.606133e-05 Unfamiliar
680  8945.932  -6.330309 -271.7151360  -74.9001828  1.868299e-09 Unfamiliar
681  8947.154  -6.983292 -288.8445656  -92.5377024  2.780187e-11 Unfamiliar
682  8939.045  -4.140268 -208.9583512  -14.7449247  1.373421e-04 Unfamiliar
683  8934.521  -3.917935 -202.8888420   -8.7357468  3.059195e-04 Unfamiliar
684  8944.561   8.072987  121.0088102  315.2531208  9.118835e-15 Unfamiliar
685  8952.174  12.708222  250.9484504  448.8971001  1.687723e-34 Unfamiliar
686  8942.750   4.864107   34.4004159  229.1832035  5.963772e-06 Unfamiliar
687  8953.533   9.718354  167.2445667  363.5761960  9.919513e-21 Unfamiliar
688  8934.539  -3.088924 -182.8565554   13.8317677  4.817089e-03 Unfamiliar
689  8955.115   6.698699   86.4625768  286.6974437  1.795348e-10 Unfamiliar
690  8955.912  -5.846566 -263.7659780  -62.9195520  3.455116e-08 Unfamiliar
691  8957.410  -2.843922 -178.4651384   20.8043961  9.360853e-03 Unfamiliar
692  8945.474   5.463179   50.4918228  244.7348556  2.939039e-07 Unfamiliar
693  8935.418  -2.653482 -166.0426195   25.0073668  1.606642e-02 Unfamiliar
694  8947.143  -7.464508 -299.7298935 -104.8889786  9.992751e-13 Unfamiliar
695  8943.795  -4.384204 -214.3752030  -21.2188813  5.004012e-05 Unfamiliar
696  8953.683  11.624848  219.9055528  416.7691508  2.623061e-29 Unfamiliar
697  8943.817   3.719318    3.3635763  197.0491962  6.542657e-04 Unfamiliar
698  8956.011   4.741702   31.8780210  231.6366621  1.028933e-05 Unfamiliar
699  8944.002   6.336250   73.8744673  267.5735578  1.868299e-09 Unfamiliar
700  8952.844  12.293172  237.5574620  433.8841907  1.428482e-32 Unfamiliar
701  8941.160   4.377369   21.0310246  214.1486971  5.023598e-05 Unfamiliar
702  8941.296   2.590558  -27.2473257  167.8682157  1.907057e-02 Unfamiliar
703  8956.947   5.380629   49.5089047  248.7727275  4.478193e-07 Unfamiliar
704  8937.500   7.002696   91.5521701  284.6628043  2.574379e-11 Unfamiliar
705  8943.895   9.507514  159.7630841  353.9995765  6.278855e-20 Unfamiliar
706  8942.152  -3.433637 -190.4411024    4.3582125  1.578124e-03 Unfamiliar
707  8945.759   2.563550  -28.2714468  168.8740869  2.009718e-02 Unfamiliar
708  8934.551   4.111723   13.7457303  204.7902519  1.515596e-04 Unfamiliar
709  8939.170  -2.281372 -158.2846227   35.3725798  4.058971e-02 Unfamiliar
710  8938.167  -2.934904 -175.3968486   17.7178565  7.311219e-03 Unfamiliar
711  8943.902   9.283957  153.7233977  347.9605758  4.408130e-19 Unfamiliar
712  8944.422  -3.655716 -196.5017147   -1.6598623  8.133344e-04 Unfamiliar
713  8948.880   2.342930  -34.3273490  162.8513020  3.488900e-02 Unfamiliar
714  8934.638   3.884476    7.7066925  198.7506027  3.435535e-04 Unfamiliar
715  8941.810  -2.505051 -164.3438280   29.3530980  2.344921e-02 Unfamiliar
716  8940.961  -3.159093 -181.4555494   11.6978701  3.856289e-03 Unfamiliar
    difficulty
1         <NA>
2         <NA>
3         <NA>
4         <NA>
5         <NA>
6         <NA>
7         <NA>
8         <NA>
9         <NA>
10        <NA>
11        <NA>
12        <NA>
13        <NA>
14        <NA>
15        <NA>
16        <NA>
17        <NA>
18        <NA>
19        <NA>
20        <NA>
21        <NA>
22        <NA>
23        <NA>
24        <NA>
25        <NA>
26        <NA>
27        <NA>
28        <NA>
29        <NA>
30        <NA>
31        <NA>
32        <NA>
33        <NA>
34        <NA>
35        <NA>
36        <NA>
37        <NA>
38        <NA>
39        <NA>
40        <NA>
41        <NA>
42        <NA>
43        <NA>
44        <NA>
45        <NA>
46        <NA>
47        <NA>
48        <NA>
49        <NA>
50        <NA>
51        <NA>
52        <NA>
53        <NA>
54        <NA>
55        <NA>
56        <NA>
57        <NA>
58        <NA>
59        <NA>
60        <NA>
61        <NA>
62        <NA>
63        <NA>
64        <NA>
65        <NA>
66        <NA>
67        <NA>
68        <NA>
69        <NA>
70        <NA>
71        <NA>
72        <NA>
73        <NA>
74        <NA>
75        <NA>
76        <NA>
77        <NA>
78        <NA>
79        <NA>
80        <NA>
81        <NA>
82        <NA>
83        <NA>
84        <NA>
85        <NA>
86        <NA>
87        <NA>
88        <NA>
89        <NA>
90        <NA>
91        <NA>
92        <NA>
93        <NA>
94        <NA>
95        <NA>
96        <NA>
97        <NA>
98        <NA>
99        <NA>
100       <NA>
101       <NA>
102       <NA>
103       <NA>
104       <NA>
105       <NA>
106       <NA>
107       <NA>
108       <NA>
109       <NA>
110       <NA>
111       <NA>
112       <NA>
113       <NA>
114       <NA>
115       <NA>
116       <NA>
117       <NA>
118       <NA>
119       <NA>
120       <NA>
121       <NA>
122       <NA>
123       <NA>
124       <NA>
125       <NA>
126       <NA>
127       <NA>
128       <NA>
129       <NA>
130       <NA>
131       <NA>
132       <NA>
133       <NA>
134       <NA>
135       <NA>
136       <NA>
137       <NA>
138       <NA>
139       <NA>
140       <NA>
141       <NA>
142       <NA>
143       <NA>
144       <NA>
145       <NA>
146       <NA>
147       <NA>
148       <NA>
149       <NA>
150       <NA>
151       <NA>
152       <NA>
153       <NA>
154       <NA>
155       <NA>
156       <NA>
157       <NA>
158       <NA>
159       <NA>
160       <NA>
161       <NA>
162       <NA>
163       <NA>
164       <NA>
165       <NA>
166       <NA>
167       <NA>
168       <NA>
169       <NA>
170       <NA>
171       <NA>
172       <NA>
173       <NA>
174       <NA>
175       <NA>
176       <NA>
177       <NA>
178       <NA>
179       <NA>
180       <NA>
181       <NA>
182       <NA>
183       <NA>
184       <NA>
185       <NA>
186       <NA>
187       <NA>
188       <NA>
189       <NA>
190       <NA>
191       <NA>
192       <NA>
193       <NA>
194       <NA>
195       <NA>
196       <NA>
197       <NA>
198       <NA>
199       <NA>
200       <NA>
201       <NA>
202       <NA>
203       <NA>
204       <NA>
205       <NA>
206       <NA>
207       <NA>
208       <NA>
209       <NA>
210       <NA>
211       <NA>
212       <NA>
213       <NA>
214       <NA>
215       <NA>
216       <NA>
217       <NA>
218       <NA>
219       <NA>
220       <NA>
221       <NA>
222       <NA>
223       <NA>
224       <NA>
225       <NA>
226       <NA>
227       <NA>
228       <NA>
229       <NA>
230       <NA>
231       <NA>
232       <NA>
233       <NA>
234       <NA>
235       <NA>
236       <NA>
237       <NA>
238       <NA>
239       <NA>
240       <NA>
241       <NA>
242       <NA>
243       <NA>
244       <NA>
245       <NA>
246       <NA>
247       <NA>
248       <NA>
249       <NA>
250       <NA>
251       <NA>
252       <NA>
253       <NA>
254       <NA>
255       <NA>
256       <NA>
257       <NA>
258       <NA>
259       <NA>
260       <NA>
261       <NA>
262       <NA>
263       <NA>
264       <NA>
265       <NA>
266       <NA>
267       <NA>
268       <NA>
269       <NA>
270       <NA>
271       <NA>
272       <NA>
273          6
274          6
275          6
276          6
277          6
278          6
279          6
280          6
281         12
282         12
283         12
284         12
285         12
286         12
287         12
288         12
289         12
290         12
291         12
292         12
293         12
294         12
295         12
296         12
297         12
298         12
299         12
300         12
301         12
302         12
303         12
304         12
305         12
306         12
307         12
308         12
309         12
310         12
311         12
312         12
313         12
314         18
315         18
316         18
317         18
318         18
319         18
320         18
321         18
322         18
323         18
324         18
325         18
326         18
327         18
328         18
329         18
330         18
331         18
332         18
333         18
334         18
335         18
336         18
337         18
338         18
339         18
340         18
341         18
342         18
343         18
344         18
345         18
346         18
347         18
348         18
349         18
350         18
351         18
352         18
353         18
354         18
355         18
356         18
357         18
358         18
359         18
360         18
361         18
362         18
363         18
364         18
365         18
366         18
367         18
368         18
369         18
370         18
371         18
372         18
373         18
374         18
375         18
376         18
377         18
378         18
379         18
380         18
381         18
382         18
383         18
384         18
385         18
386         18
387          6
388          6
389          6
390          6
391          6
392          6
393         12
394         12
395         12
396         12
397         12
398         12
399         12
400         12
401         12
402         12
403         12
404         12
405         12
406         12
407         12
408         12
409         12
410         12
411         12
412         12
413         12
414         12
415         12
416         12
417         12
418         12
419         12
420         12
421         12
422         12
423         12
424         12
425         12
426         12
427         12
428         12
429         18
430         18
431         18
432         18
433         18
434         18
435         18
436         18
437         18
438         18
439         18
440         18
441         18
442         18
443         18
444         18
445         18
446         18
447         18
448         18
449         18
450         18
451         18
452         18
453         18
454         18
455         18
456         18
457         18
458         18
459         18
460         18
461         18
462          6
463          6
464          6
465          6
466          6
467          6
468         12
469         12
470         12
471         12
472         12
473         12
474         12
475         12
476         12
477         12
478         12
479         12
480         12
481         12
482         12
483         12
484         12
485         12
486         12
487         12
488         12
489         12
490         12
491         12
492         12
493         12
494         12
495         12
496         12
497         12
498         12
499         12
500         12
501         12
502         18
503         18
504         18
505         18
506         18
507         18
508         18
509         18
510         18
511         18
512         18
513         18
514         18
515         18
516         18
517         18
518         18
519         18
520         18
521         18
522         18
523         18
524         18
525         18
526         18
527         18
528         18
529         18
530         18
531         18
532         18
533         18
534         18
535         18
536         18
537         18
538         18
539         18
540         18
541         18
542         18
543         18
544         18
545         18
546         18
547         18
548         18
549         18
550         18
551         18
552         18
553         18
554         18
555         18
556         18
557         18
558         18
559         18
560         18
561         18
562         18
563         18
564         18
565         18
566         18
567         18
568         18
569         18
570         18
571         18
572         18
573         18
574         18
575         18
576         18
577         18
578         18
579         18
580         18
581         18
582         18
583         18
584         18
585         18
586          6
587          6
588          6
589          6
590          6
591         12
592         12
593         12
594         12
595         12
596         12
597         12
598         12
599         12
600         12
601         12
602         12
603         12
604         12
605         12
606         12
607         12
608         12
609         12
610         12
611         12
612         12
613         12
614         12
615         12
616         12
617         12
618         12
619         12
620         12
621         12
622         12
623         12
624         12
625         12
626         12
627         12
628         12
629         12
630         12
631         12
632         18
633         18
634         18
635         18
636         18
637         18
638         18
639         18
640         18
641         18
642         18
643         18
644         18
645         18
646         18
647         18
648         18
649         18
650         18
651         18
652         18
653         18
654         18
655         18
656         18
657         18
658         18
659         18
660         18
661         18
662         18
663         18
664         18
665         18
666         18
667         18
668         18
669         18
670         18
671         18
672         18
673         18
674         18
675         18
676         18
677         18
678         18
679         18
680         18
681         18
682         18
683         18
684         18
685         18
686         18
687         18
688         18
689         18
690         18
691         18
692         18
693         18
694         18
695         18
696         18
697         18
698         18
699         18
700         18
701         18
702         18
703         18
704         18
705         18
706         18
707         18
708         18
709         18
710         18
711         18
712         18
713         18
714         18
715         18
716         18
allpairs_sig_dist2 <- allpairs_sig %>% filter(distance==2)

# Optional: write separate CSVs (and one combined)
# write.csv(L_theta_allpairs, "sig_pairs_learning_theta.csv", row.names = FALSE)
# write.csv(L_rt_allpairs,    "sig_pairs_learning_rt.csv",    row.names = FALSE)
# write.csv(T_theta_allpairs, "sig_pairs_test_theta.csv",     row.names = FALSE)
# write.csv(T_rt_allpairs,    "sig_pairs_test_rt.csv",        row.names = FALSE)
# write.csv(allpairs_sig,     "sig_pairs_ALL.csv",            row.names = FALSE)