jo700
|
|
Group: Forum Members
Posts: 17,
Visits: 84
|
Hello everybody,
in my experiment a picture is presented to each participant. Then 9 slightly modified pictures are presented to the participants. For each of the 9 pictures they should decide whether (1) something has changed (question1), and if so (2) what has changed (question2) and (3) to which degree it has changed (question3). This process is repeated for 3 times with different pictures. question1 should be a dichhotome question ("yes", "no") question2 should be an open question ("enter your answer") question3 should be a slider without an anchor (0-100% or even better: from -100 to +100%)
(1) My first question is: How can I realise that question1 and question2 are only presented, if question1 is answered with "yes"? (2) If it is not possible to use the slider-function withhout an anchor, how can I integrate e.g. a VisualAnalogueScale into my script? Therefore I copied a version from the Millisecond Forums and modified it (see below). (3) Somehow my openended question does not work properly. Have I missed something?
<variables> /group=(1 of 10) (firstb = block1A, secondb = block4A, thirdb = Pause, fourthb = block1B, fifthb = block4B, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(2 of 10) (firstb = block1A, secondb = block4A, thirdb = Pause, fourthb = block1B, fifthb = block4B, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(3 of 10) (firstb = block1A, secondb = block4A, thirdb = Pause, fourthb = block1B, fifthb = block4B, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(4 of 10) (firstb = block1A, secondb = block4A, thirdb = Pause, fourthb = block1B, fifthb = block4B, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(5 of 10) (firstb = block1A, secondb = block4A, thirdb = Pause, fourthb = block1B, fifthb = block4B, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(6 of 10) (firstb = block1A, secondb = block4B, thirdb = Pause, fourthb = block1B, fifthb = block4A, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(7 of 10) (firstb = block1A, secondb = block4B, thirdb = Pause, fourthb = block1B, fifthb = block4A, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(8 of 10) (firstb = block1A, secondb = block4B, thirdb = Pause, fourthb = block1B, fifthb = block4A, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(9 of 10) (firstb = block1A, secondb = block4B, thirdb = Pause, fourthb = block1B, fifthb = block4A, sixthb = Pause, seventhb = block1C, eighthb = block4C) /group=(10 of 10) (firstb = block1A, secondb = block4B, thirdb = Pause, fourthb = block1B, fifthb = block4A, sixthb = Pause, seventhb = block1C, eighthb = block4C) </variables>
<defaults> / screencolor = (250, 250, 250) / fontstyle = ("Arial", 12pt) </defaults>
<expt> / preinstructions = (begin) / blocks = [1=firstb; 2 = secondb; 3 = thirdb; 4 = fourthb; 5 = fifthb; 6 = sixthb; 7 = seventhb; 8 = eighthb] / postinstructions = (finish) </expt>
******************************************************************************************************************* extract from the script *******************************************************************************************************************
<block block1A> / trials = [1=otherface1A_2sec] / preinstructions = (instr1) </block>
<surveypage picture1A> / caption = "Please answer the following question: " / fontstyle = ("Arial", 12pt, true) / questions = [1=picture1A; 2=question1; 3=question2; 4=question3] / showquestionnumbers = false / showpagenumbers = false / finishlabel = "continue" </surveypage>
<image picture1A> / items = ("otherface1A.jpg") / position = (45%,15%) / imagesize = (20%, 20%) </image>
<picture otherface1A> / items = otherface1A </picture>
<item otherface1A> /1="otherface1A.jpg" </item>
<radiobuttons question1> / caption = "Do you see any changes between the first picture and the second one?" / fontstyle = ("Arial", 12pt,true) / responsefontstyle = ("Arial", 11pt, false) / options=("yes", "no") / orientation=horizontal / required=true / position = (10%,75%) </radiobuttons>
<openended question2> / stimulusframes = [1=question2] / validresponse = (anyresponse) </openended>
<text question2> / items = "What do you think has changed on the picture?" / position = (50%, 30%) </text
******************************************************************************************************* VAS, slightly modified version *******************************************************************************************************
<trial question3> / stimulusframes = [1=question, leftborder, rightborder, line, leftanchor, rightanchor] / inputdevice = mouse / validresponse = (line) / branch = [trial.showresponse] </trial>
<trial showresponse> / stimulusframes = [1=X, responsevalue] / inputdevice = mouse / validresponse = (noresponse) / timeout = 1500 / recorddata = false </trial>
*** Scale Items ***
<shape line> / shape = rectangle / color = (0, 0, 0) / size = (700, 6) / position = (50, 75) / erase = false </shape>
<shape leftborder> / shape = rectangle / color = (0, 0, 0) / size = (6, 30) / position = (16, 75) / erase = false </shape>
<shape rightborder> / shape = rectangle / color = (0, 0, 0) / size = (6, 30) / position = (84, 75) / erase = false </shape>
<text question> / items = ("Wie sehr hat sich diese Region verändert?") / position = (50, 25) / select = sequence / erase = false </text>
<text leftanchor> / items = ("viel kleiner") / position = (10, 75) / size = (50, 50) / erase = false </text>
<text rightanchor> / items = ("viel größer") / position = (90, 75) / size = (50, 50) / erase = false </text>
*** Response Indicator ***
<text X> / fontstyle = ("Arial", -35, true, false, false, false, 5, 0) / items = ("o") / txcolor = (255, 0, 0) / txbgcolor = (transparent) / hposition = (trial.VisualAnalogueScale.responsex / display.width) * 100 / vposition = shape.line.vposition </text>
<text responsevalue> / items = ("<% expressions.roundedvalue %> %") / position = (50, 85) </text>
I am sorry, that this script is that long. I hope, that someone of you can help me with that problem. It would really help me a lot!
Best regards, Daniel
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
> (1) My first question is: How can I realise that question1 and question2 are only presented, if question1 is answered with "yes"?
First off, those questions all need to reside on different <surveypage>s or be separate <trial>s if you want them to be skipped. You cannot skip questions that reside on the same <surveypage>. Once you've separated those things, you can use the /skip attribute in the subsequent <trial>s to skip them in case of a "no" response.
> (2) If it is not possible to use the slider-function withhout an anchor, how can I integrate e.g. a VisualAnalogueScale into my script? > Therefore I copied a version from the Millisecond Forums and modified it (see below).
I'm not sure what a "slider without an anchor" is supposed to be. Do you mean the indicator that's moved around on the slider? If so, you cannot remove that. The VAS code is the way to go. It seems you already found that code, and you integrate it just like any other trial in your script.
> (3) Somehow my openended question does not work properly. Have I missed something?
An <openended> element is a special kind of <trial>. You cannot put it on a <surveypage>, which is also a kind of <trial>.
|
|
|
jo700
|
|
Group: Forum Members
Posts: 17,
Visits: 84
|
Thanks for your quick reply!
it is necessary to have question2 and question3 on the same page, if the participant answers questions1 (radiobutton) with "yes". Therefore I tried to integrate question2 (openended) and question3 (VAS) in one block. Then I tried to set by the branch argument "/branch=[if (radiobuttons.question1.response = "yes") block.question23]". But somehow it didn't work. Do I have to define "yes" before? Or is it not possible to refer to a block by the branch argument?
I hope you can help again. Thanks a lot!
<blockquestion23> /trials= [1=question2; 2=question3] </block> <surveypagepicture1A> / caption = "Please answer the following question: " / fontstyle = ("Arial", 12pt, true) / questions = [1=picture1A; 2=question1; 3=question2; 4=question3] / showquestionnumbers = false / showpagenumbers = false / finishlabel = "continue" /branch=[if (radiobuttons.question1.response = "yes") block.question23] </surveypage> <openendedquestion2> /stimulusframes = [1= question2] /validresponse = (anyresponse) </openended> <textquestion2> / items= ("What do you think has changed on the picture?") /position = (50%, 30%) </text> <trialFrage3> /stimulusframes = [1= question3, leftborder, rightborder, line, leftanchor,rightanchor] /inputdevice = mouse /validresponse = (line) / branch= [trial.showresponse] </trial> <trialshowresponse> /stimulusframes = [1=X, responsevalue] /inputdevice = mouse /validresponse = (noresponse) /timeout = 1500 /recorddata = false </trial> *** ScaleItems *** <shapeline> / shape= rectangle / color= (0, 0, 0) / size =(700, 6) /position = (50, 75) / erase= false </shape> <shapeleftborder> / shape= rectangle / color= (0, 0, 0) / size =(6, 30) /position = (16, 75) / erase= false </shape> <shaperightborder> / shape= rectangle / color= (0, 0, 0) / size =(6, 30) /position = (84, 75) / erase= false </shape> <textquestion3> / items= ("To which degree the region has changed?") /position = (50, 25) / select= sequence / erase= false </text> <text leftanchor> / items = ("much smaller") /position = (10, 75) / size =(50, 50) / erase= false </text> <text rightanchor> / items = ("much larger") /position = (90, 75) / size =(50, 50) / erase= false </text> ***Response Indicator *** <textX> /fontstyle = ("Arial", -35, true, false, false, false, 5, 0) / items= ("o") /txcolor = (255, 0, 0) /txbgcolor = (transparent) /hposition = (trial.question3.responsex / display.width) * 100 /vposition = shape.line.vposition </text> ***Response Scoring Routines *** <expressions> /correctionvalue = (display.width - shape.line.width) / 2 /correctedscore = (trial.question3.responsex - expressions.correctionvalue) /shape.line.width * 100 /roundedvalue = format("%.2f", expressions.correctedscore) </expressions> <textresponsevalue> / items= ("<% expressions.roundedvalue %> %") /position = (50, 85) </text>
|
|
|
jo700
|
|
Group: Forum Members
Posts: 17,
Visits: 84
|
Thanks for your quick reply!
it is necessary to have question2 and question3 on the same page, if the participant answers questions1 (radiobutton) with "yes". Therefore I tried to integrate question2 (openended) and question3 (VAS) into one block. Then I tried to set by the branch argument "/branch=[if (radiobuttons.question1.response = "yes") block.question23]". But somehow it didn't work. Do I have to define "yes" before? Or is it not possible to refer to a block by the branch argument?
As I described in my first post, block4A / block4B / block4C consist of 9 different pictures which are randomly presented to the participants. On the same page as each picture question1 is presented ("Do you see any changes on the picture?"). If the participant answers with "yes", the participant should immediately get 2 other Items on the next page (question2, question3). That is why I don't know, whether it is that helpful to integrate question2 and question3 into one block. But if I don't, I don't know how to get sure, that question2 (openended) and question3 (VAS) are presented on one page while using the brach-argument.
In case, it is not possible: Do you know how to get sure, that question2 and question3 are presented on two following pages, if question1 has been answered with "yes"?
I hope you can help again. Thanks a lot!
<block question23> /trials = [1=question2; 2=question3] </block>
<surveypage picture1A> / caption = "Please answer the following question: " / fontstyle = ("Arial", 12pt, true) / questions = [1=picture1A; 2=question1] / showquestionnumbers = false / showpagenumbers = false / finishlabel = "continue" / branch=[if (radiobuttons.Frage1.response = "yes") block.question23] </surveypage>
<openended question2> / stimulusframes = [1= question2] / validresponse = (anyresponse) </openended>
<text question2> / items = ("What do you think has changed on the picture?") / position = (50%, 30%) </text>
<trial Frage3> / stimulusframes = [1= question3, leftborder, rightborder, line, leftanchor, rightanchor] / inputdevice = mouse / validresponse = (line) / branch = [trial.showresponse] </trial>
<trial showresponse> / stimulusframes = [1=X, responsevalue] / inputdevice = mouse / validresponse = (noresponse) / timeout = 1500 / recorddata = false </trial>
*** Scale Items ***
<shape line> / shape = rectangle / color = (0, 0, 0) / size = (700, 6) / position = (50, 75) / erase = false </shape>
<shape leftborder> / shape = rectangle / color = (0, 0, 0) / size = (6, 30) / position = (16, 75) / erase = false </shape>
<shape rightborder> / shape = rectangle / color = (0, 0, 0) / size = (6, 30) / position = (84, 75) / erase = false </shape>
<text question3> / items = ("To which degree the region has changed?") / position = (50, 25) / select = sequence / erase = false </text>
<text leftanchor> / items = ("much smaller") / position = (10, 75) / size = (50, 50) / erase = false </text>
<text rightanchor> / items = ("much larger") / position = (90, 75) / size = (50, 50) / erase = false </text>
*** Response Indicator ***
<text X> / fontstyle = ("Arial", -35, true, false, false, false, 5, 0) / items = ("o") / txcolor = (255, 0, 0) / txbgcolor = (transparent) / hposition = (trial.question3.responsex / display.width) * 100 / vposition = shape.line.vposition </text>
*** Response Scoring Routines ***
<expressions> / correctionvalue = (display.width - shape.line.width) / 2 / correctedscore = (trial.question3.responsex - expressions.correctionvalue) / shape.line.width * 100 / roundedvalue = format("%.2f", expressions.correctedscore) </expressions>
<text responsevalue> / items = ("<% expressions.roundedvalue %> %") / position = (50, 85) </text>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
A /branch must take place at the same "level": A <trial>-type element can /branch to another <trial>-type element, but not to a <block>-type element. Conversely, a <block>-type element can /branch to another <block>-type element, but not to a <trial>-type element.
A <surveypage> is a special type of <trial> element (as are <openended> and <likert>. (Similarly. a <survey> is a special type of <block> element.)
You need to /branch from the <block>-type element that runs the <surveypage> containing the 1st question to <block question23>.
There's also a syntax issue in your current /branch. You are using the wrong operator. "=" is the assignment operator. What you need, though, is the logical comparison operator "==". In sum:
<expt> / blocks = [1=question1] </expt>
<block question1> / trials = [1=picture1A] / branch=[if (radiobuttons.question1.response == "yes") block.question23] </block>
<surveypage picture1A> / caption = "Please answer the following question: " / fontstyle = ("Arial", 12pt, true) / questions = [1=picture1A; 2=question1] / showquestionnumbers = false / showpagenumbers = false / finishlabel = "continue" </surveypage>
|
|
|
jo700
|
|
Group: Forum Members
Posts: 17,
Visits: 84
|
Oh wow, that worked! Thank you! But somehow it still does not work as intended. The 9 trials of one block are presented first. If question1 of one trial is answered with "yes", question2 and question3 should be presented right after that. But at the moment, if question1 has been answered with "yes", question2 and question3 are presented only after all 9 trials have run through (and not after each trial). Is it possible to present question2 and question3, right after question1 has been answered with "yes"?
I imagine, that I could create 9 blocks, each block with only 1 trial instead of 1 block with 9 trials. But then I am afraid, that I perhaps I cannot present the 9 trials (e.g. picture1A to picture9A) randomly. Do you know any solution to that problem?
<block block4A> / trials = [1-9=noreplace (picture1A, picture2A, picture3A, picture4A, picture5A, picture6A, picture7A, picture8A, picture9A)] / branch=[if (radiobuttons.question1.response = "yes") block.question23] </block>
<block block4B> / trials = [1-9=noreplace (picture1B, picture2B, picture3B, picture4B, picture5B, picture6B, picture7B, picture8B, picture9B)] / branch=[if (radiobuttons.question1.response = "yes") block.question23] </block>
<block block4C> / trials = [1-9=noreplace (Bild1c, Bild2C, Bild3C, Bild4C, Bild5C, Bild6C, Bild7C, Bild8C, Bild9C)] / branch=[if (radiobuttons.question1.response = "yes") block.question23] </block>
<block question23> / trials = [1=question2; 2= question3] </block>
|
|
|
jo700
|
|
Group: Forum Members
Posts: 17,
Visits: 84
|
I also tried this here: (1) If question1 is answered with "yes", the next question is question2 (branch-argument) (2) question2 leads directly to question3 (branch-argument) Now it works, concerning the if-paths.
But there is still a problem: During the experiment - as intended - a picture (e.g. picture1A) is presented on the same page as question1. If question1 is answered with "yes" the next page should be question2 and then question3. This works. But the problem is, that on the pages of question2 and question3 the lower part of picture1A is presented, although picture1A is only defined on <surveypage picture1A>. Besides, in following trials parts of the VAS of the former trial are visible. Do you know how to prevent this? I hope not to bother you too much... Thanks a lot for your great help so far!
<surveypage picture1A> / caption = "Please answer the following question: " / fontstyle = ("Arial", 12pt, true) / questions = [1=picture1A; 2=question1] / branch=[if (radiobuttons.question1.response == "yes") openended.question2] / showquestionnumbers = false / showpagenumbers = false / finishlabel = "continue" </surveypage>
<openended question2> / stimulusframes = [1=question2] / validresponse = (anyresponse) / branch = [trial.question3] </openended>
<text question2> / items = ("Which region has changed?") / position = (50%, 60%) </text>
****trial question3 is the VAS*** <trial question3> / stimulusframes = [1=question3, leftborder, rightborder, line, leftanchor, rightanchor] / inputdevice = mouse / validresponse = (line) / branch = [trial.showresponse] </trial>
etc.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
Re.
<block block4A> / trials = [1-9=noreplace (picture1A, picture2A, picture3A, picture4A, picture5A, picture6A, picture7A, picture8A, picture9A)] / branch=[if (radiobuttons.question1.response = "yes") block.question23] </block>
Just to clarify: A /branch in a <block> is executed *when the block is over*, i.e. once all trials defined in it have been run. The script is behaving as it is supposed to. As you already discovered, what you want to do instead is /branch at the *<trial>-level*.
Re. "But the problem is, that on the pages of question2 and question3 the lower part of picture1A is presented, although picture1A is only defined on <surveypage picture1A>. [...]"
You'll want to create a blank <shape> that covers the entire screen area. Display that shape in your <trial>s when you want to "erase" / remove stimuli from the screen. Something along the lines of:
<shape blank> / shape = rectangle / color = white / size = (100%, 100%) / erase = false </shape>
<surveypage picture1A> / stimulusframes = [1=blank] ... </surveypage>
<openended question2> / stimulusframes = [1=blank, question2] ... </openended>
Also see the "How to erase stimuli" topic in the documentation.
Hope this helps.
|
|
|