Hi everyone,
I am trying
to expand the source code for the IOWA-Gambling task available at the Inquisit
website. In this version the loss-values are selected randomly as follows:
<expressions>
/ getlossdeck1
= noreplace(0, 0, 0, 0, 0, 150, 200, 250, 300, 350)
</expressions>
By contrast,
I want to define a fixed sequence of loss values for loss values for each trail.
I want to choose the current value depending on how many cards were already
taken from the deck. Speaking more technically - I want to get the nth element
out of an array, vector or list with numerical values.
Therefore I
am trying to define something like a list or a vector with loss values (integer
values) for each trail.
/ loss_deck1
= (0, 0, 0, 0, 0, 150, 200, 250, 300, 350)
Since that
did not work I have defined a counter
<counter
deck1_loss>
/ items = (0,
0, 0, 0, 0, 150, 200, 250, 300, 350)
/ select = sequence(1-10)
</counter>
Additionally,
I have introduced a variable "values.cards_deck1" that counts how
often deck1 was chosen. This counter is updated in each trial.
In the last
step I try to define the loss value for the current trial as:
/ getlossdeck1
= getitem(counter.deck1_loss.items, values.cards_deck1)
But each
time I get the error message "Expression is not valid. Item not found".
Does
someone have an idea whether it is possible to create a list or vector with
numerical values & get back a specific element out of this list?
Thanks a
lot for your help in advance.
Best regards,
Olga Kunina