Probe in two directions


Author
Message
AKever
AKever
New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Hi, 
I am new on millisecond and have to create an experiment which is similar (but not quite the same) to the AlcoholDotProbe experiment. 
In fact, the main differences are that in my experiment the probe is not on the left and on the right, but on the top and on the bottom of the screen and that the probe is an arrow which points left and right. The participant has to chose between 'M' for the right arrow and 'Z' for the left arrow, independently from the position (up or down). The probe replaces always one of two words (top and bottom of the screen) and we want to see how the reaction time varies in function of the type of word the probe replaces. So the direction in which the arrow points, and with this the decision of 'M' or 'Z' key defines only the accuracy/correctness of the response.
My problem at this point is that I don't manage to incorporate the direction decision into the right/wrong character of the response. 
Attached, you can find the project.
Anne
Attachments
albs_October2021.iqx (113 views, 47.00 KB)
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
AKever - 10/22/2021
Hi, 
I am new on millisecond and have to create an experiment which is similar (but not quite the same) to the AlcoholDotProbe experiment. 
In fact, the main differences are that in my experiment the probe is not on the left and on the right, but on the top and on the bottom of the screen and that the probe is an arrow which points left and right. The participant has to chose between 'M' for the right arrow and 'Z' for the left arrow, independently from the position (up or down). The probe replaces always one of two words (top and bottom of the screen) and we want to see how the reaction time varies in function of the type of word the probe replaces. So the direction in which the arrow points, and with this the decision of 'M' or 'Z' key defines only the accuracy/correctness of the response.
My problem at this point is that I don't manage to incorporate the direction decision into the right/wrong character of the response. 
Attached, you can find the project.
Anne

You should at a minimum explain what you have done and name the relevant elements exactly as they are called in the script.

For one, it is not clear to me at all why your /iscorrectresponse logic is based on the probe postiion (up or down), when you say that this factor should be irrelevant and instead probe oritentation is supposed to be the only relevant factor.

/ iscorrectresponse = [
    return ((values.probe_y == parameters.target_down_y && trial.Practice.responsetext == parameters.responsekey_right_down) ||
            (values.probe_y == parameters.target_down_y && trial.Practice.responsetext == parameters.responsekey_left_down) ||
            (values.probe_y == parameters.target_up_y && trial.Practice.responsetext == parameters.responsekey_right_up) ||
            (values.probe_y == parameters.target_up_y && trial.Practice.responsetext == parameters.responsekey_left_up));
]

So please explain.
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
Dave - 10/22/2021
AKever - 10/22/2021
Hi, 
I am new on millisecond and have to create an experiment which is similar (but not quite the same) to the AlcoholDotProbe experiment. 
In fact, the main differences are that in my experiment the probe is not on the left and on the right, but on the top and on the bottom of the screen and that the probe is an arrow which points left and right. The participant has to chose between 'M' for the right arrow and 'Z' for the left arrow, independently from the position (up or down). The probe replaces always one of two words (top and bottom of the screen) and we want to see how the reaction time varies in function of the type of word the probe replaces. So the direction in which the arrow points, and with this the decision of 'M' or 'Z' key defines only the accuracy/correctness of the response.
My problem at this point is that I don't manage to incorporate the direction decision into the right/wrong character of the response. 
Attached, you can find the project.
Anne

You should at a minimum explain what you have done and name the relevant elements exactly as they are called in the script.

For one, it is not clear to me at all why your /iscorrectresponse logic is based on the probe postiion (up or down), when you say that this factor should be irrelevant and instead probe oritentation is supposed to be the only relevant factor.

/ iscorrectresponse = [
    return ((values.probe_y == parameters.target_down_y && trial.Practice.responsetext == parameters.responsekey_right_down) ||
            (values.probe_y == parameters.target_down_y && trial.Practice.responsetext == parameters.responsekey_left_down) ||
            (values.probe_y == parameters.target_up_y && trial.Practice.responsetext == parameters.responsekey_right_up) ||
            (values.probe_y == parameters.target_up_y && trial.Practice.responsetext == parameters.responsekey_left_up));
]

So please explain.

First off, if all that matters is probe orientation (arrow pointing right vs left), then having four responsekey parameters is unnecessary and redundant.



All you need is two responsekey parameters. One for right-pointing arrow, one for left-pointing arrow.
/ responsekey_left = "Z"
/ responsekey_right = "M"


Second, the way you have set this up, the first item in the <text probe> element is the right-pointing arrwo (correct response: M), the second item is the left-pointing arrow (correct response: Z).

<text probe>
/ items = probe_l_r
/ vposition = values.probe_y
/ hposition = parameters.target_x
/ txcolor = white
/ fontstyle = ("Arial", parameters.probe_height, false, false, false, false, 5, 1)
/ erase = false
/ vjustify = center
</text>

<item probe_l_r>
/ 1 = "-->"
/ 2 = "<--"
</item>


Thus, all of this simply boils down to:


<trial Practice>
/ ontrialbegin = [
    values.category = "Practice";
    values.target_position = list.PracticeTarget_positions.nextvalue;
    values.congruence = list.PracticeTargetprobe_congruence.nextvalue;
    if (values.target_position == 1) {
        values.target_y = parameters.target_down_y;
        values.comp_y = parameters.target_up_y;
    } else {
        values.target_y = parameters.target_up_y;
        values.comp_y = parameters.target_down_y;
    };
    if (values.congruence == 1) {
        values.probe_y = values.target_y;
    } else {
        values.probe_y = values.comp_y;
    };
    trial.Practice.insertstimulustime(shape.eraser, parameters.fixationduration);
    trial.Practice.insertstimulustime(text.PracticeTarget, parameters.fixationduration);
    trial.Practice.insertstimulustime(text.PracticeNeutral, parameters.fixationduration);
    trial.Practice.insertstimulustime(shape.eraser, (parameters.fixationduration + parameters.targetduration));
    trial.Practice.insertstimulustime(text.probe, (parameters.fixationduration + parameters.targetduration + parameters.TP_ISI));    
]

/ stimulusframes = [1 = fixation]
/ beginresponsetime = parameters.fixationduration + parameters.targetduration + parameters.TP_ISI
/ responseinterrupt = immediate
/ validresponse = (parameters.responsekey_right, parameters.responsekey_left)
/ iscorrectresponse = [
    (text.probe.currentitemnumber == 1 && trial.practice.responsetext == parameters.responsekey_right) ||
    (text.probe.currentitemnumber == 2 && trial.practice.responsetext == parameters.responsekey_left)
]

/ ontrialend = [
    values.target_word = text.PracticeTarget.currentitem;
    values.comp_word = text.PracticeNeutral.currentitem;
    trial.Practice.resetstimulusframes();
]
/ timeout = (parameters.fixationduration + parameters.targetduration + parameters.tp_isi + parameters.probeduration)
/ posttrialpause = parameters.iti
</trial>

AKever
AKever
New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)New Member (22 reputation)
Group: Forum Members
Posts: 2, Visits: 7
Thanks a lot Dave! It worked perfectly. 
Unfortunately I still have one other issue... at this point the results coming out classify all answers as "valid" (always 1 in the "valid" column), even if you don't reply at all (or press another key than M or Z). 
In the code I define that 
/ validresponse = (parameters.responsekey_right,parameters.responsekey_left)
so I don't really know where I have to adjust the code to resolve this issue. 
I attach the code again as well as one of the result files (when latency is 2500 I did't respond at all).

Attachments
Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 12K, Visits: 98K
AKever - 10/24/2021
Thanks a lot Dave! It worked perfectly. 
Unfortunately I still have one other issue... at this point the results coming out classify all answers as "valid" (always 1 in the "valid" column), even if you don't reply at all (or press another key than M or Z). 
In the code I define that 
/ validresponse = (parameters.responsekey_right,parameters.responsekey_left)
so I don't really know where I have to adjust the code to resolve this issue. 
I attach the code again as well as one of the result files (when latency is 2500 I did't respond at all).

I've run the script, and it does not accept responses other than M, Z, and no response. When a trial has a timeout, it obviously needs to accept no response as an answer. That is perfectly normal and expected. The deterimnations in the valid column are based on latency. If you want to exclude no-response trials from that, you need to adjust the logic accordingly. I.e. something like

   if (trial.MS.response != 0 && trial.MS.latency >= parameters.minimum_latency){
        values.valid = 1;
        if (trial.MS.correct) {
            values.validcorrect = 1;
            if (values.congruence == 1) {
                list.latencies_MS_C.appenditem(trial.MS.latency);
                list.latencies.appenditem(trial.MS.latency);
            } else {
                list.latencies_MS_IC.appenditem(trial.MS.latency);
                list.latencies.appenditem(trial.MS.latency);
            };
        };        
    };



Edited 3 Years Ago by Dave
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search