Payoff Matrix - Feedback Counter (Tidy up script)
Caleb J. Picker
dbzgtfan4ever at gmail.com
Mon Jan 10 02:00:06 UTC 2011
Hello,
I have learned so much about E-Prime through this group and through butting
my head against E-Prime's metaphorical wall (i.e. scripting). It is now
time for me to post a question.
*My experiment:*
This memory experiment asks participants to study a list of pictures. At
test, they are presented with both the pictures they just studied and new
pictures. Their job is to discriminate between studied and non-studied
pictures (e.g. "Was this old or new?"). In this experiment, there are 5
such study-test blocks. My manipulation is to use five different payoff
matrices which correspond to the five study-test blocks. Each study-test
block (and thus, each payoff matrix) will be presented in random order to
each new participant.
*My question:*
I am trying to create a feedback counter to present to participants after
each trial. I can do it, but my script requires many nested "If...Then"
statements and "Select Case" statements. The reason for this is because of
the following:
1) I have two experiment startup conditions. I have an "Old New" Condition
and a "PDP" condition (not important what these actually mean). As a
result, I also have two different SlideObjects (TestSlideOLDNEW and
TestSlide) that correspond to each condition. The TestSlide objects collect
trial responses.
2) I have 5 different "Payoff Matrix" conditions (I call them A, B, C, D,
and E).
3) I need to assign different 'points' to each correct and incorrect
response.
4) For each correct and incorrect response, I need to assign different point
values based on the type of picture presented (e.g. old/studied or
new/non-studied). This corresponds to Hits, Misses, False Alarms, and
Correct Rejections.
I will try to explain what I have in the following script:
**********************************************************************************************************************
***********************************************************************************************************************
'This If...Then statement refers to (1) above
If c.getattrib ("TestType") = "OldNew" then
Select Case MasterList.getattrib ("Payoff") ' This refers to the five
different Payoff Matrices
Case "A" 'First payoff matrix
If MasterList.getattrib ("StatusOldNew") = "Old"
then
If TestSlideOLDNEW.ACC = 1 then 'Hit
Rate
AccuracyDisplay =
AccuracyDisplay+1 'counter
c.setattrib "Accuracy",
AccuracyDisplay 'Sets Accuracy attribute so that I can display up-to-date
point system per trial
Elseif TestSlideOLDNEW.ACC = 0 then
'Miss
Accuracy Display =
AccuracyDisplay-1
c.setattrib "Accuracy",
AccuracyDisplay
Else MsgBox "Conservative A condition
payoff matrix error Status Old"
End if
Elseif MasterList.getattrib("StatusOldNew") = "New"
then
If TestSlideOLDNEW.ACC = 1 then 'Correct
Rejection
AccuracyDisplay =
AccuracyDisplay+5
c.setattrib "Accuracy",
AccuracyDisplay
Elseif TestSlideOLDNEW.ACC = 0 then '
False Alarm
AccuracyDisplay =
AccuracyDisplay-5
c.setattrib "Accuracy",
AccuracyDisplay
Else MsgBox "Conservative A condition
payoff matrix error Status New"
End if
Else MsgBox "StatusOLDNEW payoff matrix error"
Case "B"
.
.
.
Case "E"
Elseif c.getattrib("TestType") = "PDP" then
Select Case.........
.
.
.
***********************************************************************************************************************
***********************************************************************************************************************
You can see that much of my script seems redundant, but I cannot figure out
how to condense the script any further. I am familiar with For...Next
loops, SubRoutines, Arrays, If...Then, IIf, and Select...Case functions as
I've read the E-Basic help on these functions and used them in the past.
However, my personal experience with Subroutines and Arrays is limited, but
I understand them enough to have been able to use them in the past
effectively. The solutions I've thought of merely require rearranging
everything in IIF, If...Then, or Select...case functions, but this seems
like a rather unnecessary rearrangement. I've also thought of declaring an
array so that I can just add values to the counter within a For...Next loop,
but this also seems unnecessary because I could just as easily input the
actual integer values.
Therefore, my question is, how can I condense this script further? I will
continue to try to innovate, but I would also like to hear any
comments/suggestions that any of you might have. I plan to post my
(hopefully, elegant) solution once I reach it.
If anything seems unclear, please let me know.
Thank you!
Caleb J. Picker
--
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20110109/05985f33/attachment.htm>
More information about the Eprime
mailing list