Feedback contingent on the number of trials

Peter Quain pquain at une.edu.au
Mon Mar 30 22:18:01 UTC 2009


Without using summation object, maybe something like this would work 
(there are probably some syntax errors in this though)

Make an attribute 'correctanswer' in trialList

Declare globally in User Script...
Dim counter, correct, pcntcorr As Integer
Dim calc As Double
counter = 0
correct = 0
pcntcorr = 0
calc = 0

Have a text object (Feedback) at end of your trial procedure with 0 
duration (so it is invisible in each trial where duration is 0).

In an inline at start of your trial procedure..

If counter < 12 Then
Feedback.Duration = 0
End If
counter = counter + 1

In an inline after your stimulus..

If [yourStimulusObject].RESP = [yourStimulusObject].correctanswer Then
correct = correct + 1
End If

If counter = 12 Then
calc = correct/12 * 100
pcntcorr = Rnd(calc)
Feedback.Duration = 3000
Feedback.text = "Your accuracy was" & pcntcorr & "%"
c.SetAttrib "OverallAcc", pcntcorr
counter = 0
correct = 0
pcntcorr = 0
End If

At 04:48 AM 31/03/2009, you wrote:


>Hello,
>
>I am trying to program an experiment in which there are 288 trials
>within a single block.  I'd like to provide participants with a
>message of their overall feedback accuracy after every 12 trials
>(e.g., "Your accuracy was ___%").  This message will be based on
>participants' average accuracy from the previous 12 trials, and since
>there are 288 trials in total -- this feedback will occur 24 times
>throughout the experiment.
>
>To do this, I know I need to include a script to initiate the
>variable, "OverallAcc":, e.g.:
>
>'This initiates the Summation object, OverallAcc, so that it
>'may be referenced within the experiment.
>Set OverallAcc = New Summation
>
>An accuracy summation script:
>
>'The AddObservation command adds the ACC value of object
>'Target to the Summation object, OverallAcc.
>OverallAcc.AddObservation Target.ACC
>
>'The Debug.Print command prints the mean value of the Summation
>'object, OverallAcc, in the Output window.
>Debug.Print OverallAcc.Mean
>
>'The OverallACC attribute adds the running calculation of overall
>'accuracy to the data file at the trial level.
>c.SetAttrib "OverallAcc", OverallAcc.Mean
>
>and a text object to display the feedback.  The Object on which
>feedback is collected is the "Target." I think I will also need to add
>a script that counts the number of trials, defines the OverallAcc
>variable, and resets the OverallAcc variable after every 12 trials --
>but I am not sure how to implement this.  Any help is most
>appreciated!
>
>Thanks very much!
>Tracy
>
>
>
>
>
>
>>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG.
>Version: 7.5.557 / Virus Database: 270.11.31/2029 - Release Date: 
>29/03/2009 4:56 PM
>
>
>
>
>--
>No virus found in this incoming message.
>Checked by AVG.
>Version: 7.5.557 / Virus Database: 270.11.31/2029 - Release Date: 
>29/03/2009 4:56 PM


-- 
No virus found in this outgoing message.
Checked by AVG. 
Version: 7.5.557 / Virus Database: 270.11.32/2030 - Release Date: 30/03/2009 8:40 AM



--~--~---------~--~----~------------~-------~--~----~
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