Hello,
I am checking in on this issue. Still not sure how I can fix this
Please could you clarify the issue? Error messages are useful. Long log files make the thread difficult to scroll.
There are consistently high omission error counts with the exact same spread across participantâs data
trial 2 always had 56, trial 3 had 40, trial 4 had 48, trial 5 had 32, and trial 1 varied - this is true across all participants for all sessions
There is also an issue with random missing reaction times as well in the data and a couple of instances where there are two responses recorded for a single question.
Please could you paste the Python code required for an omission error to be recorded?
if int(thisNum) == 3 and len(response.clicked_name) > 0 and response.clicked_name[0] == âButtonâ:
commission_error = 1
else:
commission_error = 0
trials.addData(âcommission_errorsâ, commission_error)
Omission Error check
if int(thisNum) != 3 and len(response.clicked_name) > 0 and response.clicked_name[0] != âButtonâ:
ommission_error = 1
else:
ommission_error = 0
trials.addData(âommission_errorsâ, ommission_error)
the âbuttonâ in the code is set in each trial and loop to the corresponding name of the buttons in each of those areas.
So this is true too often.
Whenever
thisNum isnât 3 and the participant clicks on something other than Button.
Try print('response.clicked_name[0]',response.clicked_name[0], response.clicked_name)
to find out what PsychoPy is recording them as clicking on.
Shouldnât it also be an omission error if the participant doesnât click on anything?
It was recording the same results regardless of the accuracy. Previously I had run it while clicking on every number including every â3â.
I have the output from that print code here and it is the same with every trial that code is used. I had withheld on num 3 in a few instances but still have the same results.
response.clicked_name[0] Button [âButtonâ]
When using this print code (see below) a few days ago, I received a commission error for every run, whether I was clicking on 3 or not. The print output did not show any of the trials where 3 was present though there definitely were. Oddly enough, when I just ran your print code for the first three loops and then this one below for the final loops, everything was an omission error.
Hello
How do you set the value of Button in each trial? What values can Button take? From the print-out posted above, it is always set to Button.
In addition,
[quote="Mitchell_Sanders, post:25, topic:42964"]
response.clicked_name[0] != âButtonâ
[/quote]
compares the value of response.clicked_name[0] with the constant string Button. This does not really make sense if you are setting the value of Button on each trial. If you want to compare the value of response.clicked_name[0] with the value of Button, you need to delete the â and the â.
response.clicked_name[0] != Button
Best wishes Jens
I now think that the issue might be that you donât reset the errors from trial to trial. Try changing the code to:
commission_error = 0
ommission_error = 0
if int(thisNum) == 3:
print('ommission trial',thisNum)
# Comission Error check
if len(response.clicked_name) and response.clicked_name[0] == 'Button':
commission_error = 1
print('commission error', response.clicked_name[0])
else:
print('commission trial',thisNum)
# Omission Error check
if len(response.clicked_name) > 0 and response.clicked_name[0] != âButtonâ:
ommission_error = 1
print('ommission error', response.clicked_name[0])
thisExp.addData(âcommission_errorsâ, commission_error)
thisExp.addData(âommission_errorsâ, ommission_error)
Possibly putting
commission_error = 0
ommission_error = 0
at the top will be sufficient
My understanding is that you are manually changing the name of Button in the code for each routine rather than it being a variable called Button.
âbuttonâ is set to correspond to each trial. ex. in loop 2, the button name is Button_2 so in the code component, Button_2 is referenced.
I ran a test on pavlovia with this new code and this is what I saw in the output:
Trial one had all ones in the commission errors column (except for one trial) and zeros in all of the omission column. The rest of them are all zeros in the commission column and ones in the omission column throughout the final 4 loops
Do you know how to view the developer console and the output from those print statements? Iâd like to see the actual output, not a description of the data file.
Are the trials ending too quickly?
I assume your code is in End Routine and you are changing response as well as Button for each loop.
Yes, it is set to end routine and the responses correspond to each button change.
Here is the print output from runner
return self._sock.bind(address)
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted: (ââ, 9034)
Commission error: Button
Commission error: Button
Omission trial: 3
Commission trial: 3
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Omission trial: 3
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Omission trial: 3
Commission trial: 3
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Commission error: Button
Omission trial: 3
Commission trial: 3
Commission trial: 7
Omission trial: 3
Commission trial: 3
Commission trial: 1
Commission trial: 9
Commission trial: 8
Commission trial: 4
Commission trial: 2
Commission trial: 5
Commission trial: 6
Commission trial: 5
Commission trial: 6
Commission trial: 2
Commission trial: 1
Commission trial: 4
Commission trial: 7
Commission trial: 8
Commission trial: 9
Omission trial: 3
Commission trial: 3
Commission trial: 2
Commission trial: 7
Commission trial: 8
Commission trial: 9
Commission trial: 5
Commission trial: 4
Omission trial: 3
Commission trial: 3
Commission trial: 6
Commission trial: 1
Commission trial: 6
Commission trial: 7
Commission trial: 8
Commission trial: 2
Omission trial: 3
Commission trial: 3
Commission trial: 4
Commission trial: 1
Commission trial: 9
Commission trial: 5
Commission trial: 2
Commission trial: 8
Commission trial: 6
Commission trial: 9
Commission trial: 1
Omission trial: 3
Commission trial: 3
Commission trial: 4
Commission trial: 5
Commission trial: 7
Omission trial: 3
Commission trial: 3
Commission trial: 5
Commission trial: 4
Commission trial: 7
Commission trial: 9
Commission trial: 8
Commission trial: 6
Commission trial: 1
Commission trial: 2
Commission trial: 2
Commission trial: 9
Commission trial: 8
Commission trial: 6
Commission trial: 4
Omission trial: 3
Commission trial: 3
Commission trial: 1
Commission trial: 7
Commission trial: 5
Commission trial: 5
Commission trial: 2
Commission trial: 9
Commission trial: 8
Commission trial: 7
Commission trial: 1
Omission trial: 3
Commission trial: 3
Commission trial: 4
Commission trial: 6
Commission trial: 2
Commission trial: 6
Commission trial: 7
Commission trial: 4
Commission trial: 9
Commission trial: 8
Commission trial: 5
Commission trial: 1
Omission trial: 3
Commission trial: 3
Commission trial: 6
Commission trial: 9
Omission trial: 3
Commission trial: 3
Commission trial: 1
Commission trial: 8
Commission trial: 4
Commission trial: 2
Commission trial: 5
Commission trial: 7
Commission trial: 4
Commission trial: 9
Commission trial: 6
Commission trial: 5
Commission trial: 1
Commission trial: 7
Omission trial: 3
Commission trial: 3
Commission trial: 8
Commission trial: 2
Commission trial: 8
Commission trial: 7
Commission trial: 6
Commission trial: 9
Commission trial: 4
Commission trial: 2
Commission trial: 5
Commission trial: 1
Omission trial: 3
Commission trial: 3
Commission trial: 2
Commission trial: 7
Commission trial: 9
Commission trial: 1
Commission trial: 5
Omission trial: 3
Commission trial: 3
Commission trial: 8
Commission trial: 4
Commission trial: 6
Commission trial: 6
Commission trial: 7
Commission trial: 2
Commission trial: 4
Commission trial: 5
Omission trial: 3
Commission trial: 3
Commission trial: 8
Commission trial: 1
Commission trial: 9
Commission trial: 5
Omission trial: 3
Commission trial: 3
Commission trial: 2
Commission trial: 6
Commission trial: 9
Commission trial: 4
Commission trial: 1
Commission trial: 7
Commission trial: 8
Commission trial: 2
Commission trial: 8
Commission trial: 6
Commission trial: 7
Commission trial: 9
Commission trial: 5
Omission trial: 3
Commission trial: 3
Commission trial: 1
Commission trial: 4
Commission trial: 9
Commission trial: 2
Commission trial: 5
Commission trial: 4
Commission trial: 7
Omission trial: 3
Commission trial: 3
Commission trial: 6
Commission trial: 1
Commission trial: 8
Commission trial: 8
Omission trial: 3
Commission trial: 3
Commission trial: 1
Commission trial: 5
Commission trial: 4
Commission trial: 2
Commission trial: 6
Commission trial: 9
Commission trial: 7
Commission trial: 5
Commission trial: 2
Commission trial: 1
Commission trial: 8
Commission trial: 9
Commission trial: 7
Commission trial: 6
Omission trial: 3
Commission trial: 3
Commission trial: 4
Commission trial: 1
Omission trial: 3
Commission trial: 3
Commission trial: 5
Commission trial: 2
Commission trial: 6
Commission trial: 4
Commission trial: 7
Commission trial: 8
Commission trial: 9
Commission trial: 4
Commission trial: 5
Commission trial: 8
Commission trial: 2
Commission trial: 6
Omission trial: 3
Commission trial: 3
Commission trial: 9
Commission trial: 7
Commission trial: 1
Commission trial: 8
Commission trial: 9
Commission trial: 4
Commission trial: 7
Commission trial: 6
Commission trial: 2
Omission trial: 3
Commission trial: 3
Commission trial: 1
Commission trial: 5
In most cases your Commission trial code is being run for thisNum == 3
Please could you show a screenshot of your code component containing print('commission trial',thisNum)
?
Also it looks like when you press a button the code is run multiple times before the next trial as if it is in Each Frame not End Routine.
Is pressing the button supposed to end the routine?
Each code component is in the End Routine. I just checked and the click response is not set to end the routine, I can change that though. I was only clicking once per number, but it looks like there were multiple inputs?
Here is the screenshot of the code component.
Please compare the tabs of your code with mine.
This is the code you provided. :
commission_error = 0 ommission_error = 0 if int(thisNum) == 3: print(âommission trialâ,thisNum) # Comission Error check if len(response.clicked_name) and response.clicked_name[0] == âButtonâ: commission_error = 1 print(âcommission errorâ, response.clicked_name[0]) else: print(âcommission trialâ,thisNum) # Omission Error check if len(response.clicked_name) > 0 and response.clicked_name[0] != âButtonâ: ommission_error = 1 print(âommission errorâ, response.clicked_name[0]) thisExp.addData(âcommission_errorsâ, commission_error) thisExp.addData(âommission_errorsâ, ommission_error)
I was receiving syntax errors and after adjusting for the errors this is what I was using:
Initialize error counters
commission_error = 0
omission_error = 0
Check if the current number is 3
if int(thisNum) == 3:
print(âOmission trial:â, thisNum)
Commission Error check
if len(response.clicked_name) > 0 and response.clicked_name[0] == âButtonâ:
commission_error = 1
print(âCommission error:â, response.clicked_name[0])
else:
print(âCommission trial:â, thisNum)
Omission Error check
if len(response.clicked_name) > 0 and response.clicked_name[0] != âButtonâ:
omission_error = 1
print(âOmission error:â, response.clicked_name[0])
Save data
thisExp.addData(âcommission_errorsâ, commission_error)
thisExp.addData(âomission_errorsâ, omission_error)
Please usePreformatted text
so I can see your tabs.
Iâm having a difficult time putting this in that preformatted text format