Inaccurate logging of accuracy

liwenna liwenna at gmail.com
Thu Feb 24 12:59:53 UTC 2011


ow also... in the code there are these lines:

                         Stimulus.ACC = 1
                        Else
                         Stimulus.ACC = 0
                        End If

Stimulus here is the name of the slide that this code collects
responses on (the name that was replaced with SLIDENAME) in the first
lines of the code).

In your current set-up you try to create 8 different accuracy
attributes for each of the 8 slides... you could also have the code
log accuracy in a single attribute and have an additional attribute
that logs the slidenumber on which the response was made.
The last bit of the code could then look, for instance, like this:
*************
               c.setattrib "responseslide" = 1
               If strHit = c.GetAttrib("Correctresp") Then
                         c.setattrib "accuracy", 1
                        Else
                         c.setattrib "accuracy", 0
                        End If
              goto label1

              Else

        End If
******

the program will then first log 1 into an attribute called
"responseslide" (replace 1 with 2, 3 - 8 in the hittests for the other
slides) and then log 1 or 0 into an attribute called "accuracy" based
on the value of an attribute correctresp.  I also added in the goto
lable line mentioned in the post above, which could then make the
program jump to (I think this is what you need?) the end of the
procedure, thus skipping the remaining slides.



On Feb 24, 12:35 pm, liwenna <liwe... at gmail.com> wrote:
> Hi Jens,
>
> I got to suspect that the problem lies with your hittest code.
>
> In the code you'll have to specify which slide the hit that has to be
> analyzed is made on. I gather from your post that you use one single
> hittest for all 8 slides but the code will analyse just the hit that
> was made (or not made) on the slide specified in the code... so if the
> code is set to analyze slide1 and the program is directed to the code
> based on a mouseclick in slide 6, it will still analyze the hit that
> was (not) made in slide1.
>
> Below I paste an example of stringhit from one of my experiments (not
> entirely sure if it will be exactly the same as your code.. but you'll
> get the idea). I used capitals on the two places where the SLIDENAME
> has to be specified.
>
> ************
>         Set theState = SLIDENAME.States("Default")
>
>         'Was there a response?
>         If Stimulus.InputMasks.Responses.Count > 0 Then
>
>                 'Get the mouse response
>                 Set theMouseResponseData =
> CMouseResponseData(SLIDENAME.InputMasks.Responses(1))
>
>                 'Determine string name of SlideImage or SlideText object at
>                 'mouse click coordinates. Assign that value to strHit
>                 strHit = theState.HitTest(theMouseResponseData.CursorX,
> theMouseResponseData.CursorY)
>
>                 'Compare string name where mouse click occurred to CorrectAnswer
>                 'attribute on each trial, and score response
>                 'NOTE: This comparison is case sensitive
>
>                If strHit = c.GetAttrib("Correctresp") Then
>                          Stimulus.ACC = 1
>                         Else
>                          Stimulus.ACC = 0
>                         End If
>                Else
>
>         End If
>
> c.SetAttrib "response", strHit
> ************
>
> You should simply give each slide it's own hittest (placed immediatly
> after each slide). You can insert a 'goto label' line within each
> hittest if it's needed that the program jumps once a response is
> made . Place this line above the bottom 'Else' so that it falls under
> the "If Stimulus.InputMasks.Responses.Count > 0 Then" condition. There
> are no actions specified inbetween that bottom Else and the End If, so
> nothing is done if the condition "If
> Stimulus.InputMasks.Responses.Count > 0 Then" is not met -> if there
> is no mouseclick made on the specified slide the program will do
> nothing and simply proceed with the next slide.
>
> You might also notice that a number of dim lines is missing from the
> above code:
>         Dim strHit As String
>         Dim theState as SlideState
>         Dim theMouseResponseData As MouseResponseData
> You can use a dim line only once within a procedure... so either keep
> them in the code for slide1 only or place them at the usertab of the
> script window. If you repeat the same dimline within a procedure
> you'll receive an error when compiling the script.
>
> Hope this helps,
>
> Best,
>
> liw
>
> On Feb 23, 4:35 pm, jens <jens.bernhards... at gmail.com> wrote:
>
> > I have set up an experiment that shows 10 different slides in a
> > sequential order in a s1-s2-s3… kind of way. The task is to identify
> > and respond to the stimuli via a mouse click at any of the slides.
> > This then leads, by label jumping to a hit test of what was shown, and
> > the trial procedure is repeated a number of times.
>
> > Everything flows fine except my data logging. The ACC, CRESP and RESP
> > does not reset from one trial to another. If I, for instance give a
> > response at s8 then all my slides is logged as 0(incorrect) except
> > from slide8 that is logged as 1(correct). BUT, if I in trial two
> > respond at s2 then the slides are being logged as 1 between s2 and s8
> > and the rest as 0. The logging of the data is thereby effected by
> > response on previous trials. What I want of course is that response is
> > logged as 1 and no response is logged as 0.
>
> > Please point me in the right direction.
>
> > Best
> > Jens

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