Episode 4

>>>Episode 4<<< basic_text_sequence_presentation_and_interaction

In this episode we base on script created in episode 3.
In episode 3 we created srtipt which presents letters, now we are going to add some interaction.

In this simple experiment our participants will be asked to press spacebar each time they see B letter on the screen.

Texts are the same as in episode 3
<text A>
/ items = ("A")
/ fontstyle = ("Arial", 10%, true)
</text>

<text B>
/ items = ("B")
/ fontstyle = ("Arial", 10%, true)
</text>

We want to show some feedback to participant, so we need to create additional feedback texts

<text Good>
/ items = ("Good")
/ fontstyle = ("Arial", 10%, true)
/color = (chartreuse)
</text>

<text Error>
/ items = ("Error")
/ fontstyle = ("Arial", 10%, true)
/color = (255, 85, 0)
</text>

We create two text's elements: good and error, their presentation depends on whether participant's reacion is correct or not.

<trial show_text_A>
/stimulustimes = [0=A]
/timeout = 550
/posttrialpause = 100
/validresponse = (anyresponse)
/correctresponse = (noresponse)
/errormessage = true(Error,300)
</trial>

<trial show_text_b>
/stimulustimes = [0=B]
/timeout = 550
/correctresponse = (57)
/posttrialpause = 100
/correctmessage = true(Good,300)
/errormessage = true(Error,300)
</trial>


Trials are similar to those from episode 3, but we add some attributes:

The correctresponse attribute specifies the set of responses considered correct for a given trial.
The correctmessage attribute specifies whether to display a feedback stimulus when the subject responds correctly.
The errormessage attribute specifies whether to display a feedback stimulus when the subject responds incorrectly.
The validresponse attribute specifies the set of responses considered valid for a given trial.

But wait, we want spacebar as a correct response to trial show_text_b (presenting B letters), not 57!
57 is a scancode represents spacebar, each keybord key has some representation in Inquisit language, you can check it in Tools-->Keyboard Scancodes
So, when we type 57 as a correctresponse, that means we want spacebar:)

In trial show_text_A, where we will present A, we want no participant's reaction, so a correct response is noresponse,
but, anyway, we should record whether particpants made an error and pressed some key, so that we use validresponse attribute set to anyresponse to record
the type of participants' responses.

<block block_all_a>
/trials = [1-5=show_text_b]
</block>

<block block_A_and_B>
/trials = [1-5=noreplace(show_text_b,show_text_A)]
</block>

blocks are similar to those from episode 3
<expt >
/preinstructions = (instruction)
/blocks = [1=block_all_a;2=block_A_and_B]
/postinstructions = (instruction_2)
</expt>

In expt we made some modification, mainly we used preinstruction and postinstruction attribute to add some instruction
pages before and after experiment.

To create instruction pages we can use page elements.
<page instruction>
Press spacebar each time you see B letter
</page>

<page instruction_2>
Thank you, this was simple experiment
</page>

Using page is simple, you just create page element, name it and write some text.
----------------------------------------------------------

Press green arrow to see how script works.




As you probably have noticed, after scripts' ends there is a file data.data. This file contains data from our script.

We can specify what kind of data we want to record using data elements.

<data>
/ columns = [subject,blockcode,trialcode,response,correct,latency]
/separatefiles = true
/ file = "data_from_basic_exp.iqdat"
</data>

The columns attribute specifies which kind of data to record to the data file.
Click on data element end, then press F1 --> columns to check what data columns you can record in Inquisit.

The separatefiles attribute specifies whether data collected from each participant should be saved in a separate file.
The file attribute specifies where Inquisit should record the data.




This episode completes basic Inquisit script series.
Thank you for your attention, now you know how to create basic Inquisit script ;)

In further episodes we will extend your knowledge.




Brak komentarzy:

Prześlij komentarz

Uwaga: tylko uczestnik tego bloga może przesyłać komentarze.