Summing object.ACC field and presenting as feedback

277 views
Skip to first unread message

LizaM

unread,
Nov 19, 2009, 12:47:02 PM11/19/09
to E-Prime
Hello,

Before I ask my question just let me say how useful this group is and
what an excellent resource for the current steep E-Prime learning
curve I find myself on - once I have learnt more and have useful stuff
to contribute I will do so! Thank you all :)

I have an experiment where I have the user select a card from 5 cards
to see if they can match a card which is face down - all this is being
done on an object called Slide2. I am using a conditional CRESP to
record the correct response for each randomly selected card. So far so
good. However, the student I am programming for wants the feedback
given to the participant at the end in the form "You sucessfully
matched the card xx times in 25 tries". So, ideally, on the feedback
object I want to be able to tell it to add up the total of the
Slide2.ACC and present it as a result but I really can't see how to do
this! I can give feedback after each trial using Slide2 as the input
object that's not a problem but can't work out how to present the
total accuracy in this way.. any help gratefully recieved...

Many Thanks

Liza

liwenna

unread,
Nov 19, 2009, 1:25:54 PM11/19/09
to E-Prime
Hey Liza,

What you need is a variable that is able to carry information over
several trials.
This is done by 'user tab declared variables', which are variables
that also fall out of the currect 'context' (or c. as in c.setattrib).
Go to the script window and in the lower left tab select the user tab.
On the user tab write: " dim ncorrect as integer " . There's your
counter of correct trials.

In the trialproc create an inline after slide2 that will update the
attribute ncorrect.

********************
if slide2.acc = 1 then ncorrect = ncorrect +1

c.setattrib "correctn", ncorrect
*****************

The first line adds 1 to ncorrect if the accurcay is 1, the second
line writes ncorrect to correctn. Ncorrect will typically not be
logged into your edat-file, whereas this line updates a logged
attribute called correctn.

Now in your feedback slide you can show the value of correctn (or
ncorrect if you wish) as the value of xx in xx times in 25 tries.

Hope this is clear enought to you.

Best,

liw

David McFarlane

unread,
Nov 19, 2009, 2:24:02 PM11/19/09
to e-p...@googlegroups.com
Liza,

liwenna's answer covers what you need (thanks, liw!), but if you want
to read up some more then dive into chapter 4 of the User's Guide
that came with E-Prime, especially sections 4.3.4.1, 4.3.5, 4.4.3, and 4.5.3.4.

BTW, if you ever want to gather fancier descriptive statistics (e.g.,
max, min, mean, standard deviation (but no median :( )), you can make
your life easier with a Summation object, just look at the Summation
topic in the online E-Basic Help.

-- David McFarlane, Professional Faultfinder
>--
>
>You received this message because you are subscribed to the Google
>Groups "E-Prime" group.
>To post to this group, send email to e-p...@googlegroups.com.
>For more options, visit this group at
>http://groups.google.com/group/e-prime?hl=.

LizaM

unread,
Nov 19, 2009, 4:04:53 PM11/19/09
to E-Prime
Liw and David - thank you both very much! That seems to be exactly
what I need :) Will definatley have a read of those sections you
mention too David

LizaM

unread,
Nov 19, 2009, 6:06:26 PM11/19/09
to E-Prime
OK.. I've implemented that and am happy with it... just a couple of
observations:

as Slide2 is in a trialproc that's where I put the full inline:
==================================
if slide2.acc = 1 then ncorrect = ncorrect +1

c.setattrib "correctn", ncorrect
==================================

However, as trialproc consists of 5 items and is repeated 5 time
(random with replacement) and I want the feedback at the end of the
sessionproc i also had to put an inline in sessionproc (or I got an
attribute not found error) as follows:

===================================
c.setattrib "correctn", ncorrect
===================================

That now seems to work as expected - if the 2 are repeated exactly
then the result ends up being accuracy number +1

Also, correctn is called as [correctn] within text display object and
that works great too :)

That will do for tonight - thanks very much for the help

Brady Anderson

unread,
Jan 9, 2014, 12:20:46 AM1/9/14
to e-p...@googlegroups.com, mcfa...@msu.edu
Here's my take on how to deal with getting medians in-task:

https://groups.google.com/forum/#!topic/e-prime/6wKH5ceFuMQ

 which would admittedly be much easier if E-prime had a median summation.
Reply all
Reply to author
Forward
0 new messages