If ... then ... I need help!

52 views
Skip to first unread message

Leila

unread,
May 7, 2008, 12:05:46 PM5/7/08
to E-Prime
Hi,

I program an experiment with e-prime for the first time. Supose that
in my experiment there are 3 blocs. I should use a syntaxe for when
someone has 80% of good answer and more in the second bloc, he goes to
the bloc 3 , but if he doesn't has more of 80% of good answer, he
should back to the bloc 1. Someone knows how I can do that?

Thank you very much, and sorry for my poor english

Leila

ben robinson

unread,
May 7, 2008, 12:49:08 PM5/7/08
to e-p...@googlegroups.com
in your user script tab:
Dim trialCount as Integer
Dim correctResp as Integer

then, in an inline immediately following each response (assuming here that the response was made to an object called "Stimulus"):
trialCount = trialCount + 1
If Stimulus.ACC = 1 Then
   correctResp = correctResp + 1
End If

then, in an inline immediately following the block of trials, calculate the accuracy:
correctResp = correctResp/trialCount*100
If correctResp <= 80 Then Goto Label1 '(you'll need to place Label1 before the start of your block of trials.  this way, if accuracy <= 80% they will be looped back to the beginning of the block.  otherwise, they will continue on to the next phase.)

something along those lines should work.  hope that helps.

ben

Leila

unread,
May 7, 2008, 2:03:30 PM5/7/08
to E-Prime
Thank you very much Ben.

I try this, but I'm not sure that I have completely understand. When I
start the experiment, a message of error appear, and say that it was
unable to defined the variable correctResp. I use the visual e-prime.
I create list, procedure and stimuli. I would apreciate to know by
what I should replace correctResp, trialCount, stimulus.acc and
label1. I'm very debutant.

You are very nice to help me.

Leila
> > Leila- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -

ben robinson

unread,
May 7, 2008, 7:55:17 PM5/7/08
to e-p...@googlegroups.com
to define correctResp and trialCount go to View: Script, then click on the tab titled, User.
in this User tab, type:
Dim correctResp as Integer
Dim trialCount as Integer

then in your procedure timeline drag a Label Object to the very beginning.  by default, this object will be called "Label1".
right after Label1 put your List Object from which you will call your trial procedure.  by default, this will be called "List1".
inside List1 put the name of your procedure under the Procedure column.
now go to your procedure timeline.  put in a TextDisplayObject (or whatever) to display your stimulus.  call this TextDisplayObject "Stimulus".
double click on Stimulus, go to the Duration/Input tab, add a Keyboard response.  fill in the blank where it asks for a correct response.  if you don't define what a correct response to the Stimulus is, our next step won't work properly.
for the next step, drag an InLine object to the trial procedure immediately following Stimulus.  by default, this will be called "Inline1".
in Inline1 type:

trialCount = trialCount + 1
If Stimulus.ACC = 1 Then
   correctResp = correctResp + 1
End If

now on the same level as your List1, and your Label1, put another InlineObject ("Inline2").
in Inline2 type:
If correctResp/trialCount*100 <= 80 Then
   Goto Label1
End If

hope that helps.

Leila

unread,
May 8, 2008, 2:15:16 PM5/8/08
to E-Prime
Thank you very very very very much Ben!!
My experiment run very well! I really apreciate your help. I don't
know how many time I would pass on this if you were not there.
I would just have an other question, but I will understand if you
don't have time to answer me. You have already help me so much.

I should programme in an other script inline, for my total experiment,
when someone go back 3 times to the previous label, the experiment
should end.
If you can help me, or if someone know how to do that?

Thanks!!!

Leila
a student who very appreciate this group and people who take of their
time to answer at questions
> > > - Afficher le texte des messages précédents -- Masquer le texte des messages précédents -
Reply all
Reply to author
Forward
0 new messages