Parameters comparisons using bootstrap

You need to specify that would like to perform paircomparisons (in older versions of quickpsy the comparisons are performed by default)

library(quickpsy)

fit <- quickpsy(qpdat, phase, resp, grouping = c("participant", "cond"),
                paircomparisons = TRUE, 
                B = 30) 

plot(fit, color = cond)

All the possible pair comparisons across parameters are include in the output data frame par_dif. If, for example, we want to compare the parameters across conditions for each participant we need the following subset of the data frame

library(dplyr)

fit$par_dif %>% filter(participant == participant2)
#> # A tibble: 6 x 11
#> # Groups:   parn [2]
#>   parn  participant cond    par participant2 cond2   par2   dif  difinf difsup
#>   <chr> <chr>       <chr> <dbl> <chr>        <chr>  <dbl> <dbl>   <dbl>  <dbl>
#> 1 p1    Participan… cond1 -70.2 Participant1 cond2 -121.  50.8   29.3     70.3
#> 2 p1    Participan… cond1 -92.5 Participant2 cond2 -130.  37.7    6.08    58.3
#> 3 p1    Participan… cond1 -81.4 Participant3 cond2 -125.  43.2   19.3     68.2
#> 4 p2    Participan… cond1  78.5 Participant1 cond2   61.7 16.8   -0.783   32.8
#> 5 p2    Participan… cond1  67.2 Participant2 cond2   66.1  1.04 -20.4     22.3
#> 6 p2    Participan… cond1  69.2 Participant3 cond2   78.9 -9.65 -35.9     12.9
#> # … with 1 more variable: signif <chr>

dif corresponds to the difference in parameters. difinfand difsup correspond to the limits of the bootstrap confidence intervals (default 95%). Confidence intervals that do not include the zero suggests than the parameters differ. In this case p1 (the parameter of location) seems to differs across conditions for all participants. p2 only seems to differ across conditions for Participant 1.

To reduce computation time, we only included 30 bootstrap samples, but you will need to include much more.

Threholds comparisons using bootstrap

The bootstrap differences across thresholds are included in thresholds_dif

fit$thresholds_dif %>% filter(participant == participant2)
#> # A tibble: 3 x 10
#>   participant  cond   thre participant2 cond2 thre2   dif difinf difsup signif
#>   <chr>        <chr> <dbl> <chr>        <chr> <dbl> <dbl>  <dbl>  <dbl> <chr> 
#> 1 Participant1 cond1 -70.2 Participant1 cond2 -121.  50.8  29.3    70.3 *     
#> 2 Participant2 cond1 -92.5 Participant2 cond2 -130.  37.7   6.08   58.3 *     
#> 3 Participant3 cond1 -81.4 Participant3 cond2 -125.  43.2  19.3    68.2 *