Use of Summation to calculate block accuracy and repeat block or move on

140 views
Skip to first unread message

Val Karuzis

unread,
Aug 25, 2015, 5:11:31 PM8/25/15
to E-Prime
Hello,

I have a script that is supposed to move on if participants get 80% or more correct on the practice trials.  However, one can get 80% or more correct and it won't move on.  The issue seems to be that the summation object in the in-lines is not updating.

Here is how it's set up:

In the user script:
Dim VAccuracy As Summation

Earlier in the procedure (right before the practice list):
Set VAccuracy = New Summation

After the object and feedback:
'Debug.Print VerbLearning.ACC
VAccuracy.AddObservation CDbl(c.GetAttrib("VerbLearning.ACC")
'Debug.Print VAccuracy.Mean

Unfortunately, the debugging is showing me that, although accuracies are 1, the VAccuracy.Mean command is always 0 (and never 1).  I don't *think* it could be a decimal point issue, because even an accurate response on the first trial leads to a VAccuracy.Mean value of 0.

Any ideas on why it is not updating?  

Thanks so much for your help,
Val

Val Karuzis

unread,
Aug 25, 2015, 5:21:49 PM8/25/15
to E-Prime
Sorry, all!  I had to take out the c.GetAttrib, since the attribute wasn't updating before the end of the procedure.  So that line worked with:

VAccuracy.AddObservation CDbl(VerbLearning.ACC)

Thanks to Susan Campbell for the amazingly quick fix.

David McFarlane

unread,
Aug 27, 2015, 5:52:29 PM8/27/15
to e-p...@googlegroups.com
Glad you got it sorted. Can't resist commenting
on one thing, seems odd that you would cast .ACC
to a Double there. .ACC is always either "0" or
"1" and so evaluates to an ordinary Integer. If
I had to cast it I would use CInt(), although in
this case E-Basic will do automatic casting, so I would simplify this to just

VAccuracy.AddObservation VerbLearning.ACC

-- David McFarlane


At 8/25/2015 05:21 PM Tuesday, Val Karuzis wrote:
>Sorry, all! Â I had to take out the c.GetAttrib,
>since the attribute wasn't updating before the
>end of the procedure. Â So that line worked with:
>
>VAccuracy.AddObservation CDbl(VerbLearning.ACC)
>
>Thanks to Susan Campbell for the amazingly quick fix.
>
>
>On Tuesday, August 25, 2015 at 5:11:31 PM UTC-4, Val Karuzis wrote:
>Hello,
>
>I have a script that is supposed to move on if
>participants get 80% or more correct on the
>practice trials. Â However, one can get 80% or
>more correct and it won't move on. Â The issue
>seems to be that the summation object in the in-lines is not updating.
>
>Here is how it's set up:
>
>In the user script:
>Dim VAccuracy As Summation
>
>Earlier in the procedure (right before the practice list):
>Set VAccuracy = New Summation
>
>After the object and feedback:
>'Debug.Print VerbLearning.ACC
>VAccuracy.AddObservation CDbl(c.GetAttrib("VerbLearning.ACC")
>'Debug.Print VAccuracy.Mean
>
>Unfortunately, the debugging is showing me that,
>although accuracies are 1, the VAccuracy.Mean
>command is always 0 (and never 1). Â I don't
>*think* it could be a decimal point issue,
>because even an accurate response on the first
>trial leads to a VAccuracy.Mean value of 0.
>
>Any ideas on why it is not updating? Â
Reply all
Reply to author
Forward
Message has been deleted
0 new messages