How to show segmented sentences/ How to add wh-comprehension Qs?

Thank you :pray:

sorry, I did not understand the following sentence

by beginning routine you mean the tabs when writing codes?

would you please clarify the sentence?

Sorry, I meant that you could insert a copy of the Ending routine after the WelcomeScreen routine to test it. However, the issue is 99% your spreadsheet.

1 Like

Dear @wakecarter

Aha!

if I write the goodbye message in my spreadsheet, will it not cause a problem?
when I write the goodbye message in my spreadsheet, it really appears on the screen.
Screenshot (47)

Thanks

I’m sorry but that isn’t at all what I suggested.

1 Like

I’m sorry for not following what you said.
I inserted a copy of the Ending routine after the WelcomeScreen routine; it worked.

When I insert the Ending routine after the outer loop, it does not appear on the screen.

I think your experiment is crashing with the error AttributeError: ‘NoneType’ object has no attribute ‘split’ because of an extra row in your conditions file. Try saving it as a CSV and then opening it on Notepad to check this.

1 Like

You are very right. It turned out that I used extra spaces. Thank you :pray:
Now the Ending routine appears.

Dear @wakecarter
Hi. I hope you are having a great day.

I decided to add True/False comprehension questions to check if participants are attentive to the task.
Would you please tell me how I can add T/F questions? I want the computer to automatically compute participants’ correct and incorrect responses.

Also, I want the word ERROR appears on screen if participants answer questions incorrectly.

I appreciate your help in advance

For True/False statements you could put the question in one column in your spreadsheet and t or f in another (e.g. called corrAns or Answer) which you add to the keyboard component. Then add a feedback routine with a text component (ERROR) and a code component with if key_resp.corr == 1: continueRoutine = False in Begin Routine

1 Like

Thank you.
I added the columns in my spreadsheet.

Now the problem is idk where I should put the text component (ERROR) and the code component in the flow. I thought the Comprehension routine would be a good place:

But then I noticed that the text component ERROR is always present, even if somebody answers correctly:

Add a new routine called feedback that goes after comprehension.

1 Like

I greatly appreciate your help

I am sorry for not paying attention.

Ok, I added the new routine, the text, and the code component.

The problem is when I answer questions correctly, the ERROR message still appears.

The first sentence is Everyone knew that Meredith read every play despite her busy schedule.

After this sentence, the comprehension question: Did Meredith perform a play? appears.

Participants should press N which stands for No. But the ERROR message appears, regardless of their correct or incorrect responses.

I recorded a video so that you can help me.

Thanks

Please could you upload your psyexp file?

Your corrAns column should have lower case y and n

1 Like

Sure

My Experiment.psyexp (34.4 KB)
stimuli_1.csv (227 Bytes)

Thanks

Aha

Now my corrAns have lower case.

I ran the experiment again, the ERROR message appeared.

In Conprehension your keyboard component is called response_keys so you should use response_keys.corr not key_resp.corr in the code

In the data tab of the keyboard component you need to tick Store correct and then put $corrAns as the correct answer.

1 Like

I’m really grateful for your help. :pray:

Dear @wakecarter
Hi again. I am sorry for asking too many questions.

In my spreadsheet, each sentence has only one row. As can be seen in the following picture:

In the data filed created by Psychopy, each sentence has multiple rows. This is very good because I can see in which region participants exhibit difficulty.

Do you think I will face a problem if I want to run a statistical analysis in SPSS? Because each item has multiple rows.

Also, if participants respond a question correctly, multiple 1 is shown for one sentence as can be seen in the following picture:

Many thanks

The response score is in column AB so analysis of scores in SPSS will ignore the blank rows.

1 Like