Can't get AddObservation to work, or plague of the Type Mismatch
ben robinson
baltimore.ben at gmail.com
Wed Mar 9 14:17:21 UTC 2011
try changing them to:
stopaccuracy.AddObservation CInt(c.GetAttrib("ogperf"))
errorawareness.AddObservation CInt(c.GetAttrib("ogaware"))
or CDbl(...) if CInt(...) isn't what you need.
i think the problem might be that when you c.GetAttrib the value it pulls
from the list is understood as a string, rather than some sort of number...
On Wed, Mar 9, 2011 at 8:34 AM, Micah <ucfmicah at gmail.com> wrote:
> Hello,
>
> This is probably a very easy to solve problem, but it's just about
> beaten me down. I am trying to make a training script for my error-
> awareness paradigm that can log inhibition and error-awareness
> performance and then report these to the subject at the end of the
> trial. The task is very simple and works fine, as does the performance
> logging. I can't seem to get my summation object to work though-
> everytime it gives me a 'type mismatch'. I've tried creating a
> variable from the logging vars in a double format but that does not
> fix it. Can someone take a look at my code and see what's up?
>
> I start with the following setup inline and usertab code:
> 'setup inline
> set stopaccuracy = New Summation
> set erroraware = New Summation
>
> 'usertab
> dim killme as integer
> dim stopaccuracy as Summation
> dim erroraware as Summation
> dim ogperf as double
> dim ogaware as double
>
>
> My inline that logs awareness and performance, and (is supposed to)
> fill the summation object with these information for reporting to the
> subject, looks like this:
>
>
> If c.GetAttrib("trialtype") = "lure" then
> if TextDisplay1.RT = 0 then
> c.SetAttrib "ogperf", 1
> else
> c.SetAttrib "ogperf", 0
> end if
> end if
>
>
>
> if c.GetAttrib("awaretrial") = "1" and killme = 1 then
> if TextDisplay1.RESP = "2" then
> c.SetAttrib "ogaware", 0
> else
> c.SetAttrib "ogaware", 1
> end if
> end if
>
> if c.GetAttrib("ogperf") = "0" then
> killme = 1
> else
> killme = 0
> end if
>
>
> stopaccuracy.AddObservation c.GetAttrib("ogperf")
> errorawareness.AddObservation c.GetAttrib("ogaware")
>
>
> Debug.Print stopaccuracy.Mean
> Debug.Print erroraware.Mean
>
> c.SetAttrib "stopaccuracy", Format((stopaccuracy.Mean),"Percent")
> c.SetAttrib "errorawareness", Format((errorawareness.Mean),"Percent")
>
>
> It's these lines that give me the type mismatch:
> stopaccuracy.AddObservation c.GetAttrib("ogperf")
> errorawareness.AddObservation c.GetAttrib("ogaware")
>
> Link to script: http://bit.ly/hKCcmo
>
> Best,
> Micah
>
>
>
> --
> 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.
>
>
--
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/20110309/b0dbbad3/attachment.htm>
More information about the Eprime
mailing list