Generating a performance summary at task completion?

liwenna liwenna at gmail.com
Mon Aug 10 12:32:34 UTC 2009


After testing in e-prime I have a number of additions to make. I sent
a corrected .es2 file to Morgan but for everyone else who (in the
future) references this thread I post the changes here too:

There are quite a number of typo's in the variable names I wrote... I
didn't keep a list of them, but anyone trying this script will
encounter them and I excuse for that in advance.. ;)

Then:
The inline that calculates the final stats also has a number of lines
that are supposed to write these stats to the edat file... but it
turns out that e-prime won't do that if there is no proc and/or list
connected to the inline. The solution is simple: add a (one level, no
additional attributes) feedbacklist at the end of the experiment,
connected to a feedbackproc and on this procedure place the
feedbackslide and the inline that does the calculations. For
convenience I added another z to these attributenames to keep things
organised more or less neatly in your edatfile. The final calculations
will be shown in the last level of the edatfile.
Additionally the c.setattrib "zztrialcounter", trialcounter should
also be added to this last inline. Lastly I forgot to add 'x 100' to
the calculations of the % trials correct, incorrect and omitted...

New second inline is as follows:

=================
finalpercentcorrect = correctcounter / trialcounter * 100
finalpercenterror = errorcounter / trialcounter * 100
finalpercentomitted = omittedcounter / trialcounter * 100
meancorrectrt = rtcorrectcounter / correctcounter
meanerrorrt = rterrorcounter / errorcounter

c.setattrib "zztrialcounter", trialcounter
c.setattrib "zzfinalpercentcorrect", finalpercentcorrect
c.setattrib "zzfinalpercenterror", finalpercenterror
c.setattrib "zzfinalpercentomitted", finalpercentomitted
c.setattrib "zzmeancorrectrt", meancorrectrt
c.setattrib "zzmeanerrorrt", meanerrorrt
===================

with of course the feedbacktext also being adjusted to:
===================
You've finished [zztrialcounter] trials and of these trials you've
answered [zzfinalpercentcorrect] % correctly, [zzfinalpercenterror]%
incorrectly and you did not answer [zzfinalpercentomitted]% of the
trials. The average reactiontime on the trials you've answered
correctly was [zzmeancorrectrt] milliseconds, and for the trials
you've
answered incorrectly your average reactiontime was [zzmeanerrorrt]
milliseconds.
==================

Regards,

Anne-Wil


On Aug 9, 11:33 pm, liwenna <liwe... at gmail.com> wrote:
> Hey Morgan,
>
> I spotted at least 1 typo allready...
> dim omitedcounter as integer -> dim omitTedcounter as integer
>
> there's bound to be more of those... >.>
>
> On Aug 9, 7:20 pm, Morgan J Prust <morgan.pr... at gmail.com> wrote:
>
> > Liwenna,
>
> > Thanks so much for this thoughtful and extensive reply! I'll give it a shot
> > and let you know.
>
> > Thanks again,
>
> > Morgan
>
> > On Sat, Aug 8, 2009 at 8:12 AM, liwenna <liwe... at gmail.com> wrote:
>
> > > Hey Morgan,
>
> > > Basically what you need are variables that run accros the whole
> > > experiment instead of per trial. You can define these in the user tab
> > > of the script window. After you've generated the script a script
> > > window is opened that has two tabs to be chosen from in the bottom of
> > > that window: full (shows the script) and user (which is empty). Now
> > > declare the variables you need in that user-tab. For instance:
>
> > > ========================
> > > dim correctcounter as integer
> > > dim errorcounter as integer
> > > dim rtcorrectcounter as integer
> > > dim rterrorcounter as integer
> > > dim omitedcounter as integer
> > > dim trialcounter
>
> > > dim finalpercentcorrect as integer
> > > dim finalpercenterror as integer
> > > dim finalpercentomitted as integer
> > > dim meancorrectrt as integer
> > > dim meanerrorrt as integer
> > > ==========================
>
> > > Now at the end of a trial (or after an answer is given) you need to
> > > insert an inline that updates the error- an correctcounter based on
> > > the answer given.
> > > The following code should do this: firstly it simply updates the
> > > counter that keeps the total number of trials which we'll need later
> > > on. Then it determines whether or not a response is given. If there is
> > > no response (slidedisplay.resp = "") then the omittedcounter is
> > > updated and written to the edatfile. If a response is given (case
> > > else) it goes on to determine whether or not this response is correct
> > > and based on that, it updates either the correct- or the errcounters
> > > and writes them to the edatfile. The z in front of the attributenames
> > > makes them all appear at the far right of the edat file (which is
> > > alphabetically ordered) so you can easily find them. This select case-
> > > construction is to make it so that omitted trials are not counted as
> > > errortrials.
>
> > > ==========================
> > > trialcounter = trialcounter + 1
>
> > > Select case slidedisplay.resp
>
> > > case ""
> > > omittedcounter = omittedcounter + 1
> > > c.setattrib "zomittedcounter", omittedcounter
>
> > > case else
> > > if slidedisplay.acc = 1 then
>
> > > correctcounter = correctcounter +1
> > > c.setattrib "zcorrectcounter", correctounter
> > > rtcorrectcounter = rtcorrectcounter + slidedisplay.rt
> > > c.setattrib "zrtcorrectcounter", rtcorrectcoutner
>
> > > end if
>
> > > if slidedisplay.acc = 0 then
>
> > > errorcounter = errorcounter + 1
> > > c.setattrib "zerrorcounter", errorcounter
> > > rterrorcounter = rterrorcounter + slidedisplay.rt
> > > c.setattrib "zrterrorcounter", rterrorcounter
>
> > > end if
>
> > > end select
>
> > > =======================
> > > The above script updates the counters for each trial based on the
> > > answer given. At the end of the experiment we should of course make
> > > the counters go to percentages and the rt's should be averaged.
>
> > > Place something like this in an inline that is located on the
> > > sessionproc after (all) the trialproc(s) have been run (I'm not
> > > entirely sure whether the / for dividing will work just like that...
> > > but you should be able to work that out). Firstly it updates the user-
> > > tab variables based on the counters and the second part writes it all
> > > to the edat file.
>
> > > =============================
> > > finalpercentcorrect = correctcounter / trialcounter
> > > finalpercenterror = erorrounter / trialcounter
> > > finalpercentomitted = omittedcounter / trialcounter
> > > meancorrectrt = rtcorrectcounter / correctcounter
> > > meanerrorrt = rterrorcounter / errorcounter
>
> > > c.setattrib "zfinalpercentcorrect", finalpercentcorrect
> > > c.setattrib "zfinalpercenterror", finalpercenterror
> > > c.setattrib "zfinalpercentomitted", finalpercentomitted
> > > c.setattrib "zmeancorrectrt", meancorrectrt
> > > c.setattrib "zmeanerrorrt", meanerrorrt
>
> > > ==========================
>
> > > Lastly you can show a slide that tells the subject the following
> > > (place a text like this in a text-object).
>
> > > ==========================
> > > You've finished [trialcounter] trials and of these trials you've
> > > answered [finalpercentcorrect] % correctly, [finalprcenterror]%
> > > incorrectly and you did not answer [finalpercentomitted]% of the
> > > trials. Your average reactiontime on the trials you've answered
> > > correctly was [meancorrectrt] milliseconds, and for the trials you've
> > > answered incorrectly your average reactiontime was [meanerrorrt].
> > > ==========================
>
> > > Ok.... now all the above is to give you an idea of what should be done
> > > more or less.... I did it top of my head and have no opportunity to
> > > actually run it in e-prime so I am not entirely sure whether it will
> > > all work as intended but it should get you started.
>
> > > Good luck on it!
>
> > > liwenna
>
> > > On Aug 7, 7:39 pm, Morgan <morgan.pr... at gmail.com> wrote:
> > > > I'm attempting to program an n-back task in E-Prime and am currently
> > > > trying to figure out how to have the task generate a performance
> > > > summary to be displayed at the completion of the task, which would
> > > > include % of correct responses, % of incorrect responses, reaction for
> > > > correct responses, reaction for incorrect responses, and the number of
> > > > omitted trials across the entire task (in other words, not after each
> > > > trial or each block, but at the end of all of the trials/blocks).
> > > > Would any of you know how to do this?
>
> > > > Many thanks,
>
> > > > Morgan Prust
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list