Forum Replies Created
-
AuthorPosts
-
JunLyu
ParticipantI have encountered the same issue recently. I found that sometimes downloading is fine, but sometimes not. I wonder what the cause for this is.
JunLyu
ParticipantHi,
I have the same issue. This is what I have:
newTrial(“subject_info”,
newHtml(“subject_info”, “info.html”)
.log()
.cssContainer({“width”:”720px”})
.checkboxWarning(“I consent to participate”)
.center()
.print()
,
newButton(“continue”, “Click to continue”)
.center()
.print()
.wait(getHtml(“subject_info”).test.complete()
.failure(getHtml(“subject_info”).warn())
)
)But it doesn’t seem to work. The results file did not show subjects’ meta data. I also tried putting .log() at the end of the newTrial, but it doesn’t seem to work for me either.
newTrial(“subject_info”,
newHtml(“subject_info”, “info.html”)
.cssContainer({“width”:”720px”})
.checkboxWarning(“I consent to participate”)
.center()
.print()
,
newButton(“continue”, “Click to continue”)
.center()
.print()
.wait(getHtml(“subject_info”).test.complete()
.failure(getHtml(“subject_info”).warn())
)
).log()Am I missing something?
Best,
March 27, 2023 at 10:23 pm in reply to: Assign a truth value to the picture verification tasl #10425JunLyu
ParticipantThank you Jeremy! It works now.
February 21, 2023 at 1:48 am in reply to: Comprehension question and rshuffle in self-paced reading #9944JunLyu
ParticipantSorry Jeremy for the confusion! I find that the program does randomizes. But most of the time, it sticks to a pattern. For example, I have noticed during my first run that most of the answer choices show Answer1 first; on my second run, Answer2 follows Answer1 a lot. This may be co-incidental I think.
February 21, 2023 at 1:38 am in reply to: Comprehension question and rshuffle in self-paced reading #9943JunLyu
ParticipantHi Jeremy,
It’s been a year since I last posted under this thread. I have tried randomizing the answer choices following what you suggested:
Template("file.csv", row => newTrial("experimental-trial", newController("DashedSentence",{s: row.Sentence}) .cssContainer({"margin-top":"2em", "margin-bottom":"2em"}) .print() .center() .log() .wait() .remove() , newText("CompQuestion", row.Question) .center() .print() , newVar("isCorrect").global() , newScale("answer",...[row.Answer1,row.Answer2].sort(v=>0.5-Math.random())) .labelsPosition("right") .center() .log() .print() .wait() .test.selected( row.Answer1 ) .success( getVar("isCorrect").set(true) ) .failure( getVar("isCorrect").set(false) ) ) .log("isCorrect", getVar("isCorrect")) .log("group", row.Group) .log("item", row.Item) .log("itemID", row.Item_ID) .log("condition", row.Condition) )
But the presentation order of the answer choices is still fixed. Answer1 always appears before Answer2. Is there something I am missing?
Best,
JunJunLyu
ParticipantThank you Jeremy! Now it works.
JunLyu
ParticipantHi Jeremy,
Yes, here is the html code.
<script language="javascript" type="text/javascript"> function randomString() { var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"; var string_length = 8; var randomstring = ''; for (var i=0; i<string_length; i++) { var rnum = Math.floor(Math.random() * chars.length); randomstring += chars.substring(rnum,rnum+1); } document.randform.randomfield.value = randomstring; } </script> <h3> Participant ID: </h3> We require you to generate a unique identifier so that we can match your reading experiment answers to the questionnaire.<br> <br> <table> <tr> <td colspan="1"> <b> 1. Click on the following button to create your unique identifier. </b> </td> </tr> <tr> <td> <form name="randform"> <input type="button" value="Create unique identifier" onClick="randomString();"> <input type="text" name="randomfield" value=""> </form> </td> </tr> <tr> <td> <b>2. Copy and paste the identifier above into the box below: </b> </td> </tr> <tr> <td colspan="1"> <textarea name="identifier" rows="1" cols="8" class="obligatory"></textarea> </td> </tr> </table> <tr> <td> <b>3. Also copy and paste the identifier above into the "Participant ID" box on Qualtrics (the questionnaire that you opened): </b> </td> </tr>
I have copied my project. Here’s the link to the project copy:
https://farm.pcibex.net/r/dmGVab/
Jun
JunLyu
ParticipantHi Jeremy,
The html itself works fine (both my old html that generates the ID and your code). But the ID generated on the html cannot be found in my results file. Here is what my html file (not the script which works) looks like:
“We require you to generate a unique identifier so that we can match your reading experiment answers to the questionnaire.
1. Click on the following button to create your unique identifier.
(A button here says “create unique identifier)2. Copy and paste the identifier above into the box below:
(there is a box here in which participants can copy-paste the ID; I am supposed to see this ID in the results file but I do not)3. Also copy and paste the identifier above into the “Participant ID” box on Qualtrics (the questionnaire that you opened).”
I should be able to see the ID participants generate. But now I cannot. So I wonder whether my code in the “main” script is incorrect:
//Generate random IDs newTrial("ID", newHtml("ID", "ID.html") .cssContainer({"width":"720px"}) .center() .print() .log() , newButton("continue", "Click to continue") .center() .print() .wait(getHtml("ID").test.complete() .failure(getHtml("ID").warn()) ) )
Jun
January 22, 2023 at 3:33 pm in reply to: Presenting self-defined regions in self-paced reading #9855JunLyu
ParticipantThank you Jeremy! This is helpful! I discovered that using the underscore _ also works to concatenate strings. But I did not know that we can define our own splitters.
JunLyu
ParticipantThank you!! I will try that.
February 9, 2022 at 6:25 pm in reply to: Comprehension question and rshuffle in self-paced reading #7732JunLyu
ParticipantHi Jeremy,
Sorry for two more questions. I referenced the advanced tutorial (https://doc.pcibex.net/advanced-tutorial/11_collecting-participant-info.html) when embedding an html collecting the participants’ demographic information (age, gender, other languages, etc.). Here’s the bit of code I used:
newTrial("subject_info", newHtml("subject_info", "info.html") // info.html is a page collecting people's demographic info .cssContainer({"width":"720px"}) .checkboxWarning("I agree to proceed") .print() , newButton("continue", "click to continue") .center() .print() .wait(getHtml("subject_info").test.complete() .failure(getHtml("csubject_info").warn()) ) )
But I found that no participant’s information has been stored. Do I need to add another command to “log” their responses?
Another issue is that each participant has been assigned a label consisting of digits and letters. I thought these labels were unique for each participant (so that when I run my mixed model, each participant will be treated separately). But I think this is not always the case. Sometimes, two participants have been assigned the same label. I wonder when that might happen, and is there some good way to avoid this?
February 9, 2022 at 2:39 pm in reply to: Comprehension question and rshuffle in self-paced reading #7730JunLyu
ParticipantThank you Jeremy for clearing my confusion! I can now get the information I want after a trial run. I have a minor clarification question regarding
.log()
though. I only need to append the.log()
command after each NewTrial, correct? I don’t need to use.log()
command after each “task” (spr, sentence-final judgment) I assume (although it should also work)?For example, here’s what I used in the script (the
.log()
commands are appended to the end of newTrial):Template("demo_data.csv", row => newTrial("experimental-trial", newController("DashedSentence",{s: row.Sentence}) .cssContainer({"margin-top":"2em", "margin-bottom":"2em"}) .print() .center() .log() .wait() .remove() , newScale(7) .before( newText("left", "<div class='fancy'>(非常不通顺)</div>") ) .after( newText("right", "<div class='fancy'>(非常通顺)</div>") ) .labelsPosition("top") .keys() .log() .once() .color("LightCoral") .center() .print() .wait() .remove() ) .log("group", row.Group) .log("item", row.Item_ID) .log("condition", row.Condition) )
Jun
February 8, 2022 at 4:39 pm in reply to: Comprehension question and rshuffle in self-paced reading #7728JunLyu
ParticipantHi Jeremy,
Following my previous post, after data collection, I found that in the results file, the conditions (e.g., Target_a, Target_b,…) were not appended to the trials (I see “experiment-trial” appended to each trial instead), although the conditions were labeled in the csv file. The same problem applies to other labels like “Experiment”, “Group”, etc.
This the code I used:
Template("demo_data.csv", row => newTrial("experimental-trial", newController("DashedSentence",{s: row.Sentence}) .cssContainer({"margin-top":"2em", "margin-bottom":"2em"}) .print() .center() .log() .wait() .remove() , newScale(7) .before( newText("left", "<div class='fancy'>(Highly unacceptable)</div>") ) .after( newText("right", "<div class='fancy'>(Highly acceptable)</div>") ) .labelsPosition({"margin-top":"2em", "margin-bottom":"2em"}) .keys() .log() .once() .color("LightCoral") .center() .print() .wait() .remove() ) )
Another minor issue is that for some reason, the Item ID for each trial was incremented by a fixed number (maybe by the number of practice trials and number of instruction texts).
Could you please let me know what went wrong? Thank you!
Jun
December 14, 2021 at 8:36 pm in reply to: Comprehension question and rshuffle in self-paced reading #7621JunLyu
ParticipantThank you Jeremy! I only checked the demonstration link, not the data collection link. It’s good to know!
Jun
December 14, 2021 at 6:42 pm in reply to: Comprehension question and rshuffle in self-paced reading #7619JunLyu
ParticipantThank you Jeremy! That’s very helpful. I see your point: the
.log("iscorrect",getVar("iscorrect"))
bit is essentially appended tonewTrial
. I have two more very minor questions:1.
.success( getVar("isCorrect").set(true) )
sets the response to “true” when there is a correct response. Is “true” written as “1” to the results file, or is it written as “true” to the file? If it is the latter, can I set it toset("1")
?2. For one of my old Ibex files which I transferred to PC Ibex, I cannot turn the debugger off with
DebugOff()
. I wonder whether this is because the original Ibex syntax does not work well withDebugOff()
? I have something like the following:PennController.ResetPrefix(null); DebugOff(); Sequence("consent","instructions", "practice1","good_demo","practice2","bad_demo","practice3","more_demo","practice4","practice5","transfer",randomize("experimental-trial"), SendResults(), "end") SetCounter("counter", "inc", 1); newTrial(...
Jun
-
AuthorPosts