|
|
|
Forum Newbie
      
Group: Forum Members
Last Login: 11/12/2007 8:02:46 PM
Posts: 2,
Visits: 8
|
|
We are planning on using a go-no-go task, but are hoping to include a self-paced/response-contingent aspect such that a correct response results in a slight shortening of the SOA while an error results in the next trial being slightly longer. Our goal would be to have everyone get about 50% correct so that we can assess ERPs to correct and incorrect trials.
Is there any program/script that will do this that we can model after?
Thanks,
_Matt Picchietti
|
|
|
|
|
Forum Guru
      
Group: Moderators
Last Login: 10/30/2008 3:23:17 PM
Posts: 127,
Visits: 924
|
|
Hi Matt,
This type of feature can be implemented using a global variable and a bit of InLine script. Global variables are those that are declared on the User tab of the Script window in your experiment (the Script window is accessed via the View menu in E-Studio) and retain their value throughout the experiment.
What you would need to do is create a global variable that will hold the adjusted duration value that you want to use on the next trial. For example, say that this variable is named "nDuration" and starts at 1000. At the start of each trial, you will assign this variable to an attribute that is being referenced by the SOA object's Duration property. For example, say you are referencing an attribute named "SOADuration" (i.e. you have typed [SOADuration] into the Duration property). You would set the value of this attribute using InLine script at the start of the trial:
c.SetAttrib "SOADuration", nDuration
Then, at the end of each trial, you would assess the subject's accuracy and make an adjustment as necessary:
If Stimulus.ACC = 1 Then
nDuration = nDuration - 100
Else
nDuration = nDuration + 100
End If
Since nDuration is global, it will retain this new value on the next trial, when you will again assign it to an attribute. The Stimulus object will then adjust its Duration automatically (i.e. since it is getting its value from the attribute.
I hope that this has been helpful. Let me know if you have any further questions.
- Matt
- Matt
PST Technical Consultant
http://pstnet.com
|
|
|
|