required answers


Author
Message
la_1985
la_1985
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 7, Visits: 42
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.


la_1985
la_1985
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 7, Visits: 42
Dave - 4/5/2021
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.

Thank you for your reply! In my experiment, I have 245 words that will be shown one at a time, and for each i would need the 3 questions I have described to you with the sliders and checkbox. What would be the best way to go about coding it efficiently ? 

thanks so much,
Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
la_1985 - 4/6/2021
Dave - 4/5/2021
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.

Thank you for your reply! In my experiment, I have 245 words that will be shown one at a time, and for each i would need the 3 questions I have described to you with the sliders and checkbox. What would be the best way to go about coding it efficiently ? 

thanks so much,

The closest you can get to the way you want things to work without setting up hundreds of separate slider elements is something along the below lines:

<trial selectword>
/ ontrialbegin = [
    values.trialnum += 1;
    values.worditem = list.worditems.nextindex;
    values.q1default = 0;
    values.q2default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
    surveypage.trials;
]
</trial>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = 0
/ q2default = 0
</values>

// 4 words in this example
<list worditems>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
    values.q1default = slider.q1.response;
    values.q2default = slider.q2.response;
    values.word = text.words.currentitem;
]
/ stimulusframes = [1=words]
/ questions = [
1 = slider.q1;
2 = slider.q2;
3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
    if (!checkboxes.unknown.checked.1 && (slider.q1.response == 0 || slider.q2.response == 0)){
        surveypage.trials;
    } else {
        trial.recorddata;
    }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = " Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-4=selectword]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode values.trialnum values.worditem values.word slider.q1.response slider.q2.response checkboxes.unknown.response surveypage.trials.latency)
/ separatefiles = true
</data>

la_1985
la_1985
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 7, Visits: 42
Dave - 4/6/2021
la_1985 - 4/6/2021
Dave - 4/5/2021
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.

Thank you for your reply! In my experiment, I have 245 words that will be shown one at a time, and for each i would need the 3 questions I have described to you with the sliders and checkbox. What would be the best way to go about coding it efficiently ? 

thanks so much,

The closest you can get to the way you want things to work without setting up hundreds of separate slider elements is something along the below lines:

<trial selectword>
/ ontrialbegin = [
    values.trialnum += 1;
    values.worditem = list.worditems.nextindex;
    values.q1default = 0;
    values.q2default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
    surveypage.trials;
]
</trial>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = 0
/ q2default = 0
</values>

// 4 words in this example
<list worditems>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
    values.q1default = slider.q1.response;
    values.q2default = slider.q2.response;
    values.word = text.words.currentitem;
]
/ stimulusframes = [1=words]
/ questions = [
1 = slider.q1;
2 = slider.q2;
3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
    if (!checkboxes.unknown.checked.1 && (slider.q1.response == 0 || slider.q2.response == 0)){
        surveypage.trials;
    } else {
        trial.recorddata;
    }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = " Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-4=selectword]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode values.trialnum values.worditem values.word slider.q1.response slider.q2.response checkboxes.unknown.response surveypage.trials.latency)
/ separatefiles = true
</data>

Wonderful, I actually incorporated this into my script and it works very well! We have 245 trials, and every 40 trials, we add a filler trial (just to make sure they are still attentive to the task). So, i used the same format, as well to code the filler trials (we have 5 words that are selected at random). I ran the experiment and it works, so thank you very much for your help!
When I look at the recorded response (I have attached the recorded responses here below) It seems that it is still counting the trials for the words, when a filler word is present. Is there a possibility to make sure that it stops counting or enumerating the trials of the words while a filler word is presented, and picks it right up where it left off after the filler trial? This is important as i want to make sure that all my words will be presented in the experiment. 

Thank you so very much, your response was really helpful,
Liz

Here is the section I have added to the script you sent me:

<trial selectword_fillers>
/ ontrialbegin = [
  values.trialnum_fillers += 1;
  values.worditem_fillers = list.worditems_fillers.nextindex;
  values.q1_fillers_default = 0;
  values.q2_fillers_default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
  surveypage.trials_fillers;
]
</trial>
<list worditems_fillers>
/ poolsize = 5
</list>

<surveypage trials_fillers>
/ ontrialend = [
  values.q1_fillers_default = slider.q1_fillers.response;
  values.q2_fillers_default = slider.q2_fillers.response;
  values.word_fillers = text.word_fillers.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(word_fillers)]
/ questions = [
  1 = slider.q1_fillers;
  2 = slider.q2_fillers;
  3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
  if (!checkboxes.unknown.checked.1 && (slider.q1_fillers.response == 0 || slider.q2_fillers.response == 0)){
   surveypage.trials_fillers;
  } else {
   trial.recorddata;
  }
]
</surveypage>

<text word_fillers>
/ items = (
"Water",
"Rabbit",
"Banana",
"Giraffe",
"Perfume")
/ select = values.worditem_fillers
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1_fillers>
/caption = "  Question 1. How related is the word to the color red?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2_fillers>
/caption = "Question 2. What intensity of the color red is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-40=selectword; 41=selectword_fillers; 42-81=selectword; 82=selectword_fillers; 83-122=selectword; 123=selectword_fillers; 124-163=selectword; 164=selectword_fillers; 165-204=selectword; 205=selectword_fillers; 206-245=selectword]
</block>
Attachments
Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
la_1985 - 4/6/2021
Dave - 4/6/2021
la_1985 - 4/6/2021
Dave - 4/5/2021
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.

Thank you for your reply! In my experiment, I have 245 words that will be shown one at a time, and for each i would need the 3 questions I have described to you with the sliders and checkbox. What would be the best way to go about coding it efficiently ? 

thanks so much,

The closest you can get to the way you want things to work without setting up hundreds of separate slider elements is something along the below lines:

<trial selectword>
/ ontrialbegin = [
    values.trialnum += 1;
    values.worditem = list.worditems.nextindex;
    values.q1default = 0;
    values.q2default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
    surveypage.trials;
]
</trial>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = 0
/ q2default = 0
</values>

// 4 words in this example
<list worditems>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
    values.q1default = slider.q1.response;
    values.q2default = slider.q2.response;
    values.word = text.words.currentitem;
]
/ stimulusframes = [1=words]
/ questions = [
1 = slider.q1;
2 = slider.q2;
3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
    if (!checkboxes.unknown.checked.1 && (slider.q1.response == 0 || slider.q2.response == 0)){
        surveypage.trials;
    } else {
        trial.recorddata;
    }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = " Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-4=selectword]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode values.trialnum values.worditem values.word slider.q1.response slider.q2.response checkboxes.unknown.response surveypage.trials.latency)
/ separatefiles = true
</data>

Wonderful, I actually incorporated this into my script and it works very well! We have 245 trials, and every 40 trials, we add a filler trial (just to make sure they are still attentive to the task). So, i used the same format, as well to code the filler trials (we have 5 words that are selected at random). I ran the experiment and it works, so thank you very much for your help!
When I look at the recorded response (I have attached the recorded responses here below) It seems that it is still counting the trials for the words, when a filler word is present. Is there a possibility to make sure that it stops counting or enumerating the trials of the words while a filler word is presented, and picks it right up where it left off after the filler trial? This is important as i want to make sure that all my words will be presented in the experiment. 

Thank you so very much, your response was really helpful,
Liz

Here is the section I have added to the script you sent me:

<trial selectword_fillers>
/ ontrialbegin = [
  values.trialnum_fillers += 1;
  values.worditem_fillers = list.worditems_fillers.nextindex;
  values.q1_fillers_default = 0;
  values.q2_fillers_default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
  surveypage.trials_fillers;
]
</trial>
<list worditems_fillers>
/ poolsize = 5
</list>

<surveypage trials_fillers>
/ ontrialend = [
  values.q1_fillers_default = slider.q1_fillers.response;
  values.q2_fillers_default = slider.q2_fillers.response;
  values.word_fillers = text.word_fillers.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(word_fillers)]
/ questions = [
  1 = slider.q1_fillers;
  2 = slider.q2_fillers;
  3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
  if (!checkboxes.unknown.checked.1 && (slider.q1_fillers.response == 0 || slider.q2_fillers.response == 0)){
   surveypage.trials_fillers;
  } else {
   trial.recorddata;
  }
]
</surveypage>

<text word_fillers>
/ items = (
"Water",
"Rabbit",
"Banana",
"Giraffe",
"Perfume")
/ select = values.worditem_fillers
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1_fillers>
/caption = "  Question 1. How related is the word to the color red?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2_fillers>
/caption = "Question 2. What intensity of the color red is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-40=selectword; 41=selectword_fillers; 42-81=selectword; 82=selectword_fillers; 83-122=selectword; 123=selectword_fillers; 124-163=selectword; 164=selectword_fillers; 165-204=selectword; 205=selectword_fillers; 206-245=selectword]
</block>

A value retains what you set it to until you set it to something else. Just do that.
la_1985
la_1985
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 7, Visits: 42
Dave - 4/6/2021
la_1985 - 4/6/2021
Dave - 4/6/2021
la_1985 - 4/6/2021
Dave - 4/5/2021
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.

Thank you for your reply! In my experiment, I have 245 words that will be shown one at a time, and for each i would need the 3 questions I have described to you with the sliders and checkbox. What would be the best way to go about coding it efficiently ? 

thanks so much,

The closest you can get to the way you want things to work without setting up hundreds of separate slider elements is something along the below lines:

<trial selectword>
/ ontrialbegin = [
    values.trialnum += 1;
    values.worditem = list.worditems.nextindex;
    values.q1default = 0;
    values.q2default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
    surveypage.trials;
]
</trial>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = 0
/ q2default = 0
</values>

// 4 words in this example
<list worditems>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
    values.q1default = slider.q1.response;
    values.q2default = slider.q2.response;
    values.word = text.words.currentitem;
]
/ stimulusframes = [1=words]
/ questions = [
1 = slider.q1;
2 = slider.q2;
3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
    if (!checkboxes.unknown.checked.1 && (slider.q1.response == 0 || slider.q2.response == 0)){
        surveypage.trials;
    } else {
        trial.recorddata;
    }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = " Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-4=selectword]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode values.trialnum values.worditem values.word slider.q1.response slider.q2.response checkboxes.unknown.response surveypage.trials.latency)
/ separatefiles = true
</data>

Wonderful, I actually incorporated this into my script and it works very well! We have 245 trials, and every 40 trials, we add a filler trial (just to make sure they are still attentive to the task). So, i used the same format, as well to code the filler trials (we have 5 words that are selected at random). I ran the experiment and it works, so thank you very much for your help!
When I look at the recorded response (I have attached the recorded responses here below) It seems that it is still counting the trials for the words, when a filler word is present. Is there a possibility to make sure that it stops counting or enumerating the trials of the words while a filler word is presented, and picks it right up where it left off after the filler trial? This is important as i want to make sure that all my words will be presented in the experiment. 

Thank you so very much, your response was really helpful,
Liz

Here is the section I have added to the script you sent me:

<trial selectword_fillers>
/ ontrialbegin = [
  values.trialnum_fillers += 1;
  values.worditem_fillers = list.worditems_fillers.nextindex;
  values.q1_fillers_default = 0;
  values.q2_fillers_default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
  surveypage.trials_fillers;
]
</trial>
<list worditems_fillers>
/ poolsize = 5
</list>

<surveypage trials_fillers>
/ ontrialend = [
  values.q1_fillers_default = slider.q1_fillers.response;
  values.q2_fillers_default = slider.q2_fillers.response;
  values.word_fillers = text.word_fillers.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(word_fillers)]
/ questions = [
  1 = slider.q1_fillers;
  2 = slider.q2_fillers;
  3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
  if (!checkboxes.unknown.checked.1 && (slider.q1_fillers.response == 0 || slider.q2_fillers.response == 0)){
   surveypage.trials_fillers;
  } else {
   trial.recorddata;
  }
]
</surveypage>

<text word_fillers>
/ items = (
"Water",
"Rabbit",
"Banana",
"Giraffe",
"Perfume")
/ select = values.worditem_fillers
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1_fillers>
/caption = "  Question 1. How related is the word to the color red?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2_fillers>
/caption = "Question 2. What intensity of the color red is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-40=selectword; 41=selectword_fillers; 42-81=selectword; 82=selectword_fillers; 83-122=selectword; 123=selectword_fillers; 124-163=selectword; 164=selectword_fillers; 165-204=selectword; 205=selectword_fillers; 206-245=selectword]
</block>

A value retains what you set it to until you set it to something else. Just do that.

Thank you so much Dave, this was very helpful!
I was asked to change the slider to radiobuttons ( i tried it) and unfortunately, the previous response gets carried over into the next question. What would be the best way to have it start without any radiobutton selection at the beginning of each trial.It seems that the radiobutton element changes quite a bit the default setting and I am not sure how to fix it. I tried to code it as "clearscreen" instead of 0 but it is not working.

Also how can I incorporate my previous concern in regards to having both question 1 and 2 as required, but if the participant choses the "I don't know" checkbox, they are not longer required and the participant can advance to the next trial. As it is operating now, none of the questions are required to advance to the next trial.

Thank you so much for your help,


Here is my script: 

<trial selectword>
/ ontrialbegin = [
  values.trialnum += 1;
  values.worditem = list.worditem.nextindex;
  values.q1default = clearscreen;
  values.q2default = clearscreen]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [surveypage.trials;]
</trial>

<list worditem>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
  values.q1default = radiobuttons.q1.response;
  values.q2default = radiobuttons.q2.response;
  values.word = text.words.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
  1 = radiobuttons.q1;
  2 = radiobuttons.q2;
  3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
  if (!checkboxes.unknown.checked.1 && (radiobuttons.q1.response == clearscreen || radiobuttons.q2.response == clearscreen)){
   surveypage.trials;
  } else {
   trial.recorddata;
  }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<radiobuttons q1>
/caption = "   How related is the word to the sensation of heat pain?"
/options=("Unrelated","Somewhat unrelated", "Somewhat related","Related")
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = (values.q1default)
/orientation=horizontalequal
/optionvalues=("1","2","3","4")
</radiobuttons>

<radiobuttons q2>
/caption = "What intensity of heat pain is the word most related to?"
/options=("Unrelated", "Mild", "Intense")
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = (values.q2default)
/position= (20%, 60%)
/orientation=horizontalequal
/optionvalues=("1","2","3")
</radiobuttons>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = clearscreen
/ q2default = clearscreen
</values>

<block trials>
/trials=[1-4=selectword]
</block>

Dave
Dave
Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)Supreme Being (921K reputation)
Group: Administrators
Posts: 11K, Visits: 67K
la_1985 - 4/8/2021
Dave - 4/6/2021
la_1985 - 4/6/2021
Dave - 4/6/2021
la_1985 - 4/6/2021
Dave - 4/5/2021
la_1985 - 4/5/2021
Hi, 

I need some advice regarding my script using Inquisit 6. I have a list of words to which a participant will answer 3 related questions. The first two questions are in the format of slider elements and the third question is in the format of a checkbox. These elements are called in a surveypage, which acts as a trial within a block element. Then, the experiment is ran using these blocks. I have two concerns related to my script and I would very much appreciate your help. 

1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

Here is my script, any help with this would be greatly appreciated,

Thanks,
Liz


<surveypage trials>
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
    1 = slider.q1;
    2 = slider.q2;
    3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
</surveypage>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = "   Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=true
/position= (16%, 30%)
/defaultresponse = 0
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=true
/ defaultresponse = (0)
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = (false)
</checkboxes>

<block trials>
/trials=[1-3=trials]
</block>

> 1) I would like the response to each question/slider (questions 1 &2) to be required. As such I have used the /required=true option in the slider element. However, this only works for the first trial in the block element and not for the 2 consecutive trials. I want to be able to code it such that each question of each trial is required.

If you repeatedly show the same slider element, only its first instance will honor the /required setting. Do not re-use the same slider element.

> 2) My third question is really a checkbox with the caption "I don't know this word" in case the participant is not familiar with the word presented. I have coded this element as /required=false. However, i would like to code it such that if it is checked, question 1 and question 2 are not required to be answered.

This is not possible, I'm afraid.

Thank you for your reply! In my experiment, I have 245 words that will be shown one at a time, and for each i would need the 3 questions I have described to you with the sliders and checkbox. What would be the best way to go about coding it efficiently ? 

thanks so much,

The closest you can get to the way you want things to work without setting up hundreds of separate slider elements is something along the below lines:

<trial selectword>
/ ontrialbegin = [
    values.trialnum += 1;
    values.worditem = list.worditems.nextindex;
    values.q1default = 0;
    values.q2default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
    surveypage.trials;
]
</trial>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = 0
/ q2default = 0
</values>

// 4 words in this example
<list worditems>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
    values.q1default = slider.q1.response;
    values.q2default = slider.q2.response;
    values.word = text.words.currentitem;
]
/ stimulusframes = [1=words]
/ questions = [
1 = slider.q1;
2 = slider.q2;
3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
    if (!checkboxes.unknown.checked.1 && (slider.q1.response == 0 || slider.q2.response == 0)){
        surveypage.trials;
    } else {
        trial.recorddata;
    }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1>
/caption = " Question 1. How related is the word to the sensation of hot pain?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2>
/caption = "Question 2. What intensity of hot pain is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-4=selectword]
</block>

<data>
/ columns = (date time subject group session blocknum blockcode values.trialnum values.worditem values.word slider.q1.response slider.q2.response checkboxes.unknown.response surveypage.trials.latency)
/ separatefiles = true
</data>

Wonderful, I actually incorporated this into my script and it works very well! We have 245 trials, and every 40 trials, we add a filler trial (just to make sure they are still attentive to the task). So, i used the same format, as well to code the filler trials (we have 5 words that are selected at random). I ran the experiment and it works, so thank you very much for your help!
When I look at the recorded response (I have attached the recorded responses here below) It seems that it is still counting the trials for the words, when a filler word is present. Is there a possibility to make sure that it stops counting or enumerating the trials of the words while a filler word is presented, and picks it right up where it left off after the filler trial? This is important as i want to make sure that all my words will be presented in the experiment. 

Thank you so very much, your response was really helpful,
Liz

Here is the section I have added to the script you sent me:

<trial selectword_fillers>
/ ontrialbegin = [
  values.trialnum_fillers += 1;
  values.worditem_fillers = list.worditems_fillers.nextindex;
  values.q1_fillers_default = 0;
  values.q2_fillers_default = 0;
]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [
  surveypage.trials_fillers;
]
</trial>
<list worditems_fillers>
/ poolsize = 5
</list>

<surveypage trials_fillers>
/ ontrialend = [
  values.q1_fillers_default = slider.q1_fillers.response;
  values.q2_fillers_default = slider.q2_fillers.response;
  values.word_fillers = text.word_fillers.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(word_fillers)]
/ questions = [
  1 = slider.q1_fillers;
  2 = slider.q2_fillers;
  3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
  if (!checkboxes.unknown.checked.1 && (slider.q1_fillers.response == 0 || slider.q2_fillers.response == 0)){
   surveypage.trials_fillers;
  } else {
   trial.recorddata;
  }
]
</surveypage>

<text word_fillers>
/ items = (
"Water",
"Rabbit",
"Banana",
"Giraffe",
"Perfume")
/ select = values.worditem_fillers
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<slider q1_fillers>
/caption = "  Question 1. How related is the word to the color red?"
/labels=(" ","Unrelated","Somewhat unrelated", "Somewhat related","Related")
/range=(0,4)
/slidersize=(65%, 10%)
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = values.q1default
</slider>

<slider q2_fillers>
/caption = "Question 2. What intensity of the color red is the word most related to?"
/labels=(" ","Unrelated", "Mild", "Intense")
/range=(0,3)
/slidersize=(65%, 10%)
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = values.q2default
/position= (20%, 60%)
</slider>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<block trials>
/trials=[1-40=selectword; 41=selectword_fillers; 42-81=selectword; 82=selectword_fillers; 83-122=selectword; 123=selectword_fillers; 124-163=selectword; 164=selectword_fillers; 165-204=selectword; 205=selectword_fillers; 206-245=selectword]
</block>

A value retains what you set it to until you set it to something else. Just do that.

Thank you so much Dave, this was very helpful!
I was asked to change the slider to radiobuttons ( i tried it) and unfortunately, the previous response gets carried over into the next question. What would be the best way to have it start without any radiobutton selection at the beginning of each trial.It seems that the radiobutton element changes quite a bit the default setting and I am not sure how to fix it. I tried to code it as "clearscreen" instead of 0 but it is not working.

Also how can I incorporate my previous concern in regards to having both question 1 and 2 as required, but if the participant choses the "I don't know" checkbox, they are not longer required and the participant can advance to the next trial. As it is operating now, none of the questions are required to advance to the next trial.

Thank you so much for your help,


Here is my script: 

<trial selectword>
/ ontrialbegin = [
  values.trialnum += 1;
  values.worditem = list.worditem.nextindex;
  values.q1default = clearscreen;
  values.q2default = clearscreen]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [surveypage.trials;]
</trial>

<list worditem>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
  values.q1default = radiobuttons.q1.response;
  values.q2default = radiobuttons.q2.response;
  values.word = text.words.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
  1 = radiobuttons.q1;
  2 = radiobuttons.q2;
  3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
  if (!checkboxes.unknown.checked.1 && (radiobuttons.q1.response == clearscreen || radiobuttons.q2.response == clearscreen)){
   surveypage.trials;
  } else {
   trial.recorddata;
  }
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<radiobuttons q1>
/caption = "   How related is the word to the sensation of heat pain?"
/options=("Unrelated","Somewhat unrelated", "Somewhat related","Related")
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = (values.q1default)
/orientation=horizontalequal
/optionvalues=("1","2","3","4")
</radiobuttons>

<radiobuttons q2>
/caption = "What intensity of heat pain is the word most related to?"
/options=("Unrelated", "Mild", "Intense")
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = (values.q2default)
/position= (20%, 60%)
/orientation=horizontalequal
/optionvalues=("1","2","3")
</radiobuttons>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = clearscreen
/ q2default = clearscreen
</values>

<block trials>
/trials=[1-4=selectword]
</block>

<trial selectword>
/ ontrialbegin = [
values.trialnum += 1;
values.worditem = list.worditem.nextindex;
values.q1default = "";
values.q2default = "";]
/ validresponse = (0)
/ trialduration = 0
/ recorddata = false
/ branch = [surveypage.trials;]
</trial>

<list worditem>
/ poolsize = 4
</list>

<surveypage trials>
/ ontrialend = [
values.q1default = radiobuttons.q1.response;
values.q2default = radiobuttons.q2.response;
values.word = text.words.currentitem;
]
/ stimulusframes = [1=noreplacenorepeat(words)]
/ questions = [
1 = radiobuttons.q1;
2 = radiobuttons.q2;
3 = checkboxes.unknown
]
/ showquestionnumbers = false
/ showbackbutton = false
/ itemspacing=20%
/ navigationbuttonfontstyle = ("Arial", 2%, false, false, false, false, 5, 0)
/ showpagenumbers = false
/ recorddata = false
/ branch = [
if (!checkboxes.unknown.checked.1 && (radiobuttons.q1.response == "" || radiobuttons.q2.response == "")){
 surveypage.trials;
} else {
 trial.recorddata;
}
]
</surveypage>

<trial recorddata>
/ trialduration = 0
/ recorddata = true
</trial>

<text words>
/ items = (
"Misery",
"Bomb",
"Surgery",
"Chilli Pepper")
/ select = values.worditem
/ position = (50%, 15%)
/ fontstyle = ("Verdana", -30, true, false, false, false, 5, 0)
</text>

<radiobuttons q1>
/caption = " How related is the word to the sensation of heat pain?"
/options=("Unrelated","Somewhat unrelated", "Somewhat related","Related")
/fontstyle = ("Arial",2.5%, false, false, false, false, 5, 0)
/required=false
/position= (16%, 30%)
/defaultresponse = (values.q1default)
/orientation=horizontalequal
/optionvalues=("1","2","3","4")
</radiobuttons>

<radiobuttons q2>
/caption = "What intensity of heat pain is the word most related to?"
/options=("Unrelated", "Mild", "Intense")
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/ required=false
/ defaultresponse = (values.q2default)
/position= (20%, 60%)
/orientation=horizontalequal
/optionvalues=("1","2","3")
</radiobuttons>

<checkboxes unknown>
/ caption= ""
/ options= ("I don't know this word")
/ optionvalues = ("1")
/ required = false
/ fontstyle = ("Arial", 2.5%, false, false, false, false, 5, 0)
/position= (20%, 80%)
/ defaultresponse = 0
</checkboxes>

<values>
/ trialnum = 0
/ worditem = 0
/ word = ""
/ q1default = clearscreen
/ q2default = clearscreen
</values>

<block trials>
/trials=[1-4=selectword]
</block>
la_1985
la_1985
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 7, Visits: 42
Thank you so much, the "" made all the difference!!
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search