Sending event markers for correct and incorrect responses


Author
Message
emily_ahne
emily_ahne
Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)Associate Member (146 reputation)
Group: Forum Members
Posts: 10, Visits: 784
I am running an experiment using the Color Word Stroop with Keyboard Responding from the Inquisit library (https://www.millisecond.com/download/library/stroop). Because I am also collecting simultaneous EEG recordings, I have set up stimulus event markers to identify trial-type onset using the port attribute (see highlighted portion below for an example of a congruent trial). I also need to have event markers sent via a port attribute that differentiates correct and incorrect responses (the EEG analyzing software identifies incorrect events via markers not trial numbers). The raw data already outputs these values based on each trial (e.g., trial 1 = correct, trial 2 = incorrect, so on), however, I need these to be identified in the EEG data via incorrect response event markers. How would I go about sending incorrect response event markers? Thank you. 
An example trial is included below:

<trial redcongruent>
/ontrialbegin = [
    values.congruency = 1;
]
/ pretrialpause = 400
/ stimulustimes = [0=redcongruent, redreminder, greenreminder, bluereminder, blackreminder, congruent_trial_onset]
/ correctresponse = (parameters.keyred)
/ validresponse = (parameters.keyred, parameters.keygreen, parameters.keyblue, parameters.keyblack)
/ errormessage = true(x, 400)
/ontrialend = [
    if (trial.redcongruent.responsetext == "D"){
        values.responseCategory = "red";
    } else if (trial.redcongruent.responsetext == "F"){
        values.responseCategory = "green";
    } else if (trial.redcongruent.responsetext == "J"){
        values.responseCategory = "blue";
    } else if (trial.redcongruent.responsetext == "K"){
        values.responseCategory = "black";
    };    

    //summary data:
    
    list.responses.appenditem(trial.redcongruent.correct);
    list.responses_congruent.appenditem(trial.redcongruent.correct);

    if (trial.redcongruent.correct) {
        list.latencies.appenditem(trial.redcongruent.latency);
        list.latencies_congruent.appenditem(trial.redcongruent.latency);
    }
]
</trial>
...
# s 1 congruent trial onset marker
<port congruent_trial_onset>
/ port = LPT
/ subport = data
/ items = ("00000001")
</port>
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
emily_ahne - 4 Months Ago
Dave - 4 Months Ago
emily_ahne - 4 Months Ago
Dave - 4 Months Ago
emily_ahne - 4 Months Ago
                         I also tried using the keys for the corresponding color (below) and...
emily_ahne - 4 Months Ago
                             You have the order of arguments in /responsemessage wrong....
Dave - 4 Months Ago
                                 THANK YOU! This resolved the issue and the markers are being captured...
emily_ahne - 4 Months Ago
                                     Glad to hear you're up and running!
Dave - 4 Months Ago

Reading This Topic

Explore
Messages
Mentions
Search