counting response types separately then displaing the counts at the end of each block
kelsey.leigh.carlson at gmail.com
kelsey.leigh.carlson at gmail.com
Wed Jun 5 10:35:54 UTC 2013
Hi all,
In my experiment I have a condition called "Either" in a list object it is
defined as "Cue" and presents an "E" on the screen to the subject. During
this condition subjects can press either "n" or "b" on the keyboard. During
each block I want to count the number of "n" responses and the number of
"b" responses separately, then present the separate counts in a text object
at the end of each block.
I've pasted in the coding I've done here and hope that it makes some sense,
please feel free to ask me questions if it does not. Here I create counting
variables "count_n" and "count_b", set them to 0, then set the Attributes
"total_n" and "total_b"which are scripted so that during the "Either"
condition when "n" is selected "total_n" should reference "count_n" and add
one (+1); when"b" is selected "total_b" should reference "count_b" and add
one (+1).
In the user script:
' Block choice variable
Dim count_n As Integer
Dim count_b As Integer
Dim total_n As Integer
Dim total_b As Integer
In FirstTrialITI: (bit of Inline script, I believe it repeats after each
trial)
count_n = 0
count_b = 0
In TMS: (InLine script that runs a block)
' choice_selection
count_n = count_n +1
count_b = count_b +1
If ((c.GetAttrib("Cue") = "E") And (currentresponse = ("n"))) Then
c.SetAttrib "total_n", count_n
End If
If ((c.GetAttrib("Cue") = "E") And (currentresponse = ("b"))) Then
c.SetAttrib "total_b", count_b
End If
I can see in the data file it creates columns for "total_b" and "total_n",
but it counts them together!
total_b total_n
1 NULL
NULL 2
3 NULL
I also tried this piece of code, but "total_b" and "total_n" were still
counted together:
If ((c.GetAttrib("Cue") = "E") And (currentresponse = ("n"))) Then
c.SetAttrib "total_n", count_n
Else If ((c.GetAttrib("Cue") = "E") And (currentresponse = ("b"))) Then
c.SetAttrib "total_b", count_b
End If
End If
Furthermore, when I try to present the separate counts in a text object at
the end of each block by typing [total_b] and [total_n] Eprime says "no
such attribute".
I hope this made some sense, but will answer any questions that you may
have. Thanks a lot for any help.
Best,
Kelsey
--
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/dd2080cf-91a7-4c9c-ad4f-9050678d1a48%40googlegroups.com?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.linguistlist.org/pipermail/eprime/attachments/20130605/ed088b4c/attachment.htm>
More information about the Eprime
mailing list