Stimulus duration pegged to average RT

19 kali dilihat
Langsung ke pesan pertama yang belum dibaca

huw....@gmail.com

belum dibaca,
9 Agu 2015, 06.21.1609/08/15
kepadaE-Prime
Hi Everyone, I am trying to run a procedure in which participants respond to a stimulus during a practice trial, and then again during an experimental trial. In the latter, I want the duration of this stimulus object to be determined by participants' average RT to it in the practice. I have managed to do this using the code below, but when I try and extend it into another context (i.e. use the same "MeanPracticeReactionTime"attribute in a new inline, within a new procedure), it is not working. Can anyone see where I am going wrong?

Thanks in advance!



'User Tab:

Dim g_nTotalTrialCount As Integer

Dim g_TotalPracticeRT As Integer

Dim g_MeanPracticeRT As Integer


'Inline 1:

g_nTotalTrialCount = 0

g_TotalPracticeRT = 0

g_MeanPracticeRT = 0

'Inline to update Trial count

g_nTotalTrialCount = g_nTotalTrialCount + 1

c.SetAttrib "TrialCount", g_nTotalTrialCount

'Inline to calculate average RT:

g_TotalPracticeRT = g_TotalPracticeRT + PracProbe2.RT
c.SetAttrib "TotalPracticeRT", g_TotalPracticeRT

g_MeanPracticeRT = g_TotalPracticeRT / g_nTotalTrialCount
c.SetAttrib "MeanPracticeRT", g_MeanPracticeRT

'Inline to set Stimulus Duration to average RT from the previous procedure:

c.SetAttrib "MeanPracticeReactionTime", g_MeanPracticeRT

David McFarlane

belum dibaca,
11 Agu 2015, 10.47.2111/08/15
kepadae-p...@googlegroups.com
What does "not working" mean here? Please give more detail. Do you
get any specific error message.

Also, you might find a Summation object useful for deriving average
values -- please see that topic in the E-Basic Help facility.

-----
David McFarlane
Twitter: @EPrimeMaster (https://twitter.com/EPrimeMaster)
Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru