Inaccurate logging of accuracy

liwenna liwenna at gmail.com
Thu Feb 24 11:35:06 UTC 2011


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