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_exp3a_rdk_dynamic_delay.Rmd
) and HTML
(docs/analysis_exp3a_rdk_dynamic_delay.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
We tested 97 participants (70 F, 23 M, 4 Undeclared). Participants were recruited through the Melbourne School of Psychological Sciences Research Experience Pool (Mean age = 19.17, range = 17 - 33). Participants were reimbursed with credit toward completion of a first-year psychology subject.
Fifty were assigned to the Fixed Difficulty condition. In this condition, the location of easy, medium, hard, and very hard random dot kinematograms (RDK’s) was held constant across trials.
Forty-seven were assigned to the Random Difficulty condition. In this condition, the location of easy, medium, hard, and very hard random dot kinematograms (RDK’s) were randomized from trial to trial.
The Fixed Difficulty experiment was completed before the Random Difficulty experiment. Participants only completed one of these.
In each condition, participants completed multiple trials in which they selected and completed RDK tasks. On each trial, participants were shown a set of four RDKs that were dynamically moving on the selection screen at a coherence of 80%, 50%, 20%, or 0% for the Easy, Medium, Hard, and Very Hard locations, respectively. From the set of four RDKs, participants selected and completed one RDK at a time in any order. Once selected, the direction of the RDK was randomly resampled and the unselected tasks stopped moving. On successive selections only the subtasks remaining in the set continued to move. The goal of each trial was to complete as many as possible before a deadline. If an incorrect RDK response was made, that RDK was restarted at the same coherence but with a new randomly sampled direction after a 500 msec penalty, and the participant had to respond to the RDK again. A new task could not be selected until the RDK was completed successfully.
Participants first completed 10 trials with a long (30 sec) deadline to help participants learn the task, explore strategies, and allow for comparison to a short-deadline condition. We term this the no deadline condition since the provided time is well beyond what is necessary to complete all four RDK’s. Next, participants completed 30 trials with a 6 second deadline.
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.
A handful of subjects (N = 5) had less than chance accuracy on the easiest RDK indicating equipment problems or a misunderstanding of task directions. We removed these participants from further anlaysis leaving 46 and 46 in the fixed and random location conditions, respectively.
We first summarize performance by answering the following questions:
Across both conditions, participants completed 3.93 tasks during the phase and NaN tasks during the phase.
condition | phase | mean |
---|---|---|
fixed | untimed | 3.894855 |
fixed | deadline | 3.177177 |
random | untimed | 3.956332 |
random | deadline | 3.201471 |
[ADD DESCRIPTION OF ANALYSIS OF TASK COMPLETIONS]
We next analysed performance on the RDK discriminations. We then asked:
[ADD DESCRIPTION OF PLOT]
[ADD DESCRIPTION OF PLOT]
We further broke down RTs by condition, deadline, and difficulty.
condition | phase | difficulty | n | Mean.Correct | SE.Correct | Mean.RT | SE.RT | Mean.crt | SE.crt |
---|---|---|---|---|---|---|---|---|---|
fixed | untimed | easy | 802 | 0.85 | 0.01 | 727.31 | 24.93 | 855.17 | 30.01 |
fixed | untimed | medium | 606 | 0.79 | 0.02 | 893.77 | 41.57 | 1134.00 | 54.22 |
fixed | untimed | hard | 557 | 0.72 | 0.02 | 1174.31 | 59.25 | 1635.93 | 86.14 |
fixed | untimed | v. hard | 515 | 0.54 | 0.02 | 1568.54 | 65.92 | 2885.25 | 144.05 |
fixed | deadline | easy | 1548 | 0.84 | 0.01 | 439.70 | 8.12 | 512.29 | 11.73 |
fixed | deadline | medium | 1452 | 0.80 | 0.01 | 503.17 | 9.51 | 613.88 | 13.86 |
fixed | deadline | hard | 1425 | 0.71 | 0.01 | 543.58 | 10.52 | 719.48 | 16.60 |
fixed | deadline | v. hard | 1369 | 0.59 | 0.01 | 580.98 | 11.11 | 834.28 | 21.23 |
random | untimed | easy | 878 | 0.86 | 0.01 | 774.27 | 20.01 | 905.30 | 24.27 |
random | untimed | medium | 589 | 0.85 | 0.01 | 912.73 | 33.67 | 1069.20 | 42.58 |
random | untimed | hard | 533 | 0.77 | 0.02 | 1231.94 | 45.84 | 1598.27 | 76.57 |
random | untimed | v. hard | 532 | 0.51 | 0.02 | 1718.35 | 64.96 | 3323.15 | 145.75 |
random | deadline | easy | 1902 | 0.84 | 0.01 | 461.53 | 5.62 | 537.47 | 6.92 |
random | deadline | medium | 1531 | 0.83 | 0.01 | 484.40 | 6.57 | 572.08 | 9.14 |
random | deadline | hard | 1357 | 0.69 | 0.01 | 585.52 | 9.19 | 805.42 | 16.69 |
random | deadline | v. hard | 1373 | 0.53 | 0.01 | 649.50 | 10.40 | 1090.33 | 22.82 |
[ADD DESCRIPTION]
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).
condition | phase | chi2 | df | p |
---|---|---|---|---|
fixed | untimed | 20.13 | 3 | 0.00 |
fixed | deadline | 988.81 | 3 | 0.00 |
random | untimed | 1.85 | 3 | 0.22 |
random | deadline | 80.09 | 3 | 0.00 |
[ADD DESCRIPTION]
We compared the location conditions and phases using chi-2 analysis.
Comparison | chi2 | df | p |
---|---|---|---|
Fixed: Untimed vs Deadline | 270.17 | 15 | 0.00 |
Random: Untimed vs Deadline | 30.90 | 15 | 0.01 |
Untimed: Fixed vs Random | 86.08 | 15 | 0.00 |
Deadline: Fixed vs Random | 442.80 | 15 | 0.00 |
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.
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.
condition | phase | mrt_sel1 | mrt_sel2 | mrt_sel3 | mrt_sel4 |
---|---|---|---|---|---|
fixed | untimed | 1580 | 1446 | 1355 | 1307 |
fixed | deadline | 786 | 794 | 782 | 754 |
random | untimed | 1442 | 1267 | 1269 | 1216 |
random | deadline | 792 | 793 | 740 | 678 |
condition | phase | sd_sel1 | sd_sel2 | sd_sel3 | sd_sel4 |
---|---|---|---|---|---|
fixed | untimed | 19.451724 | 14.869030 | 17.077954 | 15.709740 |
fixed | deadline | 6.923495 | 6.428960 | 4.978323 | 4.450818 |
random | untimed | 24.397078 | 12.561198 | 16.962563 | 15.429503 |
random | deadline | 7.418030 | 5.950909 | 4.747539 | 3.511201 |
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