--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/f62aabb0-c803-48c8-bc78-cf2da88a6ca8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Oliver
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/632085d5-b44e-4eb3-8cd6-df2d16a5786c%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/eb4cd1ce-94a8-4861-ab44-50de47b2af6f%40googlegroups.com.
I wonder about some further specifics now. Would is be possible to display the image alone, for a certain amount of time, before the scale is being shown?
And, more importantly, the experiment consists mostly of this trial alone, but repeated numerous times. I already experimented with just repeating the arrays for the questions, scales and intervals, but then the preamble doesn't work anymore. Also, I'm planning to have about fifty trials per participant, so the code would get very bloated. So I'm wondering if there's a way to loop the trial somehow.
Finally, I saw in a different thread that there might also be a data parameter for the likert plugin, but wasn't able to figure out on my own how I could use it. In the end, I need to know which picture received which rating and how long it took the person to give the answer. Is there a function for that?
Thank you for your help and the library itself! It's a great tool to work with! The documentation isn't fully complete yet, but it already helped me a lot to figure out all of this new territory! :)
Regards,
Oliver
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/e9412950-b66b-4722-835c-321018385a65%40googlegroups.com.
Thank you again for your thorough answer. I can work with each one of these.Right now I'm focusing on the loop. I had to modify the overall experiment, because it was necessary to implement specific combinations of questions and scales. Thus, I couldn't randomize everything at once anymore. I created a separate likert trial for each combination and wanted to randomize those in the experiment initialization. Given the repetitive nature of the experiment, I tried to loop that randomization with your example, but it doesn't quite work.This is the execution code I wrote:var trial_pool = [likert_trial_stat, likert_trial_val, likert_trial_dom]; var experiment = []; experiment.push(welcome_block); for(var i = 0; i < 50; i++;) { var random_trial = { jsPsych.randomization.sample(trial_pool, 1, true) } experiment.push(random_trial); }; jsPsych.init({ experiment_structure: experiment, show_progress_bar: true });I stored all likert trials in a variable and tried to randomize this pool with the given looping properties. My guess is that I can't store the likert trials in a pool like I did with the images, questions and scales, but I wouldn't know another way to do that.Thanks,Oliver
Oliver
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/ee24d3b2-40b7-4bef-be92-66d61d18db50%40googlegroups.com.
Oliver
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/23ea48f1-2a0f-43eb-bee7-6b45dd6066a4%40googlegroups.com.
Hi Joan,
There are two misunderstandings here. First, how loops work in jsPsych. Read this to help with that.
Second, how the survey-likert
plugin works. For the
second point, this part sticks out to me. Please read this
documentation page carefully, specifically the parameters.
var likert_test = {
type: 'survey-likert',
preamble: [[random_story]],
questions:[[random_question]],
labels: [[scale_1]],
intervals: [[1]]
};
You probably want something like this:
var likert_test = {
type: 'survey-likert',
preamble: jsPsych.timelineVariable('story')
questions: [ { prompt: jsPsych.timelineVariable('question'), labels: ["Label here"] } ],
};
Hi,I am trying to do something quite similar to Oliver but with a question pool and a "stories" pool for the preamble. The idea is that everyone doing the experiment reads some stories (1 or 2) selected at random and then answers some randomly selected questions. So far, I've tried what I've read on this thread but it hasn't been working.I attach the code below:
<!DOCTYPE html><html><head><title> Likert Survey </title><script src="jspsych-6.0.5/jspsych.js/"></script><script src="jspsych-6.0.5/plugins/jspsych-html-keyboard-response.js"></script><script src="jspsych-6.0.5/plugins/jspsych-survey-likert.js"></script><link href="jspsych-6.0.5/css/jspsych.css" rel="stylesheet" type="text/css"></link></head><body></body><script>var timeline = []var stories_pool =["This will be the first story","This will be the second story","This will be the third story","This will be the fourth story","This will be the fifth story","This will be the nth story"];var questions_pool =["This will be the first question","This will be the second question","This will be the third question","This will be the fourth question","This will be the fifth question","This will be the nth question"];var random_story = jsPsych.randomization.sampleWithReplacement(stories_pool, 1, true);var random_question= jsPsych.randomization.sampleWithReplacement(questions_pool, 1, true);var scale_1 = ["No, Maybe, Yes"];var likert_test = {type: 'survey-likert',preamble: [[random_story]],questions:[[random_question]],labels: [[scale_1]],intervals: [[1]]};timeline.push(likert_test);jsPsych.init({timeline: timeline,});</script></html>
Best Regards,Joan
El dimecres, 4 març de 2015 17:00:14 UTC, Josh de Leeuw va escriure:
Hi, Oliver.
It's not possible for JavaScript to access the contents of a directory under normal circumstances, so you would not be able to use a folder as a source of possible images. You could use a different strategy than writing out all the paths individually; You could name each image file sequentially in a folder (e.g. 1.jpg, 2.jpg, etc...), and then your JavaScript code could either build a list of filenames in a loop, or simply select a filename randomly from a given range.
The other things you want to do are certainly possible with jsPsych. Here's a very simplified sketch:
var image_pool = ["1.jpg", "2.jpg", "3.jpg"];var question_pool = ["This image makes me happy", "This image makes me sad"];
var random_image = jsPsych.randomization.sample(image_pool, 1);var random_question = jsPsych.randomization.sample(question_pool, 1);
var scale = ["strongly disagree", "disagree", "neutral", "agree", "strongly agree"];
var likert_trial = {type: 'survey-likert',preamble: '<img src="'+random_image+'"></img>',questions: [[random_question]],labels: [[scale]],intervals: [[5]]}
Hope that helps,Josh
On Tue, Mar 3, 2015 at 12:35 PM, <oliver...@gmail.com> wrote:
Hi everyone,
I'm trying to find the appropriate piece of software for creating a particular survey. My intention is to present an image (randomized, from a larger pool of images) and then let that picture be rated on yet another randomized pool of Likert scales. I'm wondering if that's possible with jsPsych and how you would roughly go about to do it.
Especially, whether it's necessary to specifically outline each file and then tell the program to randomize it or whether it's possible to simply give the source location and tell the program to simply pick one.
Regards,
Oliver
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsp...@googlegroups.com.
To post to this group, send email to jsp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/f62aabb0-c803-48c8-bc78-cf2da88a6ca8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "jsPsych" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jspsych+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jspsych/c973b042-3d45-4574-a570-23177e1ce5b1%40googlegroups.com.