URL of experiment:
Description of the problem: Hello everyone! I built an experiment on PsychoPy, then I run it by using Pavlovia. Participants had to write 24 sentences (one for each trial). My data consist in their linguistic output (the sentences they wrote) and the relative 24 response times (the time used to write each of the single sentences). The output is fine and readable. The problem is that some of the response times are in the .csv file are written between two square bracket. An example is the following:
,return,35.094,po odo po eritmo fertek
,return,31.066,[““return””]“,[15.569999999999993],“pa ogora po tromo agtal
,[”“return””]",[16.966000000000008],"po eritmo depan pa ikora tuki
,return,43.798,lampat pa ciaka po karoto?
Can someone explain what the sqare bracket mean?
I am an absolute beginner. Thanks in advance for your help!
Greg
The square brackets indicate a list. If you set a keyboard component to record all responses and it isn’t set to end the routine then you can get multiple keys and reaction times in the cell. If you have it set to end the routine but record all keys then you will get a list but it will only ever have one response in it (unless perhaps two keys are pressed simultaneously). Recording first key and last key mean the same thing if the keyboard response ends the routine.
Thank you for your answer! Actually, I have set “all keys”.
May be it is better to explain which the task is. Participants get a stimulus, then they have to write a sentence. After having wrote the sentence, they click “return”, then they get a grey screen. By clicking again “return” they get a new stimulus. They have a lot of trials like this, but there are no loops. Chronometer is supposed to measure the time needed for writing.
I noticed that square bracket are present for the response times of the trials number 1, number 8 and number 9. I think this is somehow related with the fact that before number 1, and between number 7 and 8 there is an additional screen with an explanation of the task.
If square brackets indicate a list, what does this imply? Was the time well recorded? Is the time between bracket the time needed to write the sentence of the correspondent trial?
Hello @Greg_1997
It seems as if you have program your experiment not in “PsychoPy style”.
The RT was well recorded regardless whether it is a list or an integer.
We can only tell you if you show us how you implemented the experiment.
1 Like
Hello Jeans, thank you for your help.
I am sharing my script with you and a file Excel containing the data I got from Participant_1. I am not sure this can help you to answer my questions, though. Any help will be appreciated!
Best,
Greg
(attachments)
Esperimento_psychopy_aggiornato_lastrun (1).py (262 KB)
Participant_1_Esperimento_psychopy_definitivo_2025-01-01_19h26.11.409.csv (2.49 KB)
You have shared a Python file. Do you have a psyexp Builder file?
Something I would like to mention is that in the .csv file I shared in the previous email the last response time appears not near the sentence it is referring to. Instead, that time appears near the name of the participant, so I cannot understand if sentence_X is ever one line above the related response time following a schema such as:
time A - sentence B
time B - sentence C
time C - sentence D
and so on.
This is the second reason why I cannot interpret my results.
I am sorry for the mess, but this is my very first time running an experiment. Any help will be really appreciated.
Best,
Greg
Hello @Greg_1997
I have had a quick look at your programme. Am I right in assuming that you have programmed a routine for each sentence you present? This is a very inefficient way of programming a PsychoPy experiment. What you would normally do is create a condition file (*.xlsx, csv) containing your stimuli. The column header represents a variable that you can refer to in the PsychoPy components. You use a loop to iterate over your stimuli in either sequential or random order (or staircase).
I assume that this will simplify your experiment a lot. All the F_x routines would become one routine F. The advantage of this approach is that you get the responses in 1 column in your results file instead of 24 columns. See Wakefield's Daily Tips - #7 by wakecarter. I would try to simplify the experiment.
Best wishes Jens
1 Like
Thank you, Jens! Next time I will implement the experiment as you suggested. Unfortunately, I had to learn how to use PsychoPy by my own.
The point is that I already collected my data and I need to interpret it correctly. Can you suggest how to read them (even though they are messy)? If you look at the .csv file and at the .psyexp file, can you tell what response time corresponds to what single linguistic output?
This is really important to me because this is for my thesis. If could have a “schema” to interpret my data, I could manage to read them all.
Thank you in Advance and best regards,
Gregorio Gambato
Hello
The top row gives you the component name, e.g. key_resp.keys contains the name of the key that was pressed. The key_resp.keys component in the routine is probably in your first routine. key_resp.rt contains the RT for key_resp.keys. Similarly, INIZIO.keys contains the key that was pressed, while INIZIO.rt contains the RT, and so on.
I do not know where the multiple " come from? Did you open the file in Excel and save it? Do you have a copy that you never opened with Excel? In this file, all keys and RT should be in one row, columns separated by commas and no “. The brackets [”“”“return”“”"] show that this key is actually a list, and that it has only one element. The same applies to [0.6421999999880654]. It is a list with one element.
I took the result file you uploaded, deleted all ", [, ], and deleted all line breaks except the one that separates the column header from the data, so that the data is all on one line, see below. At least this editing will align all the RTs with a column header indicating a RT. If you use a text editor such as notepad or notepad++, you can replace all the [, ], " in all the files at once. notepad++ also allows you to replace the line breaks.
Participant_1_Esperimento_psychopy_definitivo_2025-01-01_19h26.11.409.csv (2.4 KB)
Best wishes Jens
1 Like
Hello Jens,
Thank you very much! This is very helpful!
The file of participant_1 I shared with you has been imported with some adjustments in Excel and then it has been saved.
I am now attaching here the same file with the data of the same participant_1 as it was when I downloaded my results from Pavlovia website. However, in this file as well the data are not in the first row.
If you can tell me something more about what you can see/induce by looking at that file, it will be appreciated!
Best wishes,
Greg
Actually, I have just noticed that the way it appears from the email is the same as the one I shared previously. I see it differently. I am sharing a screenshot of how it appears on my computer.
Hallo @Greg_1997
Do not use Excel to view and edit the file. Use a texteditor.
If you compare both files, they only look different but the information in the relevant columns is the same.
Best Wishes Jens
Thank you very much, Jens! Do you have a text editor to recommend?
Best wishes,
Gregorio Gambato
Hello @Greg_1997
on a Win11-PC notepad++ Downloads | Notepad++. That is what we use here at the institute.
Best wishes Jens
Thank you, Jens. I really appreciated your help.
Best regards,
Gregorio Gambato
Good afternoon, Jens. I have just a quick question on the text editor to use. I have a (quite old) Mac. Is Notepad++ a good choice also if I work with a Mac?
Best,
Gregorio
Hi
I have no idea. I work on Windows.
Best wishes Jens
BBEdit (https://www.barebones.com/products/bbedit/ you can just get the free download it works fine for this) or Pulsar-edit (https://pulsar-edit.dev/) are better options on Mac.