Erwin Haasnoot

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 33 total)
  • Author
    Posts
  • in reply to: Move to Next Stimulus on Keypress #2260
    Erwin Haasnoot
    Keymaster

    Hi Tim,

    Please note that the OnShow function is called AFTER the display stimulus is intended to be shown. This means that very heavy computations in the OnShow function can significantly alter the accuracy of the RT (as this is based on the current time against the Stimulus OnsetTime).

    As a rule of thumb, I would say that a calculation that takes more than 8 ms is unwanted, anything below should be fine in 99.9% of the cases. You can measure how long your function takes to see if it would alter the accuracy very much.

    Best regards,

    Erwin

    in reply to: Dynamic global variable #2259
    Erwin Haasnoot
    Keymaster

    Sorry about that, I was in a hurry when I wrote the piece and didn’t fact check it correctly.

    You will need to call QRTE.getTrialData / QRTE.setTrialData. QRTEngine.setTrialData, unlike what is claimed in my previous post, does not exist (nor does QRTEngine.getBlockData etc.), hence the ‘undefined’ values.

    Note that Trial Data is reset after each trial, so you would need to use Block Data

    in reply to: Parser not working for me on Mas OSX #2237
    Erwin Haasnoot
    Keymaster

    Hi Lindsay and Elizabeth,

    Very sorry about the late response. We try to be vigilant for questions, but sometimes some of the slip through the cracks ๐Ÿ™

    We’re working on a new version of the parser in python and deprecating the old one when that happens. The new version should be ready for use very soon (including a fancy webservice that you’ll be able to set-up for yourself very easily as well).

    If you’d like your datafile parsed quickly, you can drop us an email at support@qrtengine.com and we’ll do the parsing for you.

    Hopefully this solves your problems. Again, we apologize for the delayed response.

    Best regards,

    Erwin

    in reply to: Dynamic global variable #2234
    Erwin Haasnoot
    Keymaster

    Hi Tim,

    I notice this issue hasn’t been properly documented yet. You’re correct in assuming setTrialData is close to what you need.

    We have defined a three-level data system in the QRTEngine. The first is TrialData, which is stored and reset per-trial. A higher level is BlockData (QRTEngine.setBlockData(‘field’,value) and QRTEngine.getBlockData(‘field’) for data that persists through a block, but is reset upon encountering a new block. The last level is Survey Data (QRTEngine.setSurveyData(‘field’,value) and QRTEngine.getSurveyData(‘field’)) for survey wide data storage, which is basically a wrapper around the Qualtrics.SurveyEngine.setEmbeddedData functions.

    It seems like you would need set and getBlockData for your survey.

    Let me know if you can figure it out from here!

    Best regards,

    Erwin

    in reply to: Get trial (Loop & Merge sample) number #2226
    Erwin Haasnoot
    Keymaster

    Hi Becky,

    You’re close! But there’s a slight issue.
    return '${lm://CurrentLoopNumber}' === 20

    Evaluates, in Qualtrics, on CurrentLoopNumber 20 to:

    return '20' === 20

    Now, see for yourself. Open the developer console and then type in: ’20’ === 20. You’ll notice that it evaluates to “false”.

    This is because === strictly type checks, next to value. ’20’ is a string, 20 is a number, these don’t match, so it’s false.

    Fixing it simple. Simply wrap the 20 in quotes, so that it becomes a string: ’20’

    return '${lm://CurrentLoopNumber}' === '20'

    Hopefully you’ll be able to figure it out from here!

    Best regards,

    Erwin

    in reply to: nullpointerexception error using parser #2210
    Erwin Haasnoot
    Keymaster

    Hi Elizabeth,

    Not only would it be nice to have a properly parsed file, it is absolutely essential ๐Ÿ™‚

    We’re getting close to finishing a new version of the parser that hopefully gives you more insight into why the parser fails at parsing the file.

    This won’t help your current situation, so I’d like to take a look at your current data file, if you don’t mind, to see what’s wrong. Would you mind contacting us at support@qrtengine.com and send us the data file?

    Best regards,

    Erwin

    in reply to: loading glitches /w pre-made Stroop task #2208
    Erwin Haasnoot
    Keymaster

    Hi Michael,

    Thanks for your interesting the QRTEngine!

    1) Does the jolting persist if you run the survey without preview mode on? Ie, launch the survey and then run it. The preview mode box at the top is what causes the jolting, usually.

    2) What usually causes the freezing is a slow connection to the Qualtrics server. A good way to check whether this is actually the case is by analyzing the data file (run it through the parser). If done correctly, you’ll see a InitPre[CalculatedDuration] column. This column tells you how long it took, in milliseconds, to load the page. If high values in this column (>1500-2000) correspond to freezes of the survey, the loading time is your culprit. If it’s not, let us know!

    Hopefully this helps.

    Best regards,

    Erwin

    in reply to: trouble adding the contents of the QRTEngine.js file #2176
    Erwin Haasnoot
    Keymaster

    Hi Domonkos,

    Are you by any chance using a trial account? Qualtrics no longer allows you to change your lay-out and add your own Look & Feel HTML to a Survey. There’s not a lot we can do about this, sadly ๐Ÿ™ If this is not the case, let us know!

    Best regards,

    Erwin

    in reply to: Move to Next Stimulus on Keypress #2175
    Erwin Haasnoot
    Keymaster

    Hi Tim,

    A quick check in the source-code tells me that, although the config name is case-insensitive, the config value is not. See:

    https://github.com/ErwinHaasnoot/QRTEngine/blob/master/lib/QRTEngine.js#L941

    You need change all occurrences of ‘terminate’ to ‘TERMINATE’

    Best regards,

    Erwin

    in reply to: Displaying RT data after each trial #1986
    Erwin Haasnoot
    Keymaster

    Hi Becky,

    The “PressKey” part is the ID of the stimulus, not some kind of magic value that gets the RT of any stimulus. So you would either need a stimulus with PressKey as ID (which you can change in the JavaScript of said stimulus), or you would need to change PressKey to something else in the JavaScript I posted. Hopefully you’ll be able to figure it out from here!

    Best regards,

    Erwin

    in reply to: Displaying RT data after each trial #1974
    Erwin Haasnoot
    Keymaster

    Hi Becky,

    Good question. In technical terms this is called “view binding” or “one-way binding”. If a value of a variable changes, update it in the corresponding element that’s being viewed. (As opposed to two-way binding, where if a view is updated, the corresponding variable (model) is updated as well) Currently one-way binding is not supported in the QRTEngine, so your best bet would be to build your own JS/HTML solution. The trick would be to use a combination of HTML and JS to update your value upon showing the stimulus, the simplest form would be the following:

    In your HTML View, add an element with a specific ID (important!). For example:

    <div id="CustomElement"></div>

    The onShowFn in the Stimulus JS is a function that gets called upon the stimulus being shown (or rather, right before its shown). This would be the ideal place to put a bit a code that changes the innerHTML of the HTML element we just defined.

    We can target the element as defined above, with the JS defined below:

    $('CustomElement').innerHTML = 'testtext';

    This would change the contents of the HTML element to ‘testtext’.

    Instead of using the ‘testtext’ as, you want to use the RT instead. Which would be the following:

    $('CustomElement').innerHTML = QRTE.getTrialData(โ€œPressKey[RT]โ€);

    If placed in the correct question, this should update the content of our CustomElmement to the RT of the PressKey stimulus.

    Hope this helps!

    Best,

    Erwin

    in reply to: Parser not converting all rows #1963
    Erwin Haasnoot
    Keymaster

    Hi Sy,

    One more thing. In the original data file, did you leave out the row with the question text? The parser expects this row to be there, but skips it automatically. If you only have one respondent in your data, the parser would automatically skip the respondent data instead, and return an empty file. Make sure you keep the export tags checkbox checked!

    Best,

    Erwin

    in reply to: Parser not converting all rows #1962
    Erwin Haasnoot
    Keymaster

    Hi everyone,

    Sorry about the late reply. Sadly the parser is a difficult subject to tackle. My hands are tied when it comes to having the QRTEngine return a proper, Qualtrics “native” data set. Qualtrics doesn’t support dynamically adding new columns to their data sets (neither in Questions, nor in Embedded Data). This is solved by having the QRTEngine output the dynamically created fields (such as Stimulus RTs, Responses, Onset & Offsettimes, etc. etc. ) in a relatively standard JSON format. The parser then takes this JSON format and turns into into columns in a CSV file.

    Setting up your QRTE-enabled task correctly for the parser is rather tricky, as it relies on a few options that, if configured incorrectly, don’t negatively impact the performance of the survey, and as such are easy to go by unnoticed. I have released the source of the Parser on my github: https://github.com/ErwinHaasnoot/QRTEParser, but sadly I haven’t found the time yet to properly document the code.

    Regarding your issues: It sounds like your issues all differ from eachother. @Nina, maybe there’s something strange about your third participant that causes a hard crash in the QRTEParser. Would you mind e-mailing your datafile to support@qrtengine.com so I can investigate? The same for your first participant, SY.

    I have addressed Stephen’s issue in an e-mail he sent to me. The issue was due to Stephen’s task not containing unique question tags for his Exit questions, resulting in the parser continuously overwriting the data from the the previous block (and as a result, only having the last block left in the dataset, which consequently was the largest as well).

    Best,

    Erwin

    in reply to: error message #1961
    Erwin Haasnoot
    Keymaster

    Hi Stephen,

    Glad you managed to figure it out.

    Best,

    Erwin

    in reply to: continue display stimulus across multiple other stimuli #1938
    Erwin Haasnoot
    Keymaster

    Hi Shiyu,

    stimContinue works slightly different than, I suspect, you expect it to.

    The QRTEngine goes over each stimuli that you’ve defined in a trial, and per stimulus, decides whether the current stimulus should be the last stimulus on the current screen (page), or if it should look for another stimulus. Setting stimContinue to true is equivalent to telling the QRTEngine to not cut off the page at the current stimulus, but look for another one.

    So, if you have 3 stimuli, and don’t set stimContinue for any of them, it will show each stimulus separately, in sequence. However, setting stimContinue to true for stimulus one, would cut off the ‘page’ at the second stimulus, so what you’d see is stimulus 1 & 2 being displayed at the same time, but stimulus 3 being displayed on its own.

    The fix depends on what you require. An easy fix is adding the first stimulus, the one you want to display constantly while the QRTEngine loops through the remaining stimuli, outside of the ‘loop’, before the Init question. You might need to call QRTE.unhideQuestions() in the JavaScript of this question!

    Hope this helps,

    Erwin

Viewing 15 posts - 1 through 15 (of 33 total)