Last updated: 2022-11-09

Checks: 7 0

Knit directory: SCHEDULING/

This reproducible R Markdown analysis was created with workflowr (version 1.7.0). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20221107) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version 67e1aac. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .Rproj.user/
    Ignored:    analysis/patch_selection.png
    Ignored:    analysis/patch_selection_8.png
    Ignored:    analysis/patch_selection_avg.png
    Ignored:    analysis/site_libs/

Untracked files:
    Untracked:  analysis/Notes.txt
    Untracked:  analysis/archive/
    Untracked:  analysis/fd_pl.rds
    Untracked:  analysis/fu_pl.rds
    Untracked:  analysis/prereg/
    Untracked:  analysis/reward rate analysis.docx
    Untracked:  analysis/rewardRate.jpg
    Untracked:  analysis/toAnalyse/
    Untracked:  analysis/wflow_code_string.txt
    Untracked:  archive/
    Untracked:  data/archive/
    Untracked:  data/create_database.sql
    Untracked:  data/dataToAnalyse/
    Untracked:  data/exp6a_typing_exponential.xlsx
    Untracked:  data/exp6b_typing_linear.xlsx
    Untracked:  data/rawdata_incEmails/
    Untracked:  data/sona data/
    Untracked:  data/summaryFiles/
    Untracked:  models/
    Untracked:  old Notes on analysis.txt
    Untracked:  presentations/
    Untracked:  references/
    Untracked:  spatial_pdist.Rdata

Unstaged changes:
    Modified:   data/README.md

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/analysis_exp3b_rdk_dynamic_delay_highlight.Rmd) and HTML (docs/analysis_exp3b_rdk_dynamic_delay_highlight.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd 67e1aac knowlabUnimelb 2022-11-09 Publish data and analysis files

Ruby Steinberg1, Ami Eidels2, and Daniel R. Little1

1 The University of Melbourne, 2 The University of Newcastle

Method

Participants

[NEED TO ADD A SUMMARY OF PARTICIPOANT INFORMATION: HOW MANY TESTED, DEMOGRAPHIC INFORMATION, HOW WERE PARTICIPANTS REIMBURSED, HOW MANY ASSIGNED TO EACH CONDITION]

Design

[NEED TO ADD A DESCRIPTION OF THE EXPERIMENTAL DESIGN]

Data Cleaning

Subjects completed the experiment by clicking a link with the uniquely generated id code. Subjects were able to use the link multiple times; further, subjects were able to exit the experiment at any time. Consequently, the datafile contains partially completed data for some subjects which needed to be identified and removed.

[NEED TO ADD A DESCRIPTION OF THE NONLEARNERS]

Data Analysis

We first summarize performance by answering the following questions:

Task completions

  • How many tasks are completed on average?

[ADD ANALYSIS DESCRIPTION]

Average number of correctly completed tasks in each condition
condition phase mean
fixed untimed 3.940217
fixed deadline 3.260949
random untimed 3.959569
random deadline 2.986595

[ADD DESCRIPTION OF ANALYSIS OF TASK COMPLETIONS]

RDK performance

We next analysed performance on the RDK discriminations. We then asked:

  • What was the average completion time and accuracy of the easy, medium, hard, and very hard tasks?

[ADD DESCRIPTION OF PLOT]

[ADD DESCRIPTION OF PLOT]

We further broke down RTs by condition, deadline, and difficulty.

Mean accuracy, RT, and RT summed across attempts for each difficulty and each phase
condition phase difficulty n Mean.Correct SE.Correct Mean.RT SE.RT Mean.crt SE.crt
fixed untimed easy 657 0.85 0.01 822.48 37.98 971.61 53.40
fixed untimed medium 519 0.79 0.02 891.70 34.45 1130.46 46.03
fixed untimed hard 464 0.70 0.02 1228.99 55.87 1762.00 87.63
fixed untimed v. hard 430 0.55 0.02 1515.19 74.21 2734.84 152.49
fixed deadline easy 1298 0.83 0.01 465.52 8.00 553.71 11.53
fixed deadline medium 1212 0.80 0.01 494.56 9.66 602.84 14.36
fixed deadline hard 1236 0.70 0.01 513.57 10.40 690.85 15.95
fixed deadline v. hard 1218 0.56 0.01 499.76 11.86 779.68 21.79
random untimed easy 726 0.79 0.02 765.15 24.28 974.58 36.37
random untimed medium 540 0.79 0.02 872.71 32.56 1100.37 43.28
random untimed hard 464 0.68 0.02 1167.30 64.40 1712.89 92.52
random untimed v. hard 470 0.50 0.02 1363.75 56.18 2690.44 121.83
random deadline easy 1406 0.77 0.01 426.38 7.36 534.63 10.78
random deadline medium 1223 0.76 0.01 462.86 8.98 591.85 14.07
random deadline hard 1170 0.67 0.01 533.75 10.70 746.89 18.79
random deadline v. hard 1136 0.55 0.01 593.29 13.23 969.95 25.14

Reward Rate

[ADD DESCRIPTION]

Optimality in each condition

  • What is the proportion of easy, medium, hard, and very hard tasks selected first, second, third or fourth? [ADD DESCRIPTION]

  • Do the marginal distributions differ from uniformity?

We tested whether the marginal distributions were different from uniformally random selection using the fact that the mean rank is distributed according to a \(\chi^2\) distribution with the following test-statistic: \[\chi^2 = \frac{12N}{k(k+1)}\sum_{j=1}^k \left(m_j - \frac{k+1}{2} \right)^2\] see (Marden, 1995).

Chi2 test of uniformity
condition phase chi2 df p
fixed untimed 61.67 3 0.00
fixed deadline 1117.99 3 0.00
random untimed 11.01 3 0.01
random deadline 52.93 3 0.00

[ADD DESCRIPTION]

We compared the location conditions and phases using chi-2 analysis.

Pearson’s chi-squared test
Comparison chi2 df p
Fixed: Untimed vs Deadline 185.47 15 0.00
Random: Untimed vs Deadline 15.05 15 0.45
Untimed: Fixed vs Random 42.97 15 0.00
Deadline: Fixed vs Random 376.88 15 0.00
  • How optimal were responses?

Selection model

We can treat each task selection as a probabilistic choice given by a Luce’s choice rule (Luce, 1959), where each task is represented by some strength, \(\nu\). The probability of selecting task \(i_j\) from set \(S = \left{i_1, i_2, ..., i_J \right}\), where J is the number of tasks, is:

\[p\left(i_j |S \right) = \frac{\nu_{i_j}}{\sum_{i \in S} \nu_{i}} \].

Plackett (1975) generalised this model to explain the distribution over a sequence of choices (i.e., ranks). In this case, after each choice, the choice set is reduce by one (i.e., sampling without replacement). This probability of observing a specific selection order, \(i_1 \succ ... \succ i_J\) is:

\[p\left(i_j |A \right) = \prod_{j=1}^J \frac{\nu_{i_j}}{\sum_{i \in A_j} \nu_{i}} \],

where \(A_j\) is the current choice set.

Sampling distribution anlaysis

In order to characterise performance, we examined three sampling distributions for comparison to our data. The first is the sampling distribution of edit distances from optimal assuming that orders are sampled uniformly at random. The second distribution assumes that the first choice was optimal but the remaining orders are sampled at random. Finally, the third distributions assumes that the first two choices are selected optimally but that the remaining are randomly selected. It is clear that the mode of the distribution moves from a distance of 3 to a distance of 0 as the sampling distribution summarises orders which better conform to optimality.

To characterise the optimality of each condition at each point in the experiment, we first computed the ks-test statistic between the data (the average partial distance data) and the random order distribution and the first-two optimal distribution. Since smaller ks-statistics indicate a closer match between the distributions, we then took the ratio of the ks-statistics (random over first two-optimal). Values less than one indicate that the data are more consistent with random than optimal responding. Values greater than one indicate that the data are more consistent with optimal rather than random responding.

This figure efficiently summarises the main result: responding is more optimal in the fixed deadline condition particularly during the last ten trials; in the random deadline conditions, responding was closer to a random sampling distribution than to an optimal sampling distribution.

Selection Choice RTs

Mean RTs for each scheduling selection
condition phase mrt_sel1 mrt_sel2 mrt_sel3 mrt_sel4
fixed untimed 1641 1412 1334 1234
fixed deadline 800 830 808 788
random untimed 1695 1337 1248 1210
random deadline 897 947 895 772
SD RTs for each scheduling selection
condition phase sd_sel1 sd_sel2 sd_sel3 sd_sel4
fixed untimed 27.331356 18.458250 16.559479 9.895521
fixed deadline 6.956076 6.061463 5.203364 4.363523
random untimed 32.260859 14.697222 10.662332 9.092194
random deadline 8.252353 7.631601 5.605028 4.199206

sessionInfo()
R version 4.1.3 (2022-03-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252   
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats4    grid      stats     graphics  grDevices utils     datasets 
[8] methods   base     

other attached packages:
 [1] pmr_1.2.5.1       jpeg_0.1-9        rstatix_0.7.0     lme4_1.1-29      
 [5] Matrix_1.4-0      png_0.1-7         reshape2_1.4.4    knitr_1.38       
 [9] hrbrthemes_0.8.0  english_1.2-6     gtools_3.9.2      DescTools_0.99.45
[13] forcats_0.5.1     stringr_1.4.0     dplyr_1.0.8       purrr_0.3.4      
[17] readr_2.1.2       tidyr_1.2.0       tibble_3.1.6      ggplot2_3.3.5    
[21] tidyverse_1.3.1   workflowr_1.7.0  

loaded via a namespace (and not attached):
 [1] minqa_1.2.4       colorspace_2.0-3  ellipsis_0.3.2    class_7.3-20     
 [5] rprojroot_2.0.3   fs_1.5.2          gld_2.6.5         rstudioapi_0.13  
 [9] proxy_0.4-27      farver_2.1.0      fansi_1.0.3       mvtnorm_1.1-3    
[13] lubridate_1.8.0   xml2_1.3.3        splines_4.1.3     extrafont_0.18   
[17] rootSolve_1.8.2.3 jsonlite_1.8.0    nloptr_2.0.0      broom_0.8.0      
[21] Rttf2pt1_1.3.10   dbplyr_2.1.1      compiler_4.1.3    httr_1.4.2       
[25] backports_1.4.1   assertthat_0.2.1  fastmap_1.1.0     cli_3.2.0        
[29] later_1.3.0       htmltools_0.5.2   tools_4.1.3       gtable_0.3.0     
[33] glue_1.6.2        lmom_2.9          Rcpp_1.0.8.3      carData_3.0-5    
[37] cellranger_1.1.0  jquerylib_0.1.4   vctrs_0.4.1       nlme_3.1-155     
[41] extrafontdb_1.0   xfun_0.30         ps_1.6.0          rvest_1.0.2      
[45] lifecycle_1.0.1   getPass_0.2-2     MASS_7.3-55       scales_1.2.0     
[49] hms_1.1.1         promises_1.2.0.1  expm_0.999-6      yaml_2.3.5       
[53] Exact_3.1         gdtools_0.2.4     sass_0.4.1        stringi_1.7.6    
[57] highr_0.9         e1071_1.7-11      boot_1.3-28       rlang_1.0.2      
[61] pkgconfig_2.0.3   systemfonts_1.0.4 evaluate_0.15     lattice_0.20-45  
[65] labeling_0.4.2    processx_3.5.3    tidyselect_1.1.2  plyr_1.8.7       
[69] magrittr_2.0.3    R6_2.5.1          generics_0.1.2    DBI_1.1.2        
[73] pillar_1.7.0      haven_2.5.0       whisker_0.4       withr_2.5.0      
[77] abind_1.4-5       modelr_0.1.8      crayon_1.5.1      car_3.0-12       
[81] utf8_1.2.2        tzdb_0.3.0        rmarkdown_2.13    readxl_1.4.0     
[85] data.table_1.14.2 callr_3.7.0       git2r_0.30.1      reprex_2.0.1     
[89] digest_0.6.29     httpuv_1.6.5      munsell_0.5.0     bslib_0.3.1