Problem with remembering the previous total payoff in Iowa Gambling Task (IGT)

David McFarlane mcfarla9 at msu.edu
Mon Sep 16 19:22:03 UTC 2013


Fan,

Couldn't quite follow all of this.  But whenever someone has a 
problem with their program retaining previous values, I suspect that 
they failed to properly use a global variable to hold the value.  See 
the "Using E-Basic" chapter in the User's Guide that came with E-Prime.

BTW, shouldn't the line
         Total = 2000+Total+Youwon- Youlost
instead read
         Total = Total+Youwon- Youlost
?  And shouldn't Total be initialized somewhere once to 2000?

-----
David McFarlane
E-Prime training 
online:  http://psychology.msu.edu/Workshops_Courses/eprime.aspx
Twitter:  @EPrimeMaster (https://twitter.com/EPrimeMaster)

/----
Stock reminder:  1) I do not work for PST.  2) PST's trained staff 
take any and all questions at 
http://support.pstnet.com/e%2Dprime/support/login.asp , and they 
strive to respond to all requests in 24-48 hours, so make full use of 
it.  3) In addition, PST offers several instructional videos on their 
YouTube channel (http://www.youtube.com/user/PSTNET ).  4) If you do 
get an answer from PST staff, please extend the courtesy of posting 
their reply back here for the sake of others.
\----


At 9/16/2013 08:55 AM Monday, Fan W wrote:
>I am using the e-prime to modify the IGT. Everything is working fine 
>except that the previous total payoff cannot be remembered. This 
>leads to a problem that every time a new card is selected, the total 
>payoff is not added from the previous total payoff in the last trial 
>but is added from $2000 in each trial. For example:
>
>Subjects start with $2000,
>
>Trial no.1: Won $ 100; Lost $0; so the Total is $2000+$100-$0= $2100
>Trial no.2: Won $100; Lost$300; so the Total should be $2100+$100-$300=$1900
>
>BUT, in my design, the Total is $2000+$100-$300=$1800
>
>The script I wrote in InLine object of the Total payoff calculation is:
>
>
>If strHit="Image1" then
>List 1.run c
>
>Youwon=List1.GetCurrentAttrib ("Gaintrial")
>Youlost=List1.GetCurrentAttrib ("Losstrial")
>Total = 2000+Total+Youwon- Youlost
>
>("Image1" is Deck A.
>  "If strHit...means if the mouse click on Deck A, then run List1"
>"List 1" is the payment schedule of Deck A.
>"Youwon" is the amount of money won in each trial.
>"Youlost" is the amount fo money lost in each trial.
>"Gaintrial" is the attribute of List1 and is the winning schedule of Deck A.
>"Losstrial" is the attribute of List1 too and is the losing schedule 
>of Deck A.)
>
>The amount of "Youwon" "Youlost" and "Total" are displayed on the 
>feedback slide.
>
>
>I am not sure where  I am wrong, so I hope people who know how to 
>solve this problem may help me out!
>
>Thank you very much!
>
>Fan

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To unsubscribe from this group and stop receiving emails from it, send an email to e-prime+unsubscribe at googlegroups.com.
To post to this group, send email to e-prime at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/e-prime/52375a6f.629a320a.6caf.53e7SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/groups/opt_out.



More information about the Eprime mailing list