Skip to content

Commit

Permalink
Update data_variables.md
Browse files Browse the repository at this point in the history
added context for data variable "correct" field
  • Loading branch information
musslick authored Nov 26, 2024
1 parent 62b7aef commit ba87383
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/User Guide/data_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ f_key = DerivedLevel("f", is_correct_f, [color])
correct_key = DerivedParameter("correct", [j_key, f_key])
```

Now we can create a `DataVariable` that determines whether the participant pressed the correct key. The `1` in the
declaration indicates from which stimulus to get the variable (1 = previous, 2 = second previous, etc.).
Now we can create a `DataVariable` that determines whether the participant pressed the correct key, specified by the ``correct`` keyword. This keyword indicates a special data point which can be accessed in stimuli that have the correct_key parameter. A comprehensive list of data points that can be accessed will be made available in the documentation (It is mainly the data that gets stored via jsPsych.

The `1` in the declaration below indicates from which stimulus to get the variable (1 = previous, 2 = second previous, etc.).

```python
correct = DataVariable("correct", [True, False])
Expand Down

0 comments on commit ba87383

Please sign in to comment.