# pedlr-derivatives

Derivative data for the pedlr project by Christoph Koch, Ondrej Zika, Rasmus Bruckner, and Nicolas W. Schuck.
This data set contains all downstream data files that originated from the analysis of the pedlr source dataset (https://doi.org/10.12751/g-node.9gm3lt) using the referenced analysis repository (https://doi.org/10.5281/zenodo.10211239) and described in *Koch, C., Zika, O., Bruckner, R., & Schuck, N. W. Influence of surprise on reinforcement learning in younger and older adults. (https://doi.org/10.31234/osf.io/unx5y)*.
The derivatives include all results that were reported in the cited pre-print.

For a description of the repositories structure see a commented folder structure below.

## Datalad

This is a datalad repository.
For more information on how to use and set up datalad on your machine please see https://www.datalad.org/.

A thorough walkthrough on how to use datalad is given by the [datalad handbook](https://handbook.datalad.org/en/latest/).
See the [installation page in the datalad handbook](https://handbook.datalad.org/en/latest/intro/installation.html) for more information about setup and configuration of datalad.

## Usage

Once you have datalad installed on your machine you can clone the dataset (e.g. via https) using

```
datalad clone https://gin.g-node.org/koch_means_cook/pedlr-derivatives.git
```

For in integrated usage with the analysis described in the referenced preprint *(Koch, C., Zika, O., Bruckner, R., & Schuck, N. W. Influence of surprise on reinforcement learning in younger and older adults. https://doi.org/10.31234/osf.io/unx5y)* clone the Github code repository (doi:10.5281/zenodo.10211239), then clone this datalad repository into the code repository and rename the datalad repository folder to `derivatives`.
This will allow the analysis scripts to directly use this dataset.

Large files will not be downloaded automatically.
To get them, you can use 

```
datalad get <filename>
```

Large files that have been downloaded will be 'locked' and therefore read-only.
If you wish to write you will need to unlock them using

```
datalad unlock <filename>
```

For more information on locked/unlocked files see [here](https://handbook.datalad.org/en/latest/basics/101-114-txt2git.html).


## Data set structure

```
├── LICENSE   # License file (CC BY-SA 4.0)
├── README.md # This file
├── analysis  # Dir containing .html files of analysis notebooks
│   ├── data_quality.html   # Data quality assessment
│   ├── demographic.html    # Demographics summary
│   ├── results_01.html     # Main results (behavior)
│   ├── results_02.html     # Main results (modeling)
│   └── (...)
├── figures                 # Dir holding figures .pdf and data
│   └── (...)
├── model_fitting           # Dir holding data for model fitting
│   ├── fit-09RI1ZH_sv-random.tsv   # Example file: fit of all models to choice data (random starting-values)
│   ├── (...)
│   ├── modeldata-09RI1ZH_sv-random.tsv   # Example file: Model choice proabability for each trial (random starting-values)
│   └── (...)
├── parameter_recovery      # Dir holding analysis and data of model and parameter recovery
│   ├── analysis_model_recov.html  # Results model recovery
│   ├── analysis_param_recov.html  # Results parameter recovery
│   ├── modelrecov_base-09RI1ZH_model-rw_randips-TRUE_randbetas-FALSE_randsvs-TRUE_principle-TRUE.tsv # Example file: Fit of all models on data simulated by specified model (random parameters, fixed regression betas, random starting-values)
│   ├── (...)
│   ├── paramrecov_base-09RI1ZH_model-rw_randips-TRUE_randbetas-FALSE_randsvs-TRUE_principle-TRUE.tsv # Example file: Parameter recovery of all models on data simulated by specified model (random parameters, fixed regression betas, random starting-values)
│   ├── (...)
│   ├── recovdata_base-09RI1ZH_model-rw_randips-TRUE_randbetas-FALSE_randsvs-TRUE_principle-TRUE.tsv # Example file: Trialwise information on recovery (random parameters, fixed regression betas, random starting-values)
│   └── (...)
├── posterior_pred_checks             # Dir holding analysis and data of posterior predictive checks
│   ├── analysis_posterior_pred_checks.html    # Analysis notbook of post. pred. checks
│   ├── postpred-09RI1ZH_model-rw.tsv          # Data for post. pred. check for specified model
│   ├── (...)
│   ├── windowrizepred-09RI1ZH.tsv   # Data for post. pred. check (influence of surprise) for spec. model
│   └── (...)
└── simulation
    └── (...)

```
