raven
|
|
Group: Forum Members
Posts: 52,
Visits: 110
|
Hi Dave,
Try this:
<values> / n = 0 / ncorrect = 0 / difference = 0 / multiplier = 0 / score = 0 </values>
<list lista> / items = (1, 1, -1) / selectionmode = random / replace = false </list>
<list listb> / items = (1, -1, -1) / selectionmode = random / replace = false </list>
<list listc> / items = (1, -1) / selectionmode = random / replace = false </list>
<block start> / trials = [1-20 = noreplace(trial.one, trial.two)] </block>
<trial one> / ontrialend = [ values.n += 1; values.ncorrect += trial.one.correct;
if (trial.one.correct) { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 500; // if response is correct, increase the score by 500 values.difference = 0; values.difference += 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 250; // if response is incorrect, increase the score by only 250 values.difference = 0; values.difference += 250; } ]
/ stimulusframes = [1=clearscreen, stimulusa, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("y") / branch = [ if (trial.one.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial>
<trial two> / ontrialend = [ values.n += 1; values.ncorrect += trial.two.correct;
if (trial.two.correct) { values.multiplier = list.listb.nextvalue; values.score -= values.multiplier * 500; // if response is correct, decrease the score by 500 3/4 times or increase by 500 1/4 as per listb values.difference = 0; values.difference -= 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.listb.nextvalue; values.score -= values.multiplier * 250; // if response is incorrect, decrease the score by only 250 values.difference = 0; values.difference -= 250; } ]
/ stimulusframes = [1=clearscreen, stimulusb, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("n") / branch = [ if (trial.two.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial>
<trial three> / ontrialend = [ values.n += 1; values.ncorrect += trial.three.correct;
if (trial.three.correct) { values.multiplier = list.listc.nextvalue; values.score -= values.multiplier * 500; // if response is correct, decrease the score by 500 3/4 times or increase by 500 1/4 as per listb values.difference = 0; values.difference -= 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.listc.nextvalue; values.score -= values.multiplier * 250; // if response is incorrect, decrease the score by only 250 values.difference = 0; values.difference -= 250; } ]
/ stimulusframes = [1=clearscreen, stimulusb, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("n") / branch = [ if (trial.three.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial>
<trial fb> / stimulusframes = [1=clearscreen, fbscreen] / timeout = 8000 </trial>
<text stimulusa> / items = ("A") / position = (40%, 50%) </text>
<text stimulusb> / items = ("B") / position = (50%, 50%) </text>
<text stimulusc> / items = ("C") / position = (60%, 50%) </text>
<text fbscreen> / items = ("So far, you got <%values.ncorrect%> out of <%values.n%> trials correct.") / items = ("The difference between the last score and current score is <%values.difference%>.") </text>
<text score> / items = ("Score: <%values.score%>") / erase = false / position = (10%, 90%) </text>
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xHi Dave, Try this: <values> / n = 0 / ncorrect = 0 / difference = 0 / multiplier = 0 / score = 0 </values> <list lista> / items = (1, 1, -1) / selectionmode = random / replace = false </list> <list listb> / items = (1, -1, -1) / selectionmode = random / replace = false </list> <list listc> / items = (1, -1) / selectionmode = random / replace = false </list> <block start> / trials = [1-20 = noreplace(trial.one, trial.two)] </block> <trial one> / ontrialend = [ values.n += 1; values.ncorrect += trial.one.correct; if (trial.one.correct) { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 500; // if response is correct, increase the score by 500 values.difference = 0; values.difference += 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 250; // if response is incorrect, increase the score by only 250 values.difference = 0; values.difference += 250; } ] / stimulusframes = [1=clearscreen, stimulusa, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("y") / branch = [ if (trial.one.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial> <trial two> / ontrialend = [ values.n += 1; values.ncorrect += trial.two.correct; if (trial.two.correct) { values.multiplier = list.listb.nextvalue; values.score -= values.multiplier * 500; // if response is correct, decrease the score by 500 3/4 times or increase by 500 1/4 as per listb values.difference = 0; values.difference -= 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.listb.nextvalue; values.score -= values.multiplier * 250; // if response is incorrect, decrease the score by only 250 values.difference = 0; values.difference -= 250; } ] / stimulusframes = [1=clearscreen, stimulusb, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("n") / branch = [ if (trial.two.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial> <trial three> / ontrialend = [ values.n += 1; values.ncorrect += trial.three.correct; if (trial.three.correct) { values.multiplier = list.listc.nextvalue; values.score -= values.multiplier * 500; // if response is correct, decrease the score by 500 3/4 times or increase by 500 1/4 as per listb values.difference = 0; values.difference -= 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.listc.nextvalue; values.score -= values.multiplier * 250; // if response is incorrect, decrease the score by only 250 values.difference = 0; values.difference -= 250; } ] / stimulusframes = [1=clearscreen, stimulusb, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("n") / branch = [ if (trial.three.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial> <trial fb> / stimulusframes = [1=clearscreen, fbscreen] / timeout = 8000 </trial> <text stimulusa> / items = ("A") / position = (40%, 50%) </text> <text stimulusb> / items = ("B") / position = (50%, 50%) </text> <text stimulusc> / items = ("C") / position = (60%, 50%) </text> <text fbscreen> / items = ("So far, you got <%values.ncorrect%> out of <%values.n%> trials correct.") / items = ("The difference between the last score and current score is <%values.difference%>.") </text> <text score> / items = ("Score: <%values.score%>") / erase = false / position = (10%, 90%) </text> Well, the difference is sometimes wrong because your math is wrong. Look, suppose score is zero, and you randomly draw multiplier -1 here: <list lista> / items = (1, 1, -1) / selectionmode = random / replace = false </list> if (trial.one.correct) { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 500; // if response is correct, increase the score by 500
So, score goes from 0 to -500, i.e. 0 + (-1 * 500). But then you go on to simply add 500 to 0 to calculate the difference, i.e. you always get 500, no matter if you drew the positive (1) or negative (-1) multiplier. values.difference = 0; values.difference += 500; // this should reflect the difference between the new and old score, either +500 or -500 } The exact same goes for all the other cases. You fail to account for the multiplier. I'm honestly not sure what the point of this calculation is even supposed to be.
|
|
|
raven
|
|
Group: Forum Members
Posts: 52,
Visits: 110
|
Ok, that makes sense, I see where the issue in the code/math is and have corrected that now.
As I'm new to Inquisit, I'm trying a few different scenarios to improve my skills, so thanks for all your help so far.
Regarding the other question, can you give me some guidance on how to go about different participants seeing different conditions for each trial?
Thanks again!
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xOk, that makes sense, I see where the issue in the code/math is and have corrected that now. As I'm new to Inquisit, I'm trying a few different scenarios to improve my skills, so thanks for all your help so far. Regarding the other question, can you give me some guidance on how to go about different participants seeing different conditions for each trial? Thanks again! > Regarding the other question, can you give me some guidance on how to go about different participants seeing different conditions for each trial? Spell out the exact multiplier values you want for each condition in the respective lists and then I can show you.
|
|
|
raven
|
|
Group: Forum Members
Posts: 52,
Visits: 110
|
Ok, let's say trial.one has 1,1,-1 for the multipliers * 500; trial.two has -1,-1,1 * 500; and trial.three has 1,-1, 2, -2 * 500.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xOk, let's say trial.one has 1,1,-1 for the multipliers * 500; trial.two has -1,-1,1 * 500; and trial.three has 1,-1, 2, -2 * 500. You were asking about between-subjects conditions, but what you are describing here is within-subjects conditions. So what is it supposed to be? Please be precise and specific.
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+x+xOk, let's say trial.one has 1,1,-1 for the multipliers * 500; trial.two has -1,-1,1 * 500; and trial.three has 1,-1, 2, -2 * 500. You were asking about between-subjects conditions, but what you are describing here is within-subjects conditions. So what is it supposed to be? Please be precise and specific. Assuming 2 between-subjects conditions, assigned based on subject number ("[...] to have it so that the score for some participants, goes up 3/4 or 1/4 times as per the respective lista or listb in stimulusa, stimulusb, or stimulusc, and for others it will be different. For example, it should be different for even numbered participants compared to odd numbered participants [...]"), here's the information I want from you: Between subjects condition 1 (odd subject IDs) List A multipliers: [list the multipliers here] List B multipliers: [list the multipliers here] List C multipliers: [list the multipliers here] Between subjects condition 2 (even subject IDs) List A multipliers: [list the multipliers here] List B multipliers: [list the multipliers here] List C multipliers: [list the multipliers here]
|
|
|
raven
|
|
Group: Forum Members
Posts: 52,
Visits: 110
|
Between subjects condition 1 (odd subject IDs) List A multipliers: [1,1,-1 * (500)] List B multipliers: [1,-1,-1 * (500)] List C multipliers: [1,-1 * (500)]
Between subjects condition 2 (even subject IDs) List A multipliers: [1,-1,-1 * (500)] List B multipliers: [1,-1 * (500)] List C multipliers: [1,1,-1 * (500)]
|
|
|
Dave
|
|
Group: Administrators
Posts: 13K,
Visits: 105K
|
+xBetween subjects condition 1 (odd subject IDs) List A multipliers: [1,1,-1 * (500)] List B multipliers: [1,-1,-1 * (500)] List C multipliers: [1,-1 * (500)] Between subjects condition 2 (even subject IDs) List A multipliers: [1,-1,-1 * (500)] List B multipliers: [1,-1 * (500)] List C multipliers: [1,1,-1 * (500)] <expt condition1> / onexptbegin = [ // set the multipliers for list A in condition 1 // these are 1,1, and -1 list.lista.appenditem(1); list.lista.appenditem(1); list.lista.appenditem(-1); // set the multipliers for list B in condition 1 // these are 1,-1, and -1 list.listb.appenditem(1); list.listb.appenditem(-1); list.listb.appenditem(-1); // set the multipliers for list C in condition 1 // these are 1, and -1 list.listc.appenditem(1); list.listc.appenditem(-1); ] / blocks = [1 = block.start] / subjects = (1 of 2) </expt>
<expt condition2> / onexptbegin = [ // set the multipliers for list A in condition 2 // these are 1,-1, and -1 list.lista.appenditem(1); list.lista.appenditem(-1); list.lista.appenditem(-1); // set the multipliers for list B in condition 1 // these are 1, and -1 list.listb.appenditem(1); list.listb.appenditem(-1); // set the multipliers for list C in condition 1 // these are 1, 1, and -1 list.listc.appenditem(1); list.listc.appenditem(1); list.listc.appenditem(-1); ] / blocks = [1 = block.start] / subjects = (2 of 2) </expt>
<values> / n = 0 / ncorrect = 0 / difference = 0 / multiplier = 0 / score = 0 </values>
<list lista> // multiplier items are determined /onexptbegin, depending on the condtion assigned / selectionmode = random / replace = false </list>
<list listb> // multiplier items are determined /onexptbegin, depending on the condtion assigned / selectionmode = random / replace = false </list>
<list listc> // multiplier items are determined /onexptbegin, depending on the condtion assigned / selectionmode = random / replace = false </list>
<block start> / trials = [1-24 = (trial.one, trial.two, trial.three)] </block>
<trial one> / ontrialend = [ values.n += 1; values.ncorrect += trial.one.correct;
if (trial.one.correct) { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 500; // if response is correct, increase the score by 500 values.difference = 0; values.difference = values.multiplier * 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.lista.nextvalue; values.score += values.multiplier * 250; // if response is incorrect, increase the score by only 250 values.difference = 0; values.difference = values.multiplier * 250; } ]
/ stimulusframes = [1=clearscreen, stimulusa, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("y") / branch = [ if (trial.one.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial>
<trial two> / ontrialend = [ values.n += 1; values.ncorrect += trial.two.correct;
if (trial.two.correct) { values.multiplier = list.listb.nextvalue; values.score -= values.multiplier * 500; // if response is correct, decrease the score by 500 3/4 times or increase by 500 1/4 as per listb values.difference = 0; values.difference = values.multiplier * 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.listb.nextvalue; values.score -= values.multiplier * 250; // if response is incorrect, decrease the score by only 250 values.difference = 0; values.difference values.multiplier * 250; } ]
/ stimulusframes = [1=clearscreen, stimulusb, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("n") / branch = [ if (trial.two.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial>
<trial three> / ontrialend = [ values.n += 1; values.ncorrect += trial.three.correct;
if (trial.three.correct) { values.multiplier = list.listc.nextvalue; values.score -= values.multiplier * 500; // if response is correct, decrease the score by 500 3/4 times or increase by 500 1/4 as per listb values.difference = 0; values.difference = values.multiplier * 500; // this should reflect the difference between the new and old score, either +500 or -500 } else { values.multiplier = list.listc.nextvalue; values.score -= values.multiplier * 250; // if response is incorrect, decrease the score by only 250 values.difference = 0; values.difference = values.multiplier * 250; } ]
/ stimulusframes = [1=clearscreen, stimulusb, score] / inputdevice = keyboard / validresponse = ("y", "n") / correctresponse = ("n") / branch = [ if (trial.three.responsetext == "n") { trial.fb } ] / timeout = 3000 </trial>
<trial fb> / stimulusframes = [1=clearscreen, fbscreen] / timeout = 8000 </trial>
<text stimulusa> / items = ("A") / position = (40%, 50%) </text>
<text stimulusb> / items = ("B") / position = (50%, 50%) </text>
<text stimulusc> / items = ("C") / position = (60%, 50%) </text>
<text fbscreen> // items = ("So far, you got <%values.ncorrect%> out of <%values.n%> trials correct.") / items = ("The difference between the last score and current score is <%values.difference%>.") </text>
<text score> / items = ("Score: <%values.score%>") / erase = false / position = (10%, 90%) </text>
<data> / columns = (date time subject group blocknum blockcode trialnum trialcode response responsetext latency correct values.n values.ncorrect values.multiplier values.score values.difference) </data>
|
|
|
raven
|
|
Group: Forum Members
Posts: 52,
Visits: 110
|
Thanks Dave, this gives me some great insight into how to get Inquisit working for between-subjects designs. I've also found the following page in the language reference which explains subject allocation further: https://www.millisecond.com/support/docs/current/html/language/attributes/subjects.htmMuch appreciated! :)
|
|
|