record different answers in a single trial


record different answers in a single trial

Author
Message
derodriguezz
derodriguezz
Associate Member
Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)

Group: Forum Members
Posts: 10, Visits: 50
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!
Dave
Dave
Supreme Being
Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)

Group: Administrators
Posts: 8.8K, Visits: 36K
derodriguezz - Thursday, April 5, 2018
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!

I'm not sure what your question is. Could you please elaborate.

derodriguezz
derodriguezz
Associate Member
Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)

Group: Forum Members
Posts: 10, Visits: 50
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!

I'm not sure what your question is. Could you please elaborate.

Sure!

Trial posneg shows a pairs of news items. Each item has a header and a brand. There are a group of headers, positives and negatives, and two brands. Headers and brands appear in random order on the screen. The selection is done by clicking the squares behind the cue composed by the <text headerpos> (<text headerneg>Wink and the < picture EE> (<picture EI>Wink for the brand. There are shape elements that appear behind the cues, and when clicked the trial must register for example, for a selection of a negative header with the brand EE, 00 and 03, which are the rectangles behind the cues, and appear relative to the position of the band and the header respectively. I'm reading the code like this because it was made by some of you, and I get lost in some parts. Is there any way for select overlapping shapes in one single click? Maybe the problem isn't in that piece and I can't notice.

This is the entire code.
 
Target Discrimination Taks



<parameters>
/questionfontsize = 5%
</parameters>

<item questions>
/1 = "¿Cuál de los dos artículos estaría interesado en leer?"
</item>

<item intensidad>
/1 = "Por favor, indique su grado de interés en leer el articulo que eligió"
</item>

<item header_v1>
/1 = "Fiscalía de Corea del Sur pide 30 años de cárcel para la expresidenta surcoreana"
/2 = "Siria habría fabricado armas químicas con material suministrado por Corea del Norte"
/3 = "Servicio de búsqueda de empleo de Facebook estará disponible en 40 países más"
/4 = "Utilidad de Avianca sumó US$82 millones en 2017 a pesar del paro"
/5 = "Inexplicable hallazgo de hielo cerca del ecuador de Marte"
/6 = "Cualquier iPhone podría ser ‘hackeado’ por una empresa israelí que afirma poder hacerlo"
/7 = "Arqueólogos egipcios descubren una necrópolis de dos mil años de antigüedad en El Cairo"
/8 = "Europa busca implementar normas de impuestos a empresas digitales líderes"
/9 = "La dependencia a las redes sociales podría perjudicar las misiones a otros planetas"
/10 = "Carros no tripulados están en proceso de transitar las calles Norteamericanas"
/11 = "Colombia ahora puede ser recorrida en bicicleta por 38 rutas habilitadas por el Gobierno Nacional"
/12 = "Premio de Mujeres a colombiana Jineth Bedoya por liderar la defensa de la mujer"
/13 = "Autoridades belgas distribuyen pastillas de yodo ante un posible incidente nuclear"
/14 = "El sobrepeso y la obesidad aumenta en América Latina"
/15 = "Un embarazo en una ciudad con mala calidad de aire podría afectar el cerebro del bebé"
/16 = "Google ayuda al Pentágono a construir inteligencia artificial para sus drones"
</item>

<item header_v2>
/1 = "30 años de cárcel imputados a la expresidenta de Corea del Sur por orden de la fiscalía de la nación" 
/2 = "Insumos para crear armas químicas en Siria habrían sido enviados por Corea del Norte" 
/3 = "Facebook ampliará en 40 países su servicio de búsqueda de empleo"
/4 = "Tras un año con paro, Avianca obtuvo US$82 millones en utilidades"
/5 = "Científicos encuentran inesperadas cantidades de hielo en Marte"
/6 = "Empresa israelí asegura poder ‘hackear’ cualquier iPhone"
/7 = "Excavación arqueológica descubre una antigua ciudad funeraria en Egipto"
/8 = "Empresas lider en sector digital podrían asumir impuestos por nueva norma de la Unión Europea"
/9 = "Viajes a otros planetas podrían resultar comprometidos por la dependencia a las redes sociales"
/10 = "Estados Unidos prepara permisos para la circulación de carros sin conductor"
/11 = "Gobierno Nacional habilita 38 rutas por las que se puede recorrer Colombia en bicicleta"
/12 = "En defensa de las mujeres, colombiana Jineth Bedoya recibe Premio de Mujeres Anne Klein"
/13 = "Por problemas de seguridad nuclear, Bélgica reparte pastillas de yodo a su población"
/14 = "En latinoamérica, crecen las tasas de obesidad y sobrepeso"
/15 = "Aire contaminado en las ciudades podría afectar el cerebro de bebés en gestación"
/16 = "Drones norteamericanos tendrán inteligencia artificial diseñada con ayuda de Google"
</item>


<item headerpos>
/1 = "Banco de Alimentos recibe donaciones para extender sus servicios a 25 regiones más del país"
/2 = "Kuwait abre sus puertas a extranjeros enfermos de cáncer"
/3 = "El cáncer podría curarse dentro de 50 años pero está bastante cerca de ser eficazmente neutralizado, según académicos de EE.UU."
/4 = "Medidas de protección del Gobierno Nacional detuvieron los asesinatos a líderes sociales"
/5 = "Sierra Nevada de Santa Marta protegida temporalmente de extracciones mineras"
</item>

<item headerneg>
/1 = "Los servicios del Banco de Alimentos se suspenderán a sus beneficiarios durante por lo menos un año"
/2 = "Kuwait prohíbe a los extranjeros enfermos de cáncer vivir en su territorio"
/3 = "Contrario a lo que se pensaba, científicos norteamericanos afirman que la lucha contra el cáncer está muy lejos de ser ganada"
/4 = "En Colombia, cada 5 días muere un líder social. Desde 2016 ya son más de 200 muertes"
/5 = "Sierra Nevada de Santa Marta al borde de alerta ambiental por explotación minera"
</item>

<item headerarou>
/1 = "Estados Unidos contaría con ojivas nucleares altamente destructivas y soldados equipados con tecnología hipersónica"
/2 = "Zona norte de Rusia mortalmente amenazada por focos de diseminación de antrax ocasionados por el calentamiento global"
/3 = "Turquía anuncia que en cualquier momento iniciarían ataques altamente destructivos contra Siria e Irak"
/4 = "Bombardeos de la Fuerza Pública contra ELN cerca a resguardo desata pánico entre indígenas del Chocó"
/5 = "El calentamiento global causará extremas olas de calor mortífero en EE.UU. entre 2020 y 2070"
</item>

<item headernonarou>
/1 = "Trump declara querer modernizar su arsenal nuclear e invertir en sistemas de armamento avanzado"
/2 = "El cambio climático podría facilitar un brote de antrax al norte de Rusia"
/3 = "Turquía advierte sobre nuevos ataques en Siria e Irak"
/4 = "Comunidades indígenas del Chocó se declaran intranquilas ante ataques de la Fuerza Pública contra el ELN"
/5 = "Pronostican fuertes olas de calor que se presentarán en California y el sudoeste de Estados Unidos a partir de 2020"
</item>

<item logoEE>
/1 = "logo-elespectador.png"
</item>

<item logoET>
/1 = "logo-eltiempo.png"
</item>

<instruct>
/ inputdevice = mouse
</instruct>

<page intro>
^A continuación se le presentarán parejas de encabezados de noticias de los diarios El Espectador y El Tiempo. Oprima Click sobre el artículo que estaría interesado en leer. Después de realizar su elección, se le mostrará una escala en la cual deberá marcar la intensidad de su interés por leer el encabezado que eligió.
^^No podrá cambiar su respuesta una vez haya dado Click sobre un artículo o un recuadro de calificación.
</page>

<defaults>
/minimumversion = "4.0.2.0"
/canvasaspectratio = (4, 3)
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
</defaults>

<data>
/columns = (build, computer.platform, date, time, subject, blockcode, blocknum, trialcode, trialnum,
  text.header1.currentitem, text.header2.currentitem,text.headerpos.currentitem,text.headerneg.currentitem, text.headerarou.currentitem,text.headernonarou.currentitem
  response, latency, values.rt, values.headerchosen,
  expressions.corrected_rt_s, expressions.reciprocal_rt_s)
/separatefiles = true
</data>

<summarydata>
/columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, )
/ separatefiles = true
</summarydata>

<values>
/completed = 0
/rt = 0
/EE_hpos = 0%
/ET_hpos = 0%
/header1_hpos = 0%
/header2_hpos = 0%
/headerpos_hpos = 0%
/headerneg_hpos = 0%
/headerarou_hpos = 0%
/headernonarou_hpos = 0%
/headerchosen = ""
</values>

<expressions>
/corrected_rt_s = if (values.rt / 1000 > 40) 40 else if (values.rt / 1000 < 0.5) 0.5 else values.rt/1000
/reciprocal_rt_s = 1 / (expressions.corrected_rt_s)
</expressions>

<shape backg>
/ shape = rectangle
/ color = white
/ size = (95%,65%)
</shape>

<text label1>
/items = ("Nada interesado")
/ position = (20%, 50%)
/ size = (20%,20%)
</text>

<text label2>
/items = ("poco")
/ position = (50%, 50%)
/ size = (20%,20%)
</text>

<text label3>
/items = ("Muy interesado")
/ position = (80%, 50%)
/ size = (20%,20%)
</text>


<text question>
/items = questions
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text intens>
/items = intensidad
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text header1>
/ items = header_v1
/ select = noreplace
/ vposition = 40%
/ hposition = values.header1_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text header2>
/ items = header_v2
/ select = text.header1.currentindex
/ vposition = 40%
/ hposition = values.header2_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerpos>
/ items = headerpos
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerpos_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerneg>
/ items = headerneg
/ select = text.headerpos.currentindex
/ vposition = 40%
/ hposition = values.headerneg_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerarou>
/ items = headerarou
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerarou_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headernonarou>
/ items = headernonarou
/ select = text.headerarou.currentindex
/ vposition = 40%
/ hposition = values.headernonarou_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<list random_hpos>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<picture EE>
/items = logoEE
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.EE_hpos
</picture>

<picture ET>
/items = logoET
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.ET_hpos
</picture>

//shape elements for response coding as 00 and 01
<shape 00>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.EE_hpos
</shape>

<shape 01>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.ET_hpos
</shape>

//response 00 always corresponds to selection of brand EE
//response 01 always corresponds to selection of brand ET

<shape 02>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerpos_hpos
</shape>

<shape 03>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerneg_hpos
</shape>

<shape 04>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerarou_hpos
</shape>

<shape 05>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headernonarou_hpos
</shape>

<likert rate>
/ numpoints = 3
/ anchorwidth = 20%
/ stimulusframes = [1=intens; 2= backg; 3= label1, label2, label3]
</likert>

<trial choice>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.header1_hpos = list.random_hpos.nextvalue;
  values.header2_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "00" && values.EE_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "00" && values.EE_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 00, 01, question, header1,header2, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

<trial arounon>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerarou_hpos = list.random_hpos.nextvalue;
  values.headernonarou_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "02" && values.EE_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.EE_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
  else if (trial.choice.response == "02" && values.ET_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.ET_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 04, 05, question, headerarou,headernonarou, EE, ET]
/ validresponse = (04,05)
/ inputdevice = mouse
</trial>


//21

<block choiceblock>
/trials = [
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51 = noreplace(choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, arounon, arounon, arounon, arounon, arounon, posneg, posneg, posneg, posneg, posneg);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52 = rate
]
</block>

<expt>
/preinstructions = (intro)
/blocks = [1=choiceblock]
/onexptend = [values.completed = 1]
</expt>


Dave
Dave
Supreme Being
Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)

Group: Administrators
Posts: 8.8K, Visits: 36K
derodriguezz - Thursday, April 5, 2018
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!

I'm not sure what your question is. Could you please elaborate.

Sure!

Trial posneg shows a pairs of news items. Each item has a header and a brand. There are a group of headers, positives and negatives, and two brands. Headers and brands appear in random order on the screen. The selection is done by clicking the squares behind the cue composed by the <text headerpos> (<text headerneg>Wink and the < picture EE> (<picture EI>Wink for the brand. There are shape elements that appear behind the cues, and when clicked the trial must register for example, for a selection of a negative header with the brand EE, 00 and 03, which are the rectangles behind the cues, and appear relative to the position of the band and the header respectively. I'm reading the code like this because it was made by some of you, and I get lost in some parts. Is there any way for select overlapping shapes in one single click? Maybe the problem isn't in that piece and I can't notice.

This is the entire code.
 
Target Discrimination Taks



<parameters>
/questionfontsize = 5%
</parameters>

<item questions>
/1 = "¿Cuál de los dos artículos estaría interesado en leer?"
</item>

<item intensidad>
/1 = "Por favor, indique su grado de interés en leer el articulo que eligió"
</item>

<item header_v1>
/1 = "Fiscalía de Corea del Sur pide 30 años de cárcel para la expresidenta surcoreana"
/2 = "Siria habría fabricado armas químicas con material suministrado por Corea del Norte"
/3 = "Servicio de búsqueda de empleo de Facebook estará disponible en 40 países más"
/4 = "Utilidad de Avianca sumó US$82 millones en 2017 a pesar del paro"
/5 = "Inexplicable hallazgo de hielo cerca del ecuador de Marte"
/6 = "Cualquier iPhone podría ser ‘hackeado’ por una empresa israelí que afirma poder hacerlo"
/7 = "Arqueólogos egipcios descubren una necrópolis de dos mil años de antigüedad en El Cairo"
/8 = "Europa busca implementar normas de impuestos a empresas digitales líderes"
/9 = "La dependencia a las redes sociales podría perjudicar las misiones a otros planetas"
/10 = "Carros no tripulados están en proceso de transitar las calles Norteamericanas"
/11 = "Colombia ahora puede ser recorrida en bicicleta por 38 rutas habilitadas por el Gobierno Nacional"
/12 = "Premio de Mujeres a colombiana Jineth Bedoya por liderar la defensa de la mujer"
/13 = "Autoridades belgas distribuyen pastillas de yodo ante un posible incidente nuclear"
/14 = "El sobrepeso y la obesidad aumenta en América Latina"
/15 = "Un embarazo en una ciudad con mala calidad de aire podría afectar el cerebro del bebé"
/16 = "Google ayuda al Pentágono a construir inteligencia artificial para sus drones"
</item>

<item header_v2>
/1 = "30 años de cárcel imputados a la expresidenta de Corea del Sur por orden de la fiscalía de la nación" 
/2 = "Insumos para crear armas químicas en Siria habrían sido enviados por Corea del Norte" 
/3 = "Facebook ampliará en 40 países su servicio de búsqueda de empleo"
/4 = "Tras un año con paro, Avianca obtuvo US$82 millones en utilidades"
/5 = "Científicos encuentran inesperadas cantidades de hielo en Marte"
/6 = "Empresa israelí asegura poder ‘hackear’ cualquier iPhone"
/7 = "Excavación arqueológica descubre una antigua ciudad funeraria en Egipto"
/8 = "Empresas lider en sector digital podrían asumir impuestos por nueva norma de la Unión Europea"
/9 = "Viajes a otros planetas podrían resultar comprometidos por la dependencia a las redes sociales"
/10 = "Estados Unidos prepara permisos para la circulación de carros sin conductor"
/11 = "Gobierno Nacional habilita 38 rutas por las que se puede recorrer Colombia en bicicleta"
/12 = "En defensa de las mujeres, colombiana Jineth Bedoya recibe Premio de Mujeres Anne Klein"
/13 = "Por problemas de seguridad nuclear, Bélgica reparte pastillas de yodo a su población"
/14 = "En latinoamérica, crecen las tasas de obesidad y sobrepeso"
/15 = "Aire contaminado en las ciudades podría afectar el cerebro de bebés en gestación"
/16 = "Drones norteamericanos tendrán inteligencia artificial diseñada con ayuda de Google"
</item>


<item headerpos>
/1 = "Banco de Alimentos recibe donaciones para extender sus servicios a 25 regiones más del país"
/2 = "Kuwait abre sus puertas a extranjeros enfermos de cáncer"
/3 = "El cáncer podría curarse dentro de 50 años pero está bastante cerca de ser eficazmente neutralizado, según académicos de EE.UU."
/4 = "Medidas de protección del Gobierno Nacional detuvieron los asesinatos a líderes sociales"
/5 = "Sierra Nevada de Santa Marta protegida temporalmente de extracciones mineras"
</item>

<item headerneg>
/1 = "Los servicios del Banco de Alimentos se suspenderán a sus beneficiarios durante por lo menos un año"
/2 = "Kuwait prohíbe a los extranjeros enfermos de cáncer vivir en su territorio"
/3 = "Contrario a lo que se pensaba, científicos norteamericanos afirman que la lucha contra el cáncer está muy lejos de ser ganada"
/4 = "En Colombia, cada 5 días muere un líder social. Desde 2016 ya son más de 200 muertes"
/5 = "Sierra Nevada de Santa Marta al borde de alerta ambiental por explotación minera"
</item>

<item headerarou>
/1 = "Estados Unidos contaría con ojivas nucleares altamente destructivas y soldados equipados con tecnología hipersónica"
/2 = "Zona norte de Rusia mortalmente amenazada por focos de diseminación de antrax ocasionados por el calentamiento global"
/3 = "Turquía anuncia que en cualquier momento iniciarían ataques altamente destructivos contra Siria e Irak"
/4 = "Bombardeos de la Fuerza Pública contra ELN cerca a resguardo desata pánico entre indígenas del Chocó"
/5 = "El calentamiento global causará extremas olas de calor mortífero en EE.UU. entre 2020 y 2070"
</item>

<item headernonarou>
/1 = "Trump declara querer modernizar su arsenal nuclear e invertir en sistemas de armamento avanzado"
/2 = "El cambio climático podría facilitar un brote de antrax al norte de Rusia"
/3 = "Turquía advierte sobre nuevos ataques en Siria e Irak"
/4 = "Comunidades indígenas del Chocó se declaran intranquilas ante ataques de la Fuerza Pública contra el ELN"
/5 = "Pronostican fuertes olas de calor que se presentarán en California y el sudoeste de Estados Unidos a partir de 2020"
</item>

<item logoEE>
/1 = "logo-elespectador.png"
</item>

<item logoET>
/1 = "logo-eltiempo.png"
</item>

<instruct>
/ inputdevice = mouse
</instruct>

<page intro>
^A continuación se le presentarán parejas de encabezados de noticias de los diarios El Espectador y El Tiempo. Oprima Click sobre el artículo que estaría interesado en leer. Después de realizar su elección, se le mostrará una escala en la cual deberá marcar la intensidad de su interés por leer el encabezado que eligió.
^^No podrá cambiar su respuesta una vez haya dado Click sobre un artículo o un recuadro de calificación.
</page>

<defaults>
/minimumversion = "4.0.2.0"
/canvasaspectratio = (4, 3)
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
</defaults>

<data>
/columns = (build, computer.platform, date, time, subject, blockcode, blocknum, trialcode, trialnum,
  text.header1.currentitem, text.header2.currentitem,text.headerpos.currentitem,text.headerneg.currentitem, text.headerarou.currentitem,text.headernonarou.currentitem
  response, latency, values.rt, values.headerchosen,
  expressions.corrected_rt_s, expressions.reciprocal_rt_s)
/separatefiles = true
</data>

<summarydata>
/columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, )
/ separatefiles = true
</summarydata>

<values>
/completed = 0
/rt = 0
/EE_hpos = 0%
/ET_hpos = 0%
/header1_hpos = 0%
/header2_hpos = 0%
/headerpos_hpos = 0%
/headerneg_hpos = 0%
/headerarou_hpos = 0%
/headernonarou_hpos = 0%
/headerchosen = ""
</values>

<expressions>
/corrected_rt_s = if (values.rt / 1000 > 40) 40 else if (values.rt / 1000 < 0.5) 0.5 else values.rt/1000
/reciprocal_rt_s = 1 / (expressions.corrected_rt_s)
</expressions>

<shape backg>
/ shape = rectangle
/ color = white
/ size = (95%,65%)
</shape>

<text label1>
/items = ("Nada interesado")
/ position = (20%, 50%)
/ size = (20%,20%)
</text>

<text label2>
/items = ("poco")
/ position = (50%, 50%)
/ size = (20%,20%)
</text>

<text label3>
/items = ("Muy interesado")
/ position = (80%, 50%)
/ size = (20%,20%)
</text>


<text question>
/items = questions
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text intens>
/items = intensidad
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text header1>
/ items = header_v1
/ select = noreplace
/ vposition = 40%
/ hposition = values.header1_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text header2>
/ items = header_v2
/ select = text.header1.currentindex
/ vposition = 40%
/ hposition = values.header2_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerpos>
/ items = headerpos
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerpos_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerneg>
/ items = headerneg
/ select = text.headerpos.currentindex
/ vposition = 40%
/ hposition = values.headerneg_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerarou>
/ items = headerarou
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerarou_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headernonarou>
/ items = headernonarou
/ select = text.headerarou.currentindex
/ vposition = 40%
/ hposition = values.headernonarou_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<list random_hpos>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<picture EE>
/items = logoEE
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.EE_hpos
</picture>

<picture ET>
/items = logoET
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.ET_hpos
</picture>

//shape elements for response coding as 00 and 01
<shape 00>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.EE_hpos
</shape>

<shape 01>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.ET_hpos
</shape>

//response 00 always corresponds to selection of brand EE
//response 01 always corresponds to selection of brand ET

<shape 02>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerpos_hpos
</shape>

<shape 03>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerneg_hpos
</shape>

<shape 04>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerarou_hpos
</shape>

<shape 05>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headernonarou_hpos
</shape>

<likert rate>
/ numpoints = 3
/ anchorwidth = 20%
/ stimulusframes = [1=intens; 2= backg; 3= label1, label2, label3]
</likert>

<trial choice>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.header1_hpos = list.random_hpos.nextvalue;
  values.header2_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "00" && values.EE_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "00" && values.EE_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 00, 01, question, header1,header2, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

<trial arounon>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerarou_hpos = list.random_hpos.nextvalue;
  values.headernonarou_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "02" && values.EE_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.EE_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
  else if (trial.choice.response == "02" && values.ET_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.ET_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 04, 05, question, headerarou,headernonarou, EE, ET]
/ validresponse = (04,05)
/ inputdevice = mouse
</trial>


//21

<block choiceblock>
/trials = [
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51 = noreplace(choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, arounon, arounon, arounon, arounon, arounon, posneg, posneg, posneg, posneg, posneg);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52 = rate
]
</block>

<expt>
/preinstructions = (intro)
/blocks = [1=choiceblock]
/onexptend = [values.completed = 1]
</expt>


I wrote that code, but I still don't understand what your question is. My issue is understanding this:
"Is there any way for select overlapping shapes in one single click?"
Why and for what purpose would you want or need to do that? In other words: What is it that the code as it exists does not do, but you need it to do?

To put it concisely, it seems to me that the original code -- with only two response options -- already has all the information you need:

You know which of the two options was clicked, i.e. state A (brand: EE-ET) encoded as "00" and "01" respectively. You also know the positions of the two headers, i.e. whether a participant clicked on "00" or "01" in a given trial _also_ allows you to determine state B (valence: positive-negative): Nothing prevents you from logging that state as either "02" or "03" via the same /ontrialend logic that already exists here:

//response 00 always corresponds to selection of brand EE
//response 01 always corresponds to selection of brand ET

<trial choice>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.header1_hpos = list.random_hpos.nextvalue;
  values.header2_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "00" && values.EE_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "00" && values.EE_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
]

/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 00, 01, question, header1,header2, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

The trial above is _already_ figuring out two states from a single response: The brand chosen -- 00 or 01 -- and the header _item_ that corresponds to that choice. Of course, if we have already figured out what header _item_ was chosen, we also know which header _category_ that is (valence: positive v negative). It's the exact same operation. So, in essence

<values>
/ headercategory = ""
</values>

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  {values.headerchosen = text.headerpos.currentitem; values.headercategory = "02"}
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  {values.headerchosen = text.headerneg.currentitem; values.headercategory = "03"}
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  {values.headerchosen = text.headerpos.currentitem; values.headercategory = "02"}
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  {values.headerchosen = text.headerneg.currentitem;values.headercategory = "03"}
]


/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01,question, headerpos,headerneg, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

and logging values.headercategory to the <data> file should be all that's necessary.

Edited
2 Weeks Ago by Dave
derodriguezz
derodriguezz
Associate Member
Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)

Group: Forum Members
Posts: 10, Visits: 50
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!

I'm not sure what your question is. Could you please elaborate.

Sure!

Trial posneg shows a pairs of news items. Each item has a header and a brand. There are a group of headers, positives and negatives, and two brands. Headers and brands appear in random order on the screen. The selection is done by clicking the squares behind the cue composed by the <text headerpos> (<text headerneg>Wink and the < picture EE> (<picture EI>Wink for the brand. There are shape elements that appear behind the cues, and when clicked the trial must register for example, for a selection of a negative header with the brand EE, 00 and 03, which are the rectangles behind the cues, and appear relative to the position of the band and the header respectively. I'm reading the code like this because it was made by some of you, and I get lost in some parts. Is there any way for select overlapping shapes in one single click? Maybe the problem isn't in that piece and I can't notice.

This is the entire code.
 
Target Discrimination Taks



<parameters>
/questionfontsize = 5%
</parameters>

<item questions>
/1 = "¿Cuál de los dos artículos estaría interesado en leer?"
</item>

<item intensidad>
/1 = "Por favor, indique su grado de interés en leer el articulo que eligió"
</item>

<item header_v1>
/1 = "Fiscalía de Corea del Sur pide 30 años de cárcel para la expresidenta surcoreana"
/2 = "Siria habría fabricado armas químicas con material suministrado por Corea del Norte"
/3 = "Servicio de búsqueda de empleo de Facebook estará disponible en 40 países más"
/4 = "Utilidad de Avianca sumó US$82 millones en 2017 a pesar del paro"
/5 = "Inexplicable hallazgo de hielo cerca del ecuador de Marte"
/6 = "Cualquier iPhone podría ser ‘hackeado’ por una empresa israelí que afirma poder hacerlo"
/7 = "Arqueólogos egipcios descubren una necrópolis de dos mil años de antigüedad en El Cairo"
/8 = "Europa busca implementar normas de impuestos a empresas digitales líderes"
/9 = "La dependencia a las redes sociales podría perjudicar las misiones a otros planetas"
/10 = "Carros no tripulados están en proceso de transitar las calles Norteamericanas"
/11 = "Colombia ahora puede ser recorrida en bicicleta por 38 rutas habilitadas por el Gobierno Nacional"
/12 = "Premio de Mujeres a colombiana Jineth Bedoya por liderar la defensa de la mujer"
/13 = "Autoridades belgas distribuyen pastillas de yodo ante un posible incidente nuclear"
/14 = "El sobrepeso y la obesidad aumenta en América Latina"
/15 = "Un embarazo en una ciudad con mala calidad de aire podría afectar el cerebro del bebé"
/16 = "Google ayuda al Pentágono a construir inteligencia artificial para sus drones"
</item>

<item header_v2>
/1 = "30 años de cárcel imputados a la expresidenta de Corea del Sur por orden de la fiscalía de la nación" 
/2 = "Insumos para crear armas químicas en Siria habrían sido enviados por Corea del Norte" 
/3 = "Facebook ampliará en 40 países su servicio de búsqueda de empleo"
/4 = "Tras un año con paro, Avianca obtuvo US$82 millones en utilidades"
/5 = "Científicos encuentran inesperadas cantidades de hielo en Marte"
/6 = "Empresa israelí asegura poder ‘hackear’ cualquier iPhone"
/7 = "Excavación arqueológica descubre una antigua ciudad funeraria en Egipto"
/8 = "Empresas lider en sector digital podrían asumir impuestos por nueva norma de la Unión Europea"
/9 = "Viajes a otros planetas podrían resultar comprometidos por la dependencia a las redes sociales"
/10 = "Estados Unidos prepara permisos para la circulación de carros sin conductor"
/11 = "Gobierno Nacional habilita 38 rutas por las que se puede recorrer Colombia en bicicleta"
/12 = "En defensa de las mujeres, colombiana Jineth Bedoya recibe Premio de Mujeres Anne Klein"
/13 = "Por problemas de seguridad nuclear, Bélgica reparte pastillas de yodo a su población"
/14 = "En latinoamérica, crecen las tasas de obesidad y sobrepeso"
/15 = "Aire contaminado en las ciudades podría afectar el cerebro de bebés en gestación"
/16 = "Drones norteamericanos tendrán inteligencia artificial diseñada con ayuda de Google"
</item>


<item headerpos>
/1 = "Banco de Alimentos recibe donaciones para extender sus servicios a 25 regiones más del país"
/2 = "Kuwait abre sus puertas a extranjeros enfermos de cáncer"
/3 = "El cáncer podría curarse dentro de 50 años pero está bastante cerca de ser eficazmente neutralizado, según académicos de EE.UU."
/4 = "Medidas de protección del Gobierno Nacional detuvieron los asesinatos a líderes sociales"
/5 = "Sierra Nevada de Santa Marta protegida temporalmente de extracciones mineras"
</item>

<item headerneg>
/1 = "Los servicios del Banco de Alimentos se suspenderán a sus beneficiarios durante por lo menos un año"
/2 = "Kuwait prohíbe a los extranjeros enfermos de cáncer vivir en su territorio"
/3 = "Contrario a lo que se pensaba, científicos norteamericanos afirman que la lucha contra el cáncer está muy lejos de ser ganada"
/4 = "En Colombia, cada 5 días muere un líder social. Desde 2016 ya son más de 200 muertes"
/5 = "Sierra Nevada de Santa Marta al borde de alerta ambiental por explotación minera"
</item>

<item headerarou>
/1 = "Estados Unidos contaría con ojivas nucleares altamente destructivas y soldados equipados con tecnología hipersónica"
/2 = "Zona norte de Rusia mortalmente amenazada por focos de diseminación de antrax ocasionados por el calentamiento global"
/3 = "Turquía anuncia que en cualquier momento iniciarían ataques altamente destructivos contra Siria e Irak"
/4 = "Bombardeos de la Fuerza Pública contra ELN cerca a resguardo desata pánico entre indígenas del Chocó"
/5 = "El calentamiento global causará extremas olas de calor mortífero en EE.UU. entre 2020 y 2070"
</item>

<item headernonarou>
/1 = "Trump declara querer modernizar su arsenal nuclear e invertir en sistemas de armamento avanzado"
/2 = "El cambio climático podría facilitar un brote de antrax al norte de Rusia"
/3 = "Turquía advierte sobre nuevos ataques en Siria e Irak"
/4 = "Comunidades indígenas del Chocó se declaran intranquilas ante ataques de la Fuerza Pública contra el ELN"
/5 = "Pronostican fuertes olas de calor que se presentarán en California y el sudoeste de Estados Unidos a partir de 2020"
</item>

<item logoEE>
/1 = "logo-elespectador.png"
</item>

<item logoET>
/1 = "logo-eltiempo.png"
</item>

<instruct>
/ inputdevice = mouse
</instruct>

<page intro>
^A continuación se le presentarán parejas de encabezados de noticias de los diarios El Espectador y El Tiempo. Oprima Click sobre el artículo que estaría interesado en leer. Después de realizar su elección, se le mostrará una escala en la cual deberá marcar la intensidad de su interés por leer el encabezado que eligió.
^^No podrá cambiar su respuesta una vez haya dado Click sobre un artículo o un recuadro de calificación.
</page>

<defaults>
/minimumversion = "4.0.2.0"
/canvasaspectratio = (4, 3)
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
</defaults>

<data>
/columns = (build, computer.platform, date, time, subject, blockcode, blocknum, trialcode, trialnum,
  text.header1.currentitem, text.header2.currentitem,text.headerpos.currentitem,text.headerneg.currentitem, text.headerarou.currentitem,text.headernonarou.currentitem
  response, latency, values.rt, values.headerchosen,
  expressions.corrected_rt_s, expressions.reciprocal_rt_s)
/separatefiles = true
</data>

<summarydata>
/columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, )
/ separatefiles = true
</summarydata>

<values>
/completed = 0
/rt = 0
/EE_hpos = 0%
/ET_hpos = 0%
/header1_hpos = 0%
/header2_hpos = 0%
/headerpos_hpos = 0%
/headerneg_hpos = 0%
/headerarou_hpos = 0%
/headernonarou_hpos = 0%
/headerchosen = ""
</values>

<expressions>
/corrected_rt_s = if (values.rt / 1000 > 40) 40 else if (values.rt / 1000 < 0.5) 0.5 else values.rt/1000
/reciprocal_rt_s = 1 / (expressions.corrected_rt_s)
</expressions>

<shape backg>
/ shape = rectangle
/ color = white
/ size = (95%,65%)
</shape>

<text label1>
/items = ("Nada interesado")
/ position = (20%, 50%)
/ size = (20%,20%)
</text>

<text label2>
/items = ("poco")
/ position = (50%, 50%)
/ size = (20%,20%)
</text>

<text label3>
/items = ("Muy interesado")
/ position = (80%, 50%)
/ size = (20%,20%)
</text>


<text question>
/items = questions
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text intens>
/items = intensidad
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text header1>
/ items = header_v1
/ select = noreplace
/ vposition = 40%
/ hposition = values.header1_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text header2>
/ items = header_v2
/ select = text.header1.currentindex
/ vposition = 40%
/ hposition = values.header2_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerpos>
/ items = headerpos
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerpos_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerneg>
/ items = headerneg
/ select = text.headerpos.currentindex
/ vposition = 40%
/ hposition = values.headerneg_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerarou>
/ items = headerarou
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerarou_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headernonarou>
/ items = headernonarou
/ select = text.headerarou.currentindex
/ vposition = 40%
/ hposition = values.headernonarou_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<list random_hpos>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<picture EE>
/items = logoEE
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.EE_hpos
</picture>

<picture ET>
/items = logoET
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.ET_hpos
</picture>

//shape elements for response coding as 00 and 01
<shape 00>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.EE_hpos
</shape>

<shape 01>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.ET_hpos
</shape>

//response 00 always corresponds to selection of brand EE
//response 01 always corresponds to selection of brand ET

<shape 02>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerpos_hpos
</shape>

<shape 03>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerneg_hpos
</shape>

<shape 04>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerarou_hpos
</shape>

<shape 05>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headernonarou_hpos
</shape>

<likert rate>
/ numpoints = 3
/ anchorwidth = 20%
/ stimulusframes = [1=intens; 2= backg; 3= label1, label2, label3]
</likert>

<trial choice>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.header1_hpos = list.random_hpos.nextvalue;
  values.header2_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "00" && values.EE_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "00" && values.EE_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 00, 01, question, header1,header2, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

<trial arounon>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerarou_hpos = list.random_hpos.nextvalue;
  values.headernonarou_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "02" && values.EE_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.EE_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
  else if (trial.choice.response == "02" && values.ET_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.ET_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 04, 05, question, headerarou,headernonarou, EE, ET]
/ validresponse = (04,05)
/ inputdevice = mouse
</trial>


//21

<block choiceblock>
/trials = [
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51 = noreplace(choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, arounon, arounon, arounon, arounon, arounon, posneg, posneg, posneg, posneg, posneg);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52 = rate
]
</block>

<expt>
/preinstructions = (intro)
/blocks = [1=choiceblock]
/onexptend = [values.completed = 1]
</expt>


I wrote that code, but I still don't understand what your question is.

My issue is understanding this:

"Is there any way for select overlapping shapes in one single click?"

Why and for what purpose would you want or need to do that? In other words: What is it that the code as it exists does not do, but you need it to do?

What is it that the code as it exists does not do, but you need it to do?
In the column response of the raw data I just have for that trial 02 or 03, that corresponds to the valence, but I need another column for the brand that accompanied the header selected, with 00 or 01. The shapes are overlapping, so also I think that when clicked is only recorded one of the two anwers. I need to know both the header (that I already know) and  the brand that appeared along with the header. In the raw data I also have the header chosen, but I also want to have it coded.

The <trial chose> in the code that you wrote, registers the brand, as 00 and 01 and the selection can be done clicking any place of the whole item, the header or the brand, and i don´t need for that to know the header chosen in the code 02 or  03 because the content is the same. I have added the control trials posneg and arounon, and I'm trying to have the responde coded for the brand and for the headerchosen. 

That is for make easier the data analysis, and don't have to transform from the headerchosen value manually in 02 or 03 when a positive or negative header was selected.
Dave
Dave
Supreme Being
Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)Supreme Being (374K reputation)

Group: Administrators
Posts: 8.8K, Visits: 36K
derodriguezz - Thursday, April 5, 2018
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!

I'm not sure what your question is. Could you please elaborate.

Sure!

Trial posneg shows a pairs of news items. Each item has a header and a brand. There are a group of headers, positives and negatives, and two brands. Headers and brands appear in random order on the screen. The selection is done by clicking the squares behind the cue composed by the <text headerpos> (<text headerneg>Wink and the < picture EE> (<picture EI>Wink for the brand. There are shape elements that appear behind the cues, and when clicked the trial must register for example, for a selection of a negative header with the brand EE, 00 and 03, which are the rectangles behind the cues, and appear relative to the position of the band and the header respectively. I'm reading the code like this because it was made by some of you, and I get lost in some parts. Is there any way for select overlapping shapes in one single click? Maybe the problem isn't in that piece and I can't notice.

This is the entire code.
 
Target Discrimination Taks



<parameters>
/questionfontsize = 5%
</parameters>

<item questions>
/1 = "¿Cuál de los dos artículos estaría interesado en leer?"
</item>

<item intensidad>
/1 = "Por favor, indique su grado de interés en leer el articulo que eligió"
</item>

<item header_v1>
/1 = "Fiscalía de Corea del Sur pide 30 años de cárcel para la expresidenta surcoreana"
/2 = "Siria habría fabricado armas químicas con material suministrado por Corea del Norte"
/3 = "Servicio de búsqueda de empleo de Facebook estará disponible en 40 países más"
/4 = "Utilidad de Avianca sumó US$82 millones en 2017 a pesar del paro"
/5 = "Inexplicable hallazgo de hielo cerca del ecuador de Marte"
/6 = "Cualquier iPhone podría ser ‘hackeado’ por una empresa israelí que afirma poder hacerlo"
/7 = "Arqueólogos egipcios descubren una necrópolis de dos mil años de antigüedad en El Cairo"
/8 = "Europa busca implementar normas de impuestos a empresas digitales líderes"
/9 = "La dependencia a las redes sociales podría perjudicar las misiones a otros planetas"
/10 = "Carros no tripulados están en proceso de transitar las calles Norteamericanas"
/11 = "Colombia ahora puede ser recorrida en bicicleta por 38 rutas habilitadas por el Gobierno Nacional"
/12 = "Premio de Mujeres a colombiana Jineth Bedoya por liderar la defensa de la mujer"
/13 = "Autoridades belgas distribuyen pastillas de yodo ante un posible incidente nuclear"
/14 = "El sobrepeso y la obesidad aumenta en América Latina"
/15 = "Un embarazo en una ciudad con mala calidad de aire podría afectar el cerebro del bebé"
/16 = "Google ayuda al Pentágono a construir inteligencia artificial para sus drones"
</item>

<item header_v2>
/1 = "30 años de cárcel imputados a la expresidenta de Corea del Sur por orden de la fiscalía de la nación" 
/2 = "Insumos para crear armas químicas en Siria habrían sido enviados por Corea del Norte" 
/3 = "Facebook ampliará en 40 países su servicio de búsqueda de empleo"
/4 = "Tras un año con paro, Avianca obtuvo US$82 millones en utilidades"
/5 = "Científicos encuentran inesperadas cantidades de hielo en Marte"
/6 = "Empresa israelí asegura poder ‘hackear’ cualquier iPhone"
/7 = "Excavación arqueológica descubre una antigua ciudad funeraria en Egipto"
/8 = "Empresas lider en sector digital podrían asumir impuestos por nueva norma de la Unión Europea"
/9 = "Viajes a otros planetas podrían resultar comprometidos por la dependencia a las redes sociales"
/10 = "Estados Unidos prepara permisos para la circulación de carros sin conductor"
/11 = "Gobierno Nacional habilita 38 rutas por las que se puede recorrer Colombia en bicicleta"
/12 = "En defensa de las mujeres, colombiana Jineth Bedoya recibe Premio de Mujeres Anne Klein"
/13 = "Por problemas de seguridad nuclear, Bélgica reparte pastillas de yodo a su población"
/14 = "En latinoamérica, crecen las tasas de obesidad y sobrepeso"
/15 = "Aire contaminado en las ciudades podría afectar el cerebro de bebés en gestación"
/16 = "Drones norteamericanos tendrán inteligencia artificial diseñada con ayuda de Google"
</item>


<item headerpos>
/1 = "Banco de Alimentos recibe donaciones para extender sus servicios a 25 regiones más del país"
/2 = "Kuwait abre sus puertas a extranjeros enfermos de cáncer"
/3 = "El cáncer podría curarse dentro de 50 años pero está bastante cerca de ser eficazmente neutralizado, según académicos de EE.UU."
/4 = "Medidas de protección del Gobierno Nacional detuvieron los asesinatos a líderes sociales"
/5 = "Sierra Nevada de Santa Marta protegida temporalmente de extracciones mineras"
</item>

<item headerneg>
/1 = "Los servicios del Banco de Alimentos se suspenderán a sus beneficiarios durante por lo menos un año"
/2 = "Kuwait prohíbe a los extranjeros enfermos de cáncer vivir en su territorio"
/3 = "Contrario a lo que se pensaba, científicos norteamericanos afirman que la lucha contra el cáncer está muy lejos de ser ganada"
/4 = "En Colombia, cada 5 días muere un líder social. Desde 2016 ya son más de 200 muertes"
/5 = "Sierra Nevada de Santa Marta al borde de alerta ambiental por explotación minera"
</item>

<item headerarou>
/1 = "Estados Unidos contaría con ojivas nucleares altamente destructivas y soldados equipados con tecnología hipersónica"
/2 = "Zona norte de Rusia mortalmente amenazada por focos de diseminación de antrax ocasionados por el calentamiento global"
/3 = "Turquía anuncia que en cualquier momento iniciarían ataques altamente destructivos contra Siria e Irak"
/4 = "Bombardeos de la Fuerza Pública contra ELN cerca a resguardo desata pánico entre indígenas del Chocó"
/5 = "El calentamiento global causará extremas olas de calor mortífero en EE.UU. entre 2020 y 2070"
</item>

<item headernonarou>
/1 = "Trump declara querer modernizar su arsenal nuclear e invertir en sistemas de armamento avanzado"
/2 = "El cambio climático podría facilitar un brote de antrax al norte de Rusia"
/3 = "Turquía advierte sobre nuevos ataques en Siria e Irak"
/4 = "Comunidades indígenas del Chocó se declaran intranquilas ante ataques de la Fuerza Pública contra el ELN"
/5 = "Pronostican fuertes olas de calor que se presentarán en California y el sudoeste de Estados Unidos a partir de 2020"
</item>

<item logoEE>
/1 = "logo-elespectador.png"
</item>

<item logoET>
/1 = "logo-eltiempo.png"
</item>

<instruct>
/ inputdevice = mouse
</instruct>

<page intro>
^A continuación se le presentarán parejas de encabezados de noticias de los diarios El Espectador y El Tiempo. Oprima Click sobre el artículo que estaría interesado en leer. Después de realizar su elección, se le mostrará una escala en la cual deberá marcar la intensidad de su interés por leer el encabezado que eligió.
^^No podrá cambiar su respuesta una vez haya dado Click sobre un artículo o un recuadro de calificación.
</page>

<defaults>
/minimumversion = "4.0.2.0"
/canvasaspectratio = (4, 3)
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
</defaults>

<data>
/columns = (build, computer.platform, date, time, subject, blockcode, blocknum, trialcode, trialnum,
  text.header1.currentitem, text.header2.currentitem,text.headerpos.currentitem,text.headerneg.currentitem, text.headerarou.currentitem,text.headernonarou.currentitem
  response, latency, values.rt, values.headerchosen,
  expressions.corrected_rt_s, expressions.reciprocal_rt_s)
/separatefiles = true
</data>

<summarydata>
/columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, )
/ separatefiles = true
</summarydata>

<values>
/completed = 0
/rt = 0
/EE_hpos = 0%
/ET_hpos = 0%
/header1_hpos = 0%
/header2_hpos = 0%
/headerpos_hpos = 0%
/headerneg_hpos = 0%
/headerarou_hpos = 0%
/headernonarou_hpos = 0%
/headerchosen = ""
</values>

<expressions>
/corrected_rt_s = if (values.rt / 1000 > 40) 40 else if (values.rt / 1000 < 0.5) 0.5 else values.rt/1000
/reciprocal_rt_s = 1 / (expressions.corrected_rt_s)
</expressions>

<shape backg>
/ shape = rectangle
/ color = white
/ size = (95%,65%)
</shape>

<text label1>
/items = ("Nada interesado")
/ position = (20%, 50%)
/ size = (20%,20%)
</text>

<text label2>
/items = ("poco")
/ position = (50%, 50%)
/ size = (20%,20%)
</text>

<text label3>
/items = ("Muy interesado")
/ position = (80%, 50%)
/ size = (20%,20%)
</text>


<text question>
/items = questions
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text intens>
/items = intensidad
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text header1>
/ items = header_v1
/ select = noreplace
/ vposition = 40%
/ hposition = values.header1_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text header2>
/ items = header_v2
/ select = text.header1.currentindex
/ vposition = 40%
/ hposition = values.header2_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerpos>
/ items = headerpos
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerpos_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerneg>
/ items = headerneg
/ select = text.headerpos.currentindex
/ vposition = 40%
/ hposition = values.headerneg_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerarou>
/ items = headerarou
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerarou_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headernonarou>
/ items = headernonarou
/ select = text.headerarou.currentindex
/ vposition = 40%
/ hposition = values.headernonarou_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<list random_hpos>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<picture EE>
/items = logoEE
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.EE_hpos
</picture>

<picture ET>
/items = logoET
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.ET_hpos
</picture>

//shape elements for response coding as 00 and 01
<shape 00>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.EE_hpos
</shape>

<shape 01>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.ET_hpos
</shape>

//response 00 always corresponds to selection of brand EE
//response 01 always corresponds to selection of brand ET

<shape 02>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerpos_hpos
</shape>

<shape 03>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerneg_hpos
</shape>

<shape 04>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerarou_hpos
</shape>

<shape 05>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headernonarou_hpos
</shape>

<likert rate>
/ numpoints = 3
/ anchorwidth = 20%
/ stimulusframes = [1=intens; 2= backg; 3= label1, label2, label3]
</likert>

<trial choice>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.header1_hpos = list.random_hpos.nextvalue;
  values.header2_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "00" && values.EE_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "00" && values.EE_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 00, 01, question, header1,header2, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

<trial arounon>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerarou_hpos = list.random_hpos.nextvalue;
  values.headernonarou_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "02" && values.EE_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.EE_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
  else if (trial.choice.response == "02" && values.ET_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.ET_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 04, 05, question, headerarou,headernonarou, EE, ET]
/ validresponse = (04,05)
/ inputdevice = mouse
</trial>


//21

<block choiceblock>
/trials = [
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51 = noreplace(choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, arounon, arounon, arounon, arounon, arounon, posneg, posneg, posneg, posneg, posneg);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52 = rate
]
</block>

<expt>
/preinstructions = (intro)
/blocks = [1=choiceblock]
/onexptend = [values.completed = 1]
</expt>


I wrote that code, but I still don't understand what your question is.

My issue is understanding this:

"Is there any way for select overlapping shapes in one single click?"

Why and for what purpose would you want or need to do that? In other words: What is it that the code as it exists does not do, but you need it to do?

What is it that the code as it exists does not do, but you need it to do?
In the column response of the raw data I just have for that trial 02 or 03, that corresponds to the valence, but I need another column for the brand that accompanied the header selected, with 00 or 01. The shapes are overlapping, so also I think that when clicked is only recorded one of the two anwers. I need to know both the header (that I already know) and  the brand that appeared along with the header. In the raw data I also have the header chosen, but I also want to have it coded.

The <trial chose> in the code that you wrote, registers the brand, as 00 and 01 and the selection can be done clicking any place of the whole item, the header or the brand, and i don´t need for that to know the header chosen in the code 02 or  03 because the content is the same. I have added the control trials posneg and arounon, and I'm trying to have the responde coded for the brand and for the headerchosen. 

That is for make easier the data analysis, and don't have to transform from the headerchosen value manually in 02 or 03 when a positive or negative header was selected.

See the update to my previous response. As far as I can see, there is absolutely no need for any additional shapes. You can easily determine _both_ states you are interested in from the two response options 00 and 01.

derodriguezz
derodriguezz
Associate Member
Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)Associate Member (66 reputation)

Group: Forum Members
Posts: 10, Visits: 50
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Dave - Thursday, April 5, 2018
derodriguezz - Thursday, April 5, 2018
Hi everyone!
I'm setting a trial in which must be recorder 2 states from the selection in the same unique individual's choice between two cues. I have rectangles as buttons behind each cue, relative to the positions of the states. In this case, I´m coding response as "00"- "01" for the state A (brand: EE-ET) and "02" - "03" for  the state B (valence: positive-negative) of the cue. Actually the coding of the trial is just one of the two squares, that have the same size.

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

Thank You Very Much!

I'm not sure what your question is. Could you please elaborate.

Sure!

Trial posneg shows a pairs of news items. Each item has a header and a brand. There are a group of headers, positives and negatives, and two brands. Headers and brands appear in random order on the screen. The selection is done by clicking the squares behind the cue composed by the <text headerpos> (<text headerneg>Wink and the < picture EE> (<picture EI>Wink for the brand. There are shape elements that appear behind the cues, and when clicked the trial must register for example, for a selection of a negative header with the brand EE, 00 and 03, which are the rectangles behind the cues, and appear relative to the position of the band and the header respectively. I'm reading the code like this because it was made by some of you, and I get lost in some parts. Is there any way for select overlapping shapes in one single click? Maybe the problem isn't in that piece and I can't notice.

This is the entire code.
 
Target Discrimination Taks



<parameters>
/questionfontsize = 5%
</parameters>

<item questions>
/1 = "¿Cuál de los dos artículos estaría interesado en leer?"
</item>

<item intensidad>
/1 = "Por favor, indique su grado de interés en leer el articulo que eligió"
</item>

<item header_v1>
/1 = "Fiscalía de Corea del Sur pide 30 años de cárcel para la expresidenta surcoreana"
/2 = "Siria habría fabricado armas químicas con material suministrado por Corea del Norte"
/3 = "Servicio de búsqueda de empleo de Facebook estará disponible en 40 países más"
/4 = "Utilidad de Avianca sumó US$82 millones en 2017 a pesar del paro"
/5 = "Inexplicable hallazgo de hielo cerca del ecuador de Marte"
/6 = "Cualquier iPhone podría ser ‘hackeado’ por una empresa israelí que afirma poder hacerlo"
/7 = "Arqueólogos egipcios descubren una necrópolis de dos mil años de antigüedad en El Cairo"
/8 = "Europa busca implementar normas de impuestos a empresas digitales líderes"
/9 = "La dependencia a las redes sociales podría perjudicar las misiones a otros planetas"
/10 = "Carros no tripulados están en proceso de transitar las calles Norteamericanas"
/11 = "Colombia ahora puede ser recorrida en bicicleta por 38 rutas habilitadas por el Gobierno Nacional"
/12 = "Premio de Mujeres a colombiana Jineth Bedoya por liderar la defensa de la mujer"
/13 = "Autoridades belgas distribuyen pastillas de yodo ante un posible incidente nuclear"
/14 = "El sobrepeso y la obesidad aumenta en América Latina"
/15 = "Un embarazo en una ciudad con mala calidad de aire podría afectar el cerebro del bebé"
/16 = "Google ayuda al Pentágono a construir inteligencia artificial para sus drones"
</item>

<item header_v2>
/1 = "30 años de cárcel imputados a la expresidenta de Corea del Sur por orden de la fiscalía de la nación" 
/2 = "Insumos para crear armas químicas en Siria habrían sido enviados por Corea del Norte" 
/3 = "Facebook ampliará en 40 países su servicio de búsqueda de empleo"
/4 = "Tras un año con paro, Avianca obtuvo US$82 millones en utilidades"
/5 = "Científicos encuentran inesperadas cantidades de hielo en Marte"
/6 = "Empresa israelí asegura poder ‘hackear’ cualquier iPhone"
/7 = "Excavación arqueológica descubre una antigua ciudad funeraria en Egipto"
/8 = "Empresas lider en sector digital podrían asumir impuestos por nueva norma de la Unión Europea"
/9 = "Viajes a otros planetas podrían resultar comprometidos por la dependencia a las redes sociales"
/10 = "Estados Unidos prepara permisos para la circulación de carros sin conductor"
/11 = "Gobierno Nacional habilita 38 rutas por las que se puede recorrer Colombia en bicicleta"
/12 = "En defensa de las mujeres, colombiana Jineth Bedoya recibe Premio de Mujeres Anne Klein"
/13 = "Por problemas de seguridad nuclear, Bélgica reparte pastillas de yodo a su población"
/14 = "En latinoamérica, crecen las tasas de obesidad y sobrepeso"
/15 = "Aire contaminado en las ciudades podría afectar el cerebro de bebés en gestación"
/16 = "Drones norteamericanos tendrán inteligencia artificial diseñada con ayuda de Google"
</item>


<item headerpos>
/1 = "Banco de Alimentos recibe donaciones para extender sus servicios a 25 regiones más del país"
/2 = "Kuwait abre sus puertas a extranjeros enfermos de cáncer"
/3 = "El cáncer podría curarse dentro de 50 años pero está bastante cerca de ser eficazmente neutralizado, según académicos de EE.UU."
/4 = "Medidas de protección del Gobierno Nacional detuvieron los asesinatos a líderes sociales"
/5 = "Sierra Nevada de Santa Marta protegida temporalmente de extracciones mineras"
</item>

<item headerneg>
/1 = "Los servicios del Banco de Alimentos se suspenderán a sus beneficiarios durante por lo menos un año"
/2 = "Kuwait prohíbe a los extranjeros enfermos de cáncer vivir en su territorio"
/3 = "Contrario a lo que se pensaba, científicos norteamericanos afirman que la lucha contra el cáncer está muy lejos de ser ganada"
/4 = "En Colombia, cada 5 días muere un líder social. Desde 2016 ya son más de 200 muertes"
/5 = "Sierra Nevada de Santa Marta al borde de alerta ambiental por explotación minera"
</item>

<item headerarou>
/1 = "Estados Unidos contaría con ojivas nucleares altamente destructivas y soldados equipados con tecnología hipersónica"
/2 = "Zona norte de Rusia mortalmente amenazada por focos de diseminación de antrax ocasionados por el calentamiento global"
/3 = "Turquía anuncia que en cualquier momento iniciarían ataques altamente destructivos contra Siria e Irak"
/4 = "Bombardeos de la Fuerza Pública contra ELN cerca a resguardo desata pánico entre indígenas del Chocó"
/5 = "El calentamiento global causará extremas olas de calor mortífero en EE.UU. entre 2020 y 2070"
</item>

<item headernonarou>
/1 = "Trump declara querer modernizar su arsenal nuclear e invertir en sistemas de armamento avanzado"
/2 = "El cambio climático podría facilitar un brote de antrax al norte de Rusia"
/3 = "Turquía advierte sobre nuevos ataques en Siria e Irak"
/4 = "Comunidades indígenas del Chocó se declaran intranquilas ante ataques de la Fuerza Pública contra el ELN"
/5 = "Pronostican fuertes olas de calor que se presentarán en California y el sudoeste de Estados Unidos a partir de 2020"
</item>

<item logoEE>
/1 = "logo-elespectador.png"
</item>

<item logoET>
/1 = "logo-eltiempo.png"
</item>

<instruct>
/ inputdevice = mouse
</instruct>

<page intro>
^A continuación se le presentarán parejas de encabezados de noticias de los diarios El Espectador y El Tiempo. Oprima Click sobre el artículo que estaría interesado en leer. Después de realizar su elección, se le mostrará una escala en la cual deberá marcar la intensidad de su interés por leer el encabezado que eligió.
^^No podrá cambiar su respuesta una vez haya dado Click sobre un artículo o un recuadro de calificación.
</page>

<defaults>
/minimumversion = "4.0.2.0"
/canvasaspectratio = (4, 3)
/ fontstyle = ("Arial", 3.00%, false, false, false, false, 5, 1)
/ txcolor = (0, 0, 0)
</defaults>

<data>
/columns = (build, computer.platform, date, time, subject, blockcode, blocknum, trialcode, trialnum,
  text.header1.currentitem, text.header2.currentitem,text.headerpos.currentitem,text.headerneg.currentitem, text.headerarou.currentitem,text.headernonarou.currentitem
  response, latency, values.rt, values.headerchosen,
  expressions.corrected_rt_s, expressions.reciprocal_rt_s)
/separatefiles = true
</data>

<summarydata>
/columns = (script.startdate, script.starttime, script.subjectid, script.groupid, script.elapsedtime, computer.platform, values.completed, )
/ separatefiles = true
</summarydata>

<values>
/completed = 0
/rt = 0
/EE_hpos = 0%
/ET_hpos = 0%
/header1_hpos = 0%
/header2_hpos = 0%
/headerpos_hpos = 0%
/headerneg_hpos = 0%
/headerarou_hpos = 0%
/headernonarou_hpos = 0%
/headerchosen = ""
</values>

<expressions>
/corrected_rt_s = if (values.rt / 1000 > 40) 40 else if (values.rt / 1000 < 0.5) 0.5 else values.rt/1000
/reciprocal_rt_s = 1 / (expressions.corrected_rt_s)
</expressions>

<shape backg>
/ shape = rectangle
/ color = white
/ size = (95%,65%)
</shape>

<text label1>
/items = ("Nada interesado")
/ position = (20%, 50%)
/ size = (20%,20%)
</text>

<text label2>
/items = ("poco")
/ position = (50%, 50%)
/ size = (20%,20%)
</text>

<text label3>
/items = ("Muy interesado")
/ position = (80%, 50%)
/ size = (20%,20%)
</text>


<text question>
/items = questions
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text intens>
/items = intensidad
/select = 1
/position = (50%, 10%)
/erase = false
/size = (80%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, false, false, false, false, 5, 1)
/ txcolor = black
</text>

<text header1>
/ items = header_v1
/ select = noreplace
/ vposition = 40%
/ hposition = values.header1_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text header2>
/ items = header_v2
/ select = text.header1.currentindex
/ vposition = 40%
/ hposition = values.header2_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerpos>
/ items = headerpos
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerpos_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerneg>
/ items = headerneg
/ select = text.headerpos.currentindex
/ vposition = 40%
/ hposition = values.headerneg_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headerarou>
/ items = headerarou
/ select = noreplace
/ vposition = 40%
/ hposition = values.headerarou_hpos
/ erase = false
/ size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<text headernonarou>
/ items = headernonarou
/ select = text.headerarou.currentindex
/ vposition = 40%
/ hposition = values.headernonarou_hpos
/erase = false
/size = (40%, 10%)
/ fontstyle = ("Arial", parameters.questionfontsize, true, false, false, false, 5, 1)
/ txcolor = black
/ hjustify = left
</text>

<list random_hpos>
/ items = (25%, 75%)
/ selectionrate = always
</list>

<picture EE>
/items = logoEE
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.EE_hpos
</picture>

<picture ET>
/items = logoET
/ size = (40%, 30%)
/ vposition = 30%
/ hposition = values.ET_hpos
</picture>

//shape elements for response coding as 00 and 01
<shape 00>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.EE_hpos
</shape>

<shape 01>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.ET_hpos
</shape>

//response 00 always corresponds to selection of brand EE
//response 01 always corresponds to selection of brand ET

<shape 02>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerpos_hpos
</shape>

<shape 03>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerneg_hpos
</shape>

<shape 04>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headerarou_hpos
</shape>

<shape 05>
/ shape = rectangle
/ color = white
/ erase = false
/ size = (40%, 60%)
/ vposition = 50%
/ hposition = values.headernonarou_hpos
</shape>

<likert rate>
/ numpoints = 3
/ anchorwidth = 20%
/ stimulusframes = [1=intens; 2= backg; 3= label1, label2, label3]
</likert>

<trial choice>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.header1_hpos = list.random_hpos.nextvalue;
  values.header2_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "00" && values.EE_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "00" && values.EE_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header1_hpos)
  values.headerchosen = text.header1.currentitem;
  else if (trial.choice.response == "01" && values.ET_hpos == values.header2_hpos)
  values.headerchosen = text.header2.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 00, 01, question, header1,header2, EE, ET]
/ validresponse = (00,01)
/ inputdevice = mouse
</trial>

<trial posneg>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerpos_hpos = list.random_hpos.nextvalue;
  values.headerneg_hpos = list.random_hpos.nextvalue;

]
/ ontrialend = [
  if (trial.posneg.response == "02" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "02" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "03" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;

  if (trial.posneg.response == "00" && values.EE_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "00" && values.EE_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerpos_hpos)
  values.headerchosen = text.headerpos.currentitem;
  else if (trial.posneg.response == "01" && values.ET_hpos == values.headerneg_hpos)
  values.headerchosen = text.headerneg.currentitem;
]

/ontrialend = [
  values.rt = trial.posneg.latency;

]
/stimulusframes = [1 = 00, 01, 02, 03, question, headerpos,headerneg, EE, ET]
/ validresponse = (02,03,00,01)
/ inputdevice = mouse
</trial>

<trial arounon>
/ ontrialbegin = [
  values.EE_hpos = list.random_hpos.nextvalue;
  values.ET_hpos = list.random_hpos.nextvalue;
  values.headerarou_hpos = list.random_hpos.nextvalue;
  values.headernonarou_hpos = list.random_hpos.nextvalue;
]
/ ontrialend = [
  if (trial.choice.response == "02" && values.EE_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.EE_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
  else if (trial.choice.response == "02" && values.ET_hpos == values.headerarou_hpos)
  values.headerchosen = text.headerarou.currentitem;
  else if (trial.choice.response == "03" && values.ET_hpos == values.headernonarou_hpos)
  values.headerchosen = text.headernonarou.currentitem;
]
/ontrialend = [
  values.rt = trial.choice.latency;
]
/stimulusframes = [1 = 04, 05, question, headerarou,headernonarou, EE, ET]
/ validresponse = (04,05)
/ inputdevice = mouse
</trial>


//21

<block choiceblock>
/trials = [
1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,43,45,47,49,51 = noreplace(choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, choice, arounon, arounon, arounon, arounon, arounon, posneg, posneg, posneg, posneg, posneg);
2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52 = rate
]
</block>

<expt>
/preinstructions = (intro)
/blocks = [1=choiceblock]
/onexptend = [values.completed = 1]
</expt>


I wrote that code, but I still don't understand what your question is.

My issue is understanding this:

"Is there any way for select overlapping shapes in one single click?"

Why and for what purpose would you want or need to do that? In other words: What is it that the code as it exists does not do, but you need it to do?

What is it that the code as it exists does not do, but you need it to do?
In the column response of the raw data I just have for that trial 02 or 03, that corresponds to the valence, but I need another column for the brand that accompanied the header selected, with 00 or 01. The shapes are overlapping, so also I think that when clicked is only recorded one of the two anwers. I need to know both the header (that I already know) and  the brand that appeared along with the header. In the raw data I also have the header chosen, but I also want to have it coded.

The <trial chose> in the code that you wrote, registers the brand, as 00 and 01 and the selection can be done clicking any place of the whole item, the header or the brand, and i don´t need for that to know the header chosen in the code 02 or  03 because the content is the same. I have added the control trials posneg and arounon, and I'm trying to have the responde coded for the brand and for the headerchosen. 

That is for make easier the data analysis, and don't have to transform from the headerchosen value manually in 02 or 03 when a positive or negative header was selected.

See the update to my previous response. As far as I can see, there is absolutely no need for any additional shapes. You can easily determine _both_ states you are interested in from the two response options 00 and 01.

well thak you Dave, you help me learn a lot!
GO


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....






Millisecond Forums


Search