Go/No-Go Task Programming (David McFarlane?)

1,807 views
Skip to first unread message

gugs

unread,
Dec 4, 2012, 8:55:23 PM12/4/12
to e-p...@googlegroups.com
Hi All,
I posted a query on the e-prime discussion forum last week but haven't had any replies yet.  The main issue I am having in programming a go/no-go task is that the acc column is incorrectly returning a 0 when the answer is correct (but only for cases where an individual should not be responding to the stimulus).

I have posted the detail here: https://www.pstnet.com/forum/Topic6489-23-1.aspx, but I will post them here as well in case someone has an idea of how to correct this.  David - I know you are generally answered a lot of go/no-go extended input type queries so I was hoping you might know.

===============

The task is fairly simple - an either emotive (i.e. happy, sad) or neutral word will appear on the screen for 300 ms, followed by a blank screen for 1200 seconds (for a total of 1500 ms). The participant needs to press the letter g if the word is neutral or do nothing if the word is emotive. Pressing the key should log a response time, but should not end the stimulus event (i.e. the stimulus+blank screen will always run for 1500 ms even if the participant responds within the first 300 ms). The participant can respond anytime throughout that 1500 msec. I understand this is called "extended input" - which I have accounted for by making the time limit>duration.

My biggest problem that I noticed is that my RESP Acc is coming back as 0 when the correct action is to do nothing, and the person has not pressed any key. Do you know why this is?

I have uploaded a simple example file showing just 4 practice trials. If someone who is experienced could take a look at it it would be much appreciated - I am all alone in my department working with e-prime and there is noone to really talk to here


===================

P.S. I tried to attach the file here but it was giving me issues...

Many thanks again!

Anne-Wil

unread,
Dec 5, 2012, 5:07:44 AM12/5/12
to e-p...@googlegroups.com
Hi Gugs,

a quick first thought: did you indicate the correct response to be "" (e.g. nothing between " 's) for the trials in which 'nothing' is the correct response?

David McFarlane

unread,
Dec 5, 2012, 9:03:21 AM12/5/12
to e-p...@googlegroups.com
Before going any further, please see
http://www.pstnet.com/support/kb.asp?TopicID=1340 and
http://www.pstnet.com/support/kb.asp?TopicID=5370 .

-----
David McFarlane
E-Prime training online:
http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (twitter.com/EPrimeMaster)

/-----------
Stock reminder: 1) I do not work for PST. 2) PST's trained staff take
any and all questions at
http://support.pstnet.com/e%2Dprime/support/login.asp , and they strive
to respond to all requests in 24-48 hours, so make full use of it. 3)
In addition, PST offers several instructional videos on their YouTube
channel (http://www.youtube.com/user/PSTNET ). 4) If you do get an
answer from PST staff, please extend the courtesy of posting their reply
back here for the sake of others.
\-----------


Anne-Wil wrote:
> Hi Gugs,
>
> a quick first thought: did you indicate the correct response to be ""
> (e.g. nothing between " 's) for the trials in which 'nothing' is the
> correct response?
>
> On Wednesday, 5 December 2012 02:55:23 UTC+1, gugs wrote:
>
> Hi All,
> I posted a query on the e-prime discussion forum last week but
> haven't had any replies yet. The main issue I am having in
> programming a go/no-go task is that the acc column is incorrectly
> returning a 0 when the answer is correct (but only for cases where
> an individual should not be responding to the stimulus).
>
> I have posted the detail here:
> https://www.pstnet.com/forum/Topic6489-23-1.aspx
> <https://www.pstnet.com/forum/Topic6489-23-1.aspx>, but I will post
> them here as well in case someone has an idea of how to correct
> this. David - I know you are generally answered a lot of go/no-go
> extended input type queries so I was hoping you might know.
>
> ===============
>
> The task is fairly simple - an either emotive (i.e. happy, sad) or
> neutral word will appear on the screen for 300 ms, followed by a
> blank screen for 1200 seconds (for a total of 1500 ms). The
> participant needs to press the letter g if the word is neutral or do
> nothing if the word is emotive. Pressing the key should log a
> response time, but should not end the stimulus event (i.e. the
> stimulus+blank screen will always run for 1500 ms even if the
> participant responds within the first 300 ms). The participant can
> respond anytime throughout that 1500 msec. I understand this is
> called "extended input" - which I have accounted for by making the
> time limit>duration.
>
> My biggest problem that I noticed is that my RESP Acc is coming back
> as 0 when the correct action is to do nothing, and the person has
> not pressed any key. Do you know why this is?
>
> I have uploaded a simple example file showing just 4 practice
> trials. If someone who is experienced could take a look at it it
> would be much appreciated - I am all alone in my department working
> with e-prime and there is noone to really talk to here [Ermm]

gugs

unread,
Dec 6, 2012, 11:19:06 PM12/6/12
to e-p...@googlegroups.com
Hi David

I actually did put a CorrAnswer tribute in the Trial List.  I dont think the second topic applies to me because the length of the trial does not change based on the response - i.e. I simply want to log the accuracy and speed of the response - the stimulus will stay on the screen even if they responded in the stimulus period (and not the wait period). 

With regards to the trial list - is an empty cell = blank or does it have to have "" inside it? From the EPrime knowledge base it looks like it should be blank but from Anne-Wil's response it looks like it should have "" inside it.

Regards.

Anne-Wil

unread,
Dec 7, 2012, 5:42:11 AM12/7/12
to e-p...@googlegroups.com
Hey Gugs,

Turns out that I was mistaken - the "" thing is needed when you fetch a response with in inline (get slide1.acc and then compare it to some corranswer attribute). However... I did a little bit of fiddling around with your program (from the PST boards) and neither method seems to work within your set-up. Personally I am totally at a loss why that is, I have used both methods often in the past :/ . Maybe it has something to do with that extended response period (I never used that and noticed that there was some 'new to me' setting applied to the keyboard input on the second textdisplay? (I always slides rather than textdisplays but I cannot imagine that that would be the problem here). Maybe David could shed some light on it - or perhaps you should rebuild the thing from scratch.... every now and then that helps without it ever becoming clear what went wrong in the first version >.>

David McFarlane

unread,
Dec 7, 2012, 11:22:10 AM12/7/12
to e-p...@googlegroups.com
An empty cell = blank, empty, void, nothing, nada, null, nil; it does
not, and must not, have a string of double quotes ("") inside it,
otherwise it would be looking for a string consisting of two double quotes.

But based on Anne's response, it seems something more is going on
here. Hmm, you say you are using extended input, with Time Limit >
Duration. How much greater? Did you by any chance set Time Limit to
(infinite)? That will surely fail for a Go/No-Go situation. Or, do
you have Time Limit extending through the end of the Procedure, but
then have some PreRelease on the final object of the Procedure? This
will also cause trouble (which has been ameliorated in EP2.0.10.242
with the new Procedure.ProcessPendingInputMasks feature, see
http://www.pstnet.com/support/kb.asp?TopicID=5178 ).

Here's the deal: In order for automatic scoring of a non-response to
work, your input mask must time-out before you need the score, until
then .ACC remains at its default value of 0. In particular, the
input mask must reach its Time Limit before the end of the Procedure
in order for the correct ACC to be logged (in addition, the input
mask must reach its Time Limit before any object, such as a
FeedbackDisplay, needs to use the ACC score).

So here are your choices:

1) Set the Time Limit so that the input mask ends before the end of
the Procedure (or before the StartTime of any object that depends on
the ACC (beware of PreRelease effects!)).


2) Add inline code such as the following at the end of the Procedure
(or before any object that depends on the ACC) (assuming your
stimulus is called StimText):

StimText.InputMasks.Timeout

This will force the input masks to time-out and perform their
automatic ACC scoring (see the InputMaskManager.Timeout topic in the
E-Basic Help facility).


3) Do without the automatic ACC scoring, and instead do it explicitly
in inline code at the end of the Procedure (or before any object that
depends on the ACC):

' .ACC = 0 by default, need only test for correct response:
If (StimText.RTTime = 0) Then StimText.ACC = 1

or if you prefer

StimText.ACC = Iif( StimText.RTTime, 0, 1 )


If you do (2) or (3), you might also have to add

c.SetAttrib "StimText.ACC", StimText.ACC

in order to make sure that the response ACC gets logged.


You should try all three of these as an exercise and form your own
opinion on the pros & cons of each.


Footnote: You may use any of the following to test for presence of a
response (and simply invert the logic to test for absence of response):

1) If (x.RESP <> "") ...
2) If (Len(x.RESP) > 0) ...
or more succinctly, If Len(x.RESP) ...
3) If (x.RTTime <> 0) ...
or more succinctly, If (x.RTTime) ...
4) If (x.InputMasks(1).Count > 0) ...,
or more succinctly, If x.InputMasks(1).Count ...
(note this works only for the specified input mask)

You may also get away with
5) If (x.RT <> 0) ...
or more succinctly, If (x.RT) ...
but this form poses a subtle and extremely unlikely failure mode in
that if a response arrives at exactly .OnsetTime then RT = RTTime -
OnsetTime = 0, so it would score a response as a non-response.

Form (1) is strictly speaking probably the most correct form, but for
arcane reasons of efficiency I prefer integer comparisons over string
comparisons so I favor form (3).

-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)
><http://www.pstnet.com/support/kb.asp?TopicID=1340>http://www.pstnet.com/support/kb.asp?TopicID=1340
>and
><http://www.pstnet.com/support/kb.asp?TopicID=5370>http://www.pstnet.com/support/kb.asp?TopicID=5370
>.
>-----
>David McFarlane
>E-Prime training online:
><http://psychology.msu.edu/Workshops_Courses/eprime.aspx>http://psychology.msu.edu/Workshops_Courses/eprime.aspx
>
>Twitter: @EPrimeMaster
>(<http://twitter.com/EPrimeMaster>twitter.com/EPrimeMaster)
>/-----------
>Stock reminder: 1) I do not work for PST. 2) PST's trained staff take
>any and all questions at
><http://support.pstnet.com/e%2Dprime/support/login.asp>http://support.pstnet.com/e%2Dprime/support/login.asp
>, and they strive
>to respond to all requests in 24-48 hours, so make full use of it. 3)
>In addition, PST offers several instructional videos on their YouTube
>channel
>(<http://www.youtube.com/user/PSTNET>http://www.youtube.com/user/PSTNET

gugs

unread,
Dec 13, 2012, 10:16:14 PM12/13/12
to e-p...@googlegroups.com
Thanks. I lost my computer to repairs this week but as soon as I get it back I will try these suggestions. I'll let you know how it goes.

Many thanks.

gugs

unread,
Dec 13, 2012, 10:22:59 PM12/13/12
to e-p...@googlegroups.com
Hi David

The stimulus appears on the screen for 300 ms, followed by a blank screen for 1200 seconds (for a total of 1500 ms).

Therefore the settings are as follows:

1. stimulus screen has the correct properties timing mode (cumulative), data logging (standard), duration (300), Time Limit (1200), End Action (none)
2.stimuluswait screen has the correct properties timing mode (cumulative), data logging (time audit only), duration (1200)

I want the stimulus and blank screens to remain standard across the task regardless of whether the participant has responded or not.  The next stimulus should begin after the 1200 ms blank screen without user intervention.

Regards.

David McFarlane

unread,
Dec 14, 2012, 10:19:03 AM12/14/12
to e-p...@googlegroups.com
PreRelease?
Message has been deleted

gugs

unread,
Feb 5, 2013, 9:43:41 PM2/5/13
to e-p...@googlegroups.com
Hi David

I have been looking for training options regarding EPrime and realised that you have put together an online course. Since i am familiar with the basic structure/workings of Eprime, does the course cover critical timing, use of cumulative/event timing and so on?

Ahuva

David McFarlane

unread,
Feb 6, 2013, 5:25:09 PM2/6/13
to e-p...@googlegroups.com
Gugs,

Yes, the course does cover the essentials of critical timing,
including use of cumulative/event timing, etc. Whether you take the
course or not, you should also look at the "Critical Timing" chapter
in the E-Prime User's Guide (chapter 3 in the first edition, ch. 4 (&
severely abbreviated) in the new edition).

Although you are already familiar with the basic structure/workings
of E-Prime, you may also find that the course fills in some details,
and "best practices". I will send you separately a .pdf of the
course syllabus.

If you have any more questions, please contact me privately, using
the address you find for me on Google Groups, or the address you may
find by following the course link below.

Thank you.

-----
David McFarlane
E-Prime training
online: http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)


Reply all
Reply to author
Forward
0 new messages