a bunch of questions: sample/cycle count, accessing different context attributes

fledgeling e-Prime mastah kominiarczukj at gmail.com
Wed Oct 12 17:28:29 UTC 2011


Hello experienced e-Prime hackers!

I have a few questions that don't seem to be explained in the e-Prime
documentation, but I see that experienced e-Primer's should know how
to tacke :). BTW: I am using e-Prime 1, not 2, but I don't know if
there is much difference between the two.

The first problem is, how do I display the sample / cycle number? I
found here that you use c.getAttribute("List.sample") and the same
with cycle. However, how do you find the total number of samples and
cycles? I found a workaround for number of samples, i.e. you get
List.Order.Count, but this is a hack because apparently certain
orderings alter this number. However, the cycle count is still a
mystery for me.. any thoughts?

My bigger worry is something else, though. I have a TrialList with an
appropriate Proc performing my main experiment, and iterating over a
number of samples. In each sample the subject makes decisions that
will affect his earnings, which are basically taken as earnings from a
single, randomly chosen, round (or sample, in e-Prime terms).

Let's say my structure looks more or less like this:


 MainProc:
    ...
    TrialList
        TrialProc:
            .. main experiment ..
        endProc
    DeterminePay (inline script)
 endProc

So, in the TrialProc the experiment goes on and sets an attribute in
TrialList (i.e., one of the columns) to AmountWon. Then, in the script
DeterminePay, which is one level above the experimental procedure, I
need to read in that amount and display a message saying how much the
subject earned.

I tried accessing things through TrialList.getAttribute(payingRound,
"AmountWon"), but turns out that this only allows one to access the
ORIGINAL values in the TrialList table, not the values set by the
subject during the experiment. Hence, this approach is lost, at least
I can't figure out how to make it work.

My second approach has the following structure:

 MainProc:
    ...
    DetermineRound (inline script)
    TrialList
        TrialProc:
            .. main experiment ..
            SetWinningAmount (inline script)
        endProc
    DeterminePay (inline script)
 endProc

where I set the (random) paying round and a global attribute
WinningAmount through

c.SetAttrib("WinningAmount"), -1

in the DetermineRound script, then if the script SetWinningAmount
detects that we reached that round (i.e.,
c.GetAttrib("TrialList.sample") = payingRound) it sets WinningAmount
to the value won in that sample. Finally, the script DeterminePay
tries to read in the WinningAmount attribute and display it.

The problem with this second solution is that the attribute
WinningAmount is visible in both MainProc and TrialProc, but changes
made within TrialProc are not visible in MainProc; in C++ terms, it
seems as if the context is passed to TrialProc by value and not by
reference :).

I have seen many times that people were somehow able to determine
subject pay at the end, so does anyone know a workaround for this? If
everything fails, I can read this manually at the end of the
experiment from the data recorded by e-Prime, but being able to code
it up would be much preferred :).

Thanks in advance!

-- 
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.



More information about the Eprime mailing list