[solved] data from base_form
Hi again,
I used the item "form_base" to create a form with a question and 4 buttons - answers, the script goes as follows:
set rows "1;1;1;1;1;1;1;1;1"
set description "A generic form plug-in"
set spacing "25"
set cols "1;1;1;1;1;1;1;1"
set theme "plain"
set margins "150;100;50;100"
widget 0 0 8 2 label center="yes" text="What shape did you see?"
widget 0 6 2 2 button center="yes" text="[op1]" frame="yes" var="op1_response"
widget 2 6 2 2 button center="yes" text="[op2]" frame="yes" var="op2_response"
widget 4 6 2 2 button center="yes" text="[op3]" frame="yes" var="op3_response"
widget 6 6 2 2 button center="yes" text="[op4]" frame="yes" var="op4_response"
at first the variables were all var="response", that didn't work so I tried this, but I still can't find the variables in the data files. What is the right way to collect data from this item? I need to know what answer (button) the participant chose.
Thanks, Nagham
Comments
Hi Nagham,
When I try to run your form it works perfectly. The variables 'op1_response', 'op2_response', 'op3_response' and 'op4_response' appear as column headers in the .csv file, and contain the value 'yes' of the corresponding box was ticked, and the variable 'no' if the box was not ticked.
Are you sure you place your logger item after the form_base?
If the form_base variables really don't appear in your output file, perhaps you can try to log them manually like so:
Does this help? Please let us know if you have any further questions.
Best,
Lotje
Did you like my answer? Feel free to

Hi,
It is now working properly in this item but not in other custom made forms, and when I try to "Add custom variable" it appears in the list of variables in the logger item but not in the data file.
Also, Should I use the same logger throughout the whole experiment, or use multiple ones?
Thanks again,
Nagham
To be specific,
The items are 1) custom base_form and 2) Form Text Input, which response is not being recorded.
Actually i fixed the first (the custom) manually as you said, only the second one is a problem now.
By the way, what does NA in the data file mean? Because I do see the name of the variable as a header in the data file but it doesn't contain a value, only "NA".
And what units is the time logged in? it can't be ms because it has values like:
6167826
6171770
6175396
6179439
Sorry about all the separate messages, and thanks again.
Hi Nagham,
Yes, in general I would advise to use one logger item for your whole experiment.
By default, all variables that OpenSesame knows of are logged, even if they are not yet defined when the logger is called. Such missing values are logged as ‘NA’.
For more info about both of these issues, please see:
Response variables, such as 'response_time', are in ms. Variables such as 'time_form_base' are timestamps in experiment time of the last call of the item 'form_base'. So, a time stamp of 6167826 would mean that, on a particular trial, this item was called 6167826 ms after you launched your experiment.
Would it be possible to upload your experimental script on pastebin, such that we can figure out why some of your variables are not logged? Or does appending the same logger item instead of different ones already solve the problem?
Best,
Lotje
Did you like my answer? Feel free to

Hi Lotje,
I understand that the variable which collects the time from the point where an option to respond is given to the point where it's actually given is "response_tima_variablename", I followed this and made a custom new variable to each of the items I want the time for:
as you can see in the picture.
In the data file, though, I don't get any values to these variables- it's NA (as you can see in the second picture).
My questions are:
Thank you,
Nagham
Hi Nagham,
Could you perhaps put your experimental code on pastebin? Otherwise I'm afraid I can't understand what's going wrong.
To share the experimental code:
Best,
Lotje
Did you like my answer? Feel free to

The pastbin.com and gist.github.com show this notice:
"Page Not Found
The page you were looking for could not be found."
Sorry, now they should work!
Did you like my answer? Feel free to

And also: Come on, surely you could have found out that the addresses are http://pastebin.com and http://gist.github.com.
Check out SigmundAI.eu for our OpenSesame AI assistant!
Oh! awkward hh
I just clicked on the link in Lotje's message.
Yes it works now I'll upload it in a sec.
Here's the link: http://pastebin.com/uF5XkkNq
Some of the variables' contents are in hebrew though.
.
Hi Nagham,
Firstly, the fact that the response variables 'response_c_op1' to 'response_c_op5' do not have a value in your output file is because of the following:
In your Image_Que loop you set the number of cycles to 8 and the number of repetitions to .20. Since 8 * .20 is 1.60, which is rounded to 1, the corresponding sequence (which you called 'loop1') is ran only once. As a consequence, the run-if statement
[count_loop1]==7will never be met, and N8 and R8 are never run.Response times are only determined for variables collected with response items (such as a keyboard_response item or a mouse_item). If you want to determine response times for other response variables (such as text input from a form), you will have to first calculate and set it yourself in an inline_script item. After setting the new variable (by using the
exp.set()function described in the link below) it will automatically be logged by the logger item (you can check the "Automatically detect ..." box and don't have to add them manually).You can calculate and set the response times by appending an inline_script item immediately after a given form item, and put something like the following code in its Run phase tab:
For more info about setting and getting variables, see:
The text input variable ('response_Confidence') is not logged because you should explicitly give the name of the to-be-logged experimental variable to the text_input widget, even though you already did so in the 'Response variable' box in the GUI. So, in the editor of your 'Confidence' item, change:
into:
I hope this helps!
Good luck!
Lotje
Did you like my answer? Feel free to

Thank you very much for your patience and help.
It works now
Nagham