By JessicaEMFarias - 8/19/2019
Hi guys!
I have designed an experiment in which participants have to indicate in which side of 20 squares there are more dots. Now I need to record the data about participants' choices as well as the responses to sociodemographic questions, and I have failed to do so.
I have been using the element "data" and have set values.selecteditem (trying to record participants' choice of the side) and demographics (the name of the block I have used to insert sociodemographic questions) as columns.
Can anyone tell me how I should have been doing it?
I have attached the script below.
|
By Dave - 8/19/2019
+xHi guys! I have designed an experiment in which participants have to indicate in which side of 20 squares there are more dots. Now I need to record the data about participants' choices as well as the responses to sociodemographic questions, and I have failed to do so. I have been using the element "data" and have set values.selecteditem (trying to record participants' choice of the side) and demographics (the name of the block I have used to insert sociodemographic questions) as columns. Can anyone tell me how I should have been doing it? I have attached the script below. You've set your selection trial ("lado") up to not record any data.
<trial lado> / ontrialbegin = [values.runcount = values.runcount += 1;] / ontrialbegin = [if (values.runcount == 1) values.account_balance_temp = values.account_balance;] / ontrialbegin = [if (values.selecteditem == "esquerdo") {values.account_balance_temp += 0.01;}] / ontrialbegin = [if (values.selecteditem == "direito") {values.account_balance_temp += 0.05;}] / ontrialend = [values.account_balance_temp = values.account_balance;] / ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ] / ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};] / stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection, balance_temp] / inputdevice = mouse / validresponse = (esquerdo, direito, enviar) / isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ] / branch = [if (trial.lado.response != "enviar") trial.lado] / recorddata = false </trial>
and your <data> element does not make any attempt to record values.selecteditem.
There are no sociodemographic questions in the script you attached.
|
By Dave - 8/19/2019
+x+xHi guys! I have designed an experiment in which participants have to indicate in which side of 20 squares there are more dots. Now I need to record the data about participants' choices as well as the responses to sociodemographic questions, and I have failed to do so. I have been using the element "data" and have set values.selecteditem (trying to record participants' choice of the side) and demographics (the name of the block I have used to insert sociodemographic questions) as columns. Can anyone tell me how I should have been doing it? I have attached the script below. You've set your selection trial ("lado") up to not record any data. <trial lado> / ontrialbegin = [values.runcount = values.runcount += 1;] / ontrialbegin = [if (values.runcount == 1) values.account_balance_temp = values.account_balance;] / ontrialbegin = [if (values.selecteditem == "esquerdo") {values.account_balance_temp += 0.01;}] / ontrialbegin = [if (values.selecteditem == "direito") {values.account_balance_temp += 0.05;}] / ontrialend = [values.account_balance_temp = values.account_balance;] / ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ] / ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};] / stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection, balance_temp] / inputdevice = mouse / validresponse = (esquerdo, direito, enviar) / isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ] / branch = [if (trial.lado.response != "enviar") trial.lado] / recorddata = false</trial> and your <data> element does not make any attempt to record values.selecteditem. There are no sociodemographic questions in the script you attached. If you just want to capture a single row reflecting the final selection, do
<trial lado> / ontrialbegin = [values.runcount = values.runcount += 1;] / ontrialbegin = [if (values.runcount == 1) values.account_balance_temp = values.account_balance;] / ontrialbegin = [if (values.selecteditem == "esquerdo") {values.account_balance_temp += 0.01;}] / ontrialbegin = [if (values.selecteditem == "direito") {values.account_balance_temp += 0.05;}] / ontrialend = [values.account_balance_temp = values.account_balance;] / ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ] / ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};] / stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection, balance_temp] / inputdevice = mouse / validresponse = (esquerdo, direito, enviar) / isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ] / branch = [if (trial.lado.response != "enviar") trial.lado else trial.record_selection] / recorddata = false </trial>
//just adds a line of data to the data file reflecting the final selection ("esquerdo" or "direito") <trial record_selection> / trialduration = 0 </trial>
with
<data> /file = "Resultados.iqdat" /separatefiles = true /columns = [date, time, group, subject, trialnum, trialcode, response, correct, latency, values.selecteditem, values.account_balance] </data>
|
By Dave - 8/19/2019
+x+x+xHi guys! I have designed an experiment in which participants have to indicate in which side of 20 squares there are more dots. Now I need to record the data about participants' choices as well as the responses to sociodemographic questions, and I have failed to do so. I have been using the element "data" and have set values.selecteditem (trying to record participants' choice of the side) and demographics (the name of the block I have used to insert sociodemographic questions) as columns. Can anyone tell me how I should have been doing it? I have attached the script below. You've set your selection trial ("lado") up to not record any data. <trial lado> / ontrialbegin = [values.runcount = values.runcount += 1;] / ontrialbegin = [if (values.runcount == 1) values.account_balance_temp = values.account_balance;] / ontrialbegin = [if (values.selecteditem == "esquerdo") {values.account_balance_temp += 0.01;}] / ontrialbegin = [if (values.selecteditem == "direito") {values.account_balance_temp += 0.05;}] / ontrialend = [values.account_balance_temp = values.account_balance;] / ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ] / ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};] / stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection, balance_temp] / inputdevice = mouse / validresponse = (esquerdo, direito, enviar) / isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ] / branch = [if (trial.lado.response != "enviar") trial.lado] / recorddata = false</trial> and your <data> element does not make any attempt to record values.selecteditem. There are no sociodemographic questions in the script you attached. If you just want to capture a single row reflecting the final selection, do <trial lado> / ontrialbegin = [values.runcount = values.runcount += 1;] / ontrialbegin = [if (values.runcount == 1) values.account_balance_temp = values.account_balance;] / ontrialbegin = [if (values.selecteditem == "esquerdo") {values.account_balance_temp += 0.01;}] / ontrialbegin = [if (values.selecteditem == "direito") {values.account_balance_temp += 0.05;}] / ontrialend = [values.account_balance_temp = values.account_balance;] / ontrialend = [if (trial.lado.response == "esquerdo") {shape.esquerdobg.color = green; values.selecteditem = "esquerdo";} else {shape.esquerdobg.color = black}; ] / ontrialend = [if (trial.lado.response == "direito") {shape.direitobg.color = green; values.selecteditem = "direito";} else {shape.direitobg.color = black}; ] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "esquerdo") {values.account_balance += 0.01;};] / ontrialend = [if (trial.lado.response == "enviar" && values.selecteditem == "direito") {values.account_balance += 0.05;};] / stimulusframes = [1= estimate, esquerdobg, esquerdo, direitobg, direito, enviar, yourselection, balance_temp] / inputdevice = mouse / validresponse = (esquerdo, direito, enviar) / isvalidresponse = [if (trial.lado.response == "enviar" && values.runcount == 1) false else true ] / branch = [if (trial.lado.response != "enviar") trial.lado else trial.record_selection] / recorddata = false </trial> //just adds a line of data to the data file reflecting the final selection ("esquerdo" or "direito") <trial record_selection> / trialduration = 0 </trial>with <data> /file = "Resultados.iqdat" /separatefiles = true /columns = [date, time, group, subject, trialnum, trialcode, response, correct, latency, values.selecteditem, values.account_balance] </data> I can't say anything about sociodemographics because -- as I said -- the script you attached does not contain any. If you run your <surveypage>(s) via a <block>, the responses to the various questions will be automatically captured in the data file's response column, with the trialcode column reflecting the respective question name.
If you use a <survey> element instead of a <block>, you'll get a separate, differently formatted data file for the survey questions.
|
|