Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

[solved] data from base_form

edited June 2013 in OpenSesame

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

  • edited 9:49PM

    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.

    image

    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:

    image

    Does this help? Please let us know if you have any further questions.

    Best,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 9:49PM

    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

  • edited June 2013

    To be specific,
    The items are 1) custom base_form and 2) Form Text Input, which response is not being recorded.

  • edited 9:49PM

    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".

  • edited 9:49PM

    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.

  • edited June 2013

    Hi Nagham,

    Should I use the same logger throughout the whole experiment, or use multiple ones?

    Yes, in general I would advise to use one logger item for your whole experiment.

    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".

    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:

    And what units is the time logged in?

    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 Buy Me A Coffee :)

  • edited June 2013

    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:

    1. HowDidYouKnow
    2. Confidence
    3. Rel_question
    4. Non_Rel_que

    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:

    1. Do I have to write the actual command for collecting the time data in each of the items??
    2. I don't get the text response of the 'text_input_form' item that's called 'Confidence', it is also NA as you can see in the data picture, although I did write it down as the response variable 'response_Confidence'.

    Thank you,

    Nagham

  • edited June 2013

    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:

    • Open the "General properties" tab, click "Script editor" and copy the whole script,
    • go to http://pastebin.com or https://gist.github.com, upload your script there (simply paste and submit)
    • and provide us with the resulting URL that appears in your address bar

    Best,

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 9:49PM

    The pastbin.com and gist.github.com show this notice:
    "Page Not Found
    The page you were looking for could not be found."

  • edited 9:49PM

    Sorry, now they should work! :)

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 9:49PM

    The pastbin.com and gist.github.com show this notice: "Page Not Found The page you were looking for could not be found."

    And also: Come on, surely you could have found out that the addresses are http://pastebin.com and http://gist.github.com.

  • edited 9:49PM

    Oh! awkward hh
    I just clicked on the link in Lotje's message.
    Yes it works now I'll upload it in a sec.

  • edited 9:49PM

    Here's the link: http://pastebin.com/uF5XkkNq
    Some of the variables' contents are in hebrew though.

  • edited June 2013

    .

  • edited June 2013

    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]==7 will never be met, and N8 and R8 are never run.

    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.

    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:

    # Determine the starting time of the form item:
    starting_time = self.get("time_Rel_question")
    
    # Determine the current time:
    current_time = self.time()
    
    # The time it took to complete the form base is the 
    # difference score between the two:
    my_rt = current_time - starting_time
    
    # Set the new variable for future use in the
    # GUI (notably, the logger item):
    exp.set("my_rt", my_rt)
    

    For more info about setting and getting variables, see:

    I don't get the text response of the 'text_input_form' item that's called 'Confidence'

    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:

    widget 4 2 1 1 text_input focus="yes" stub="" return_accepts="yes"
    

    into:

    widget 4 2 1 1 text_input focus="yes" stub="" return_accepts="yes" var="[form_var]"
    

    I hope this helps!

    Good luck!

    Lotje

    Did you like my answer? Feel free to Buy Me A Coffee :)

  • edited 9:49PM

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

    Nagham

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games