Shared Scripts, Data, Stimuli, Files, and Demos

Script_Thesis_V3 Run Experiment

Script_Thesis_V3

Emma

No comments yet
 




Comments

No comments yet

If you are a registered user and signed in, you can here copy this script and its stimuli to your own account, where you can edit it and change it in any way you want.

It is absolutely free to register (no credit card info asked!). You can then instantly copy this experiment with one click and edit it, change its accompanying texts, its landing page, stimuli, etc. Invite your colleagues, friends, or students to check out your experiment. There is no limit on how many people can do your experiment, even with a free account.

The catch? There is no catch! Just keep in mind that with a free account, you cannot collect data. For teaching that is usually not a problem. For research, prepaid data collection (unlimited subjects) starts as low as €10.00 for a 10-day period.

 
// PREPARING PRELOADING
//Stimuli words
main.setfontsize(75);
var animal = ['KALA','LINTU','SUSI','VALAS','PEURA','ORAVA','APINA','ETANA','RAPU','KANI'],
    food = ['MUNA','VOI','VADELMA','KEKSI','PAPU','SIPULI','OMENA','PERUNA','PARSA','MANTELI'],
    object = ['LASIT','SORMUS','PAITA','PEILI','MUKI','TUOLI','VEITSI','LAPASET','LATURI','TALO'],
    i,
    e,
    word,
    feedbacklist = [true, false],
    stimuli_pictures = {KALA: "a1.jpg", LINTU: "a2.jpg", SUSI: "a3.jpg", VALAS: "a4.jpg", PEURA: "a5.jpg", ORAVA: "a6.jpg", APINA: "a7.jpg", ETANA: "a8.jpg", RAPU: "a9.jpg", KANI: "a10.jpg",
            MUNA: "f1.jpg", VOI: "f2.jpg",VADELMA: "f3.jpg", KEKSI: "f4.jpg", PAPU: "f5.jpg", SIPULI: "f6.jpg", OMENA: "f7.jpg", PERUNA: "f8.jpg", PARSA: "f9.jpg", MANTELI: "f10.jpg",
            LASIT: "o1.jpg", SORMUS: "o2.jpg", PAITA: "o3.jpg", PEILI: "o4.jpg", MUKI: "o5.jpg", TUOLI: "o6.jpg", VEITSI: "o7.jpg", LAPASET: "o8.jpg", LATURI: "o9.jpg", TALO: "o10.jpg"}; 
            // Make a dictonary that links each word with a picture 

var sound_object_pinknoise;
var sound_object_whitenoise;

sound_object_pinknoise = sound.preload('pinknoise.wav','pinknoise');
sound_object_whitenoise = sound.preload('whitenoise.wav','whitenoise');
sound.await('preloading_completed');

// Combine 3 word categories into one 
var stimuli_words = animal.concat(food,object); // Combine two arrays into a new one;


// Reasure participant the experiment is not crashed
text("Starting up the experiment can take a minute"); // Show text while preloading

CreateBlocks();

//Preload images 
l.preload_range("a{0}.jpg",1,11); // Animal images
l.preload_range("f{0}.jpg",1,11); // Food images
l.preload_range("o{0}.jpg",1,11); // Object images
image.await("preloading_completed");  

clear(); // Clear the text "Starting up the experiment can take a minute"

// Remove blocks: m, l & r
main.removeblock(m);
main.removeblock(l);
main.removeblock(r);

// WELCOME
text("Welcome to this study!");
await(3000);
clear();

// INFORMATION ABOUT STUDY PROCEDURES
title = main.addblock('center',10,90,20);
    title.text("Learning Finnish vocabulary").style("font-size","90%").align('left');
wel = main.addblock('center',27,90,20);
    wel.text("Dear participant, 
" + "
" + "Welcome to the study Learning Finnish vocabulary, of the Faculty of Social & Behavioral Sciences at the University of Amsterdam.").style("font-size","50%").align('left'); read = main.addblock('center',45,90,20); read.text("Please read the following information carefully before you start. If anything is unclear, please feel free to reach out to the researcher directly or via email: jaap@murre.com or nelli.immonen@student.uva.nl.").style("font-size","50%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); title.destroy(); wel.destroy(); read.destroy(); // GOAL & PROCEDURES goal = main.addblock('center',10,90,20); goal.text("

STUDY GOAL


" + "The goal of this study is to better understand the forgetting curve. We are investigating what impacts memory performance and how it could be improved or worsened.").style("font-size","50%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); goal.destroy(); pro = main.addblock('center',10,90,20); pro.text("

STUDY PROCEDURES

" + "The entire study will take approximately 45 minutes. There will be two parts:").style("font-size","50%").align('left'); part = main.addblock('center',32,90,20); part.text("PART 1: An experiment, in which you will first be asked to learn and memorise 30 Finnish language words accompanied by a picture of its translation. Your task is to try to remember as many words as possible. After each trial, you will be asked to recall as many words as you can. In the second phase, you will be tested on your memory, and again, recall as many words as possible. You will hear a background sound throughout this part, please keep the sound turned on on your device.
" + "
" + "PART 2: A series of questionnaires that you will be asked to fill-out.").style("font-size","50%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); pro.destroy(); part.destroy(); // CONSENT TEXT constext = main.addblock('center',10,90,20); constext.text("DECLARATION OF CONSENT").style("font-size","75%").align('left'); constext2 = main.addblock('center',20,90,20); constext2.text("If you would like to participate in the survey, click on 'YES' below. With this, you declare:").style("font-size","50%").align('left'); cons1 = main.addblock('center',27,90,20); cons1.text("- I am 18 years or older").style("font-size","50%").align('left'); cons2 = main.addblock('center',32,90,20); cons2.text("- I have read and understood the information").style("font-size","50%").align('left'); cons3 = main.addblock('center',37,90,20); cons3.text("- I agree to participate and to use the data obtained with it").style("font-size","50%").align('left'); cons4 = main.addblock('center',44,90,20); cons4.text("- I reserve the right to withdraw this consent without giving any reason during the study").style("font-size","50%").align('left'); cons5 = main.addblock('center',51,90,20); cons5.text("- I reserve the right to stop the study at any given time I wish").style("font-size","50%").align('left'); consconfirm = main.addblock('center',61,90,20); consconfirm.radio(" ",['YES, I participate','NO, I am not participating'],"Consent").style("font-size","60%"); consconfirm.await('button:click'); constext.destroy(); constext2.destroy(); cons1.destroy(); cons2.destroy(); cons3.destroy(); cons4.destroy(); cons5.destroy(); consconfirm.destroy(); if (response.Consent === 'NO, I am not participating') { consno = main.addblock('center',10,90,20); consno.text("You have clicked 'NO, I am not participating'").style("font-size","70%").align('left'); consno1 = main.addblock('center',25,90,20); consno1.text("Participation in this study requires consent. Unfortunately, we are not able to proceed with your participation.
" + "
" + "Thank you for your interest in this study.
" + "
" + "You may now close the browser").style("font-size","70%").align('left'); await(10000); close(); } // ENVIRONMENT env = main.addblock('center',20,90,20); env.text("Try to minimize all noise in your environment and make sure there are no distractions, such as phones, other people, or a TV in your presence.").style("font-size","70%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); env.destroy(); // TURN ON SOUND ON DEVICE sound = main.addblock('center',20,90,20); sound.text("ALERT:
" + "
" + "Please turn the sound on on your computer/laptop or phone and set it to a medium volume. Please do not lower the sound volume during the study.").style("font-size","70%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); sound.destroy(); // QUESTION ON AGE & PRIOR FINNISH LANGUAGE SKILLS hi = main.addblock('center',20,90,20); hi.text("Before starting, please answer the following questions about your age and language skills").style("font-size","70%"); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); hi.destroy(); // AGE var Age = "Your Age",Age; while(1) { input("Your Age (in digits):","Age"); Age = parseFloat(response.Age); if (Age < 18) { excl = main.addblock('center',20,90,20); excl.text("Unfortunately, participation in this study requires a minimum age of 18 years").style("font-size","75%").align('left'); thanks = main.addblock('center',35,90,20); thanks.text("Thank you for your interest in this study!").style("font-size","75%").align('left'); browser = main.addblock('center',55,90,20); browser.text("You may now close the browser").style("font-size","60%").align('left'); await(10000); close(); } else if (!Age) { alert("Please enter your age in the specified box in digits (required)"); } else { break; } } // FINNISH PRIOR SKILLS fin = main.addblock('center',20,90,20); fin.radio("Do you have any prior knowledge or skills in the Finnish language?",['No','Yes'],"Finnish_Skills").style("font-size","70%"); // Question on prior finnish skills fin.await('button:click'); fin.destroy(); if (response.Finnish_Skills === 'Yes') { exclude = main.addblock('center',20,90,20); exclude.text("Unfortunately, participation in this study requires no prior knowledge or skills in the Finnish language").style("font-size","75%").align('left'); thanks = main.addblock('center',35,90,20); thanks.text("Thank you for your interest in this study!").style("font-size","75%").align('left'); browser = main.addblock('center',55,90,20); browser.text("You may now close the browser").style("font-size","60%").align('left'); await(10000); close(); } // GO TO PART 1 go = main.addblock('center','center',90,20); go.text("Proceed to Part 1 of the study by clicking 'OK'").style("font-size","90%"); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); go.destroy(); // INSTRUCTION PART 1 proc = main.addblock('center',10,90,20); proc.text("INSTRUCTIONS PART 1: Experiment").style("font-size","70%").align('left'); first = main.addblock('center',25,90,20); first.text("There will be two phases. First, you will take part in the learning phase, followed by a testing phase.You will hear a background sound throughout this part, please keep the sound turned on on your device.
" + "
" + "Learning phase: You will be presented with 10 rounds of 30 Finnish words. Your task is to try to memorise as many words as you can. Each word is paired with a picture, which is a translation of the word. After every 30 images, you will be shown the pictures again and you will try to write down the corresponding word, as well as how confident you were about your answer.
" + "
" + "Testing phase: You will be presented with the same images as before and will try to memorise and write down the corresponding word correctly.").style("font-size","50%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); proc.destroy(); first.destroy(); // WHEN READY START PART 1: LEARNING PHASE ready = main.addblock('center','center',90,20); ready.text("When you are ready to start PART 1 of the study, click 'OK'").style("font-size","90%"); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); ready.destroy(); text("STARTING PART 1: Experiment"); // Marks start of part 1 await(3000); clear(); textlearn = main.addblock('center',20,90,20); textlearn.text("LEARNING PHASE:
" + "
" + "Try to learn and memorise the following words").style("font-size","70%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); textlearn.destroy(); text("3...2...1..."); await(3000); clear(); // MUSIC // Randomize which music the participant gets randomizelist = [0,1]; var soundcondition = shuffle(randomizelist)[0]; // FEEDBACK // Randomize whether the participant gets feedback or not var feedback = shuffle(feedbacklist)[0]; // // If 80% accuracy, continue to final test, so 24 correct anwsers var repeats = 0; var learned = 0; while (repeats <= 10 && learned <= 24) { // if (soundcondition ===1) // { // sound_object_pinknoise.start(); // // Perform the study phase // StudyPhase(stimuli_words); // } // else // { // sound_object_whitenoise.start(); // // Perform the study phase // StudyPhase(stimuli_words); // } // logtrial(soundcondition, "soundcondition", soundcondition); // // How many words were learned / answerd correctly // learned = RetrievalPhase(stimuli_words); // // Keep count of the amount of repeats // repeats++; // // pause // text("+"); // await(5000); // clear(); // playSound(soundcondition); // StudyPhase(stimuli_words); learned = RetrievalPhase(stimuli_words); repeats++; // update how far they are + pause = total 5 secs text("You finished round " + repeats + " out of 10"); await(2000); clear(); m.text("+"); await(3000); m.clear(); logtrial(learned, "AmountCorrect", repeats, feedback); } logtrial(soundcondition, "soundcondition", soundcondition); // END OF LEARNING PHASE ret = main.addblock('center',20,90,20); ret.text("END OF THE LEARNING PHASE").style("font-size","70%").align('left'); ret2 = main.addblock('center',35,90,20); if (repeats <= 10) { ret2.text("You have mastered the words in less than 10 rounds. Your learning phase ends here and you can now take part in the testing phase. You will be tested on how well you memorized the words.").style("font-size","60%").align('left'); } else { ret2.text("You finished the learning phase and will now take part in the testing phase. You will be tested on how well you memorized the words.").style("font-size","60%").align('left'); } ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); ret.destroy(); ret2.destroy(); // STARTING TESTING PHASE textlearn2 = main.addblock('center',20,90,20); textlearn2.text("TESTING PHASE:
" + "
" + "Try to memorise the words shown on the screen.
" + "When given the chance, try to write down the correct word, which corresponds to the picture, in the empty box.").style("font-size","70%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); textlearn2.destroy(); text("3...2...1..."); await(3000); clear(); // TEST PHASE TestPhase(stimuli_words); // END OF PART 1, START OF PART 2 end1 = main.addblock('center',20,90,20); end1.text("

END OF PART 1


" + "Please continue to PART 2 of the study by clicking 'OK'").style("font-size","70%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); end1.destroy(); text("PART 2: Questionnaires"); // Marks start of part 2 await(3000); clear(); // Questions on education level, music listening, and weight-loss dieting general = main.addblock('center',20,90,20); general.text("

Instructions


" + "Please answer the following questions about yourself").style("font-size","75%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); general.destroy(); finn = main.addblock('center',20,90,20); finn.scale("To what extent were you familiar with the Finnish words?","Unfamiliar", "Familiar", "familiarity_words", "7").style("font-size","75%"); // Familiarity with Finnish language finn.await('button:click'); finn.destroy(); gen = main.addblock('center',20,90,20); gen.select("What is your gender?",[['Male',0],['Female',1],['Non-binary',2],['Prefer not to say',4]],'Gender').style("font-size","75%"); // Gender question gen.await('button:click'); gen.destroy(); edu = main.addblock('center',20,90,20); edu.radio("Which education level are you currently following or the highest level you have completed?",[['Middle or High school',0],['Vocational degree',1],['Bachelors degree',2],['Masters degree',3],['PhD or Post-doctorate',4]],"EducationLevel").style("font-size","75%"); // Education level question edu.await('button:click'); edu.destroy(); music = main.addblock('center',20,90,20); music.radio("How often do you listen to music while you are studying?",[['Never',0],['Sometimes',1],['Neutral',2],['Often',3],['Always',4]],"Music").style("font-size","75%"); // Fabian's question on music listening music.await('button:click'); music.destroy(); diet = main.addblock('center',20,90,20); diet.radio("Are you currently or have you been on a weight-loss diet in the past 12 months?",['Yes','No','Prefer not to say'],"Dieting").style("font-size","75%"); // Nelli's question on weight-loss dieting behaviors diet.await('button:click'); diet.destroy(); // INSTRUCTION TO DFS-Q next = main.addblock('center',20,90,20); next.text("Next, you are asked to fill in two questionnaires about your consumption of certain foods and drinks, and stress").style("font-size","75%").align('left'); then = main.addblock('center',35,90,20).style("font-size","60%").align('left'); then.text("Please click 'OK' to start the questionnaires"); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); next.destroy(); then.destroy(); insDFS = main.addblock('center',15,90,20); //Instructions DFS-Q insDFS.text("

Instructions


" + "Please indicate how many times on average you have consumed the following foods and drinks in the past 12 months").style("font-size","75%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); insDFS.destroy(); //DFS-Q instruction shown throughout the questionnaire, destroyed in the end after question 26 p = main.addblock('center',10,90,20); p.text("How many times on average you have consumed the following foods and drinks in the past 12 months").style("font-size","80%").align('left'); startform(); // DFS-Q QUESTION BLOCK 1 q1 = main.addblock('center',26.5,90,20); q1.style("font-size","55%").align('left'); q1.select("Mince, beef or lamb, for example
" + "in hamburgers, nachos or bolognaise",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-1'); q2 = main.addblock('center',39,90,20); q2.style("font-size","55%").align('left'); q2.select("Beef or pork, such as steak, ribs,
" + "roasts or in sandwiches",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-2'); q3 = main.addblock('center',51.5,90,20); q3.style("font-size","55%").align('left'); q3.select("Fried chicken or chicken burgers",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-3'); q4 = main.addblock('center',64,90,20); q4.style("font-size","55%").align('left'); q4.select("Sausages, frankfurts or salami",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-4'); b1 = main.addblock('center','bottom',30,20); b1.button("OK","inputbutton","click","inputbutton"); b1.await('click'); endform(); q1.destroy(); q2.destroy(); q3.destroy(); q4.destroy(); b1.destroy(); startform(); // DFS-Q QUESTION BLOCK 2 q5 = main.addblock('center',26.5,90,20); q5.style("font-size","55%").align('left'); q5.select("Bacon",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-5'); q6 = main.addblock('center',39,90,20); q6.style("font-size","55%").align('left'); q6.select("Salad dressings (not low fat)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-6'); q7 = main.addblock('center',51.5,90,20); q7.style("font-size","55%").align('left'); q7.select("Margarine, butter, or oil in cooking",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-7'); q8 = main.addblock('center',64,90,20); q8.style("font-size","55%").align('left'); q8.select("Eggs (not egg whites only)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-8'); b2 = main.addblock('center','bottom',30,20); b2.button("OK","inputbutton","click","inputbutton"); b2.await('click'); endform(); q5.destroy(); q6.destroy(); q7.destroy(); q8.destroy(); b2.destroy(); startform(); // DFS-Q QUESTION BLOCK 3 q9 = main.addblock('center',26.5,90,20); q9.style("font-size","55%").align('left'); q9.select("Pizza",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-9'); q10 = main.addblock('center',39,90,20); q10.style("font-size","55%").align('left'); q10.select("Cheese or cheese spread (not low fat)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-10'); q11 = main.addblock('center',51.5,90,20); q11.style("font-size","55%").align('left'); q11.select("French fries, fried potatoes",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-11'); q12 = main.addblock('center',64,90,20); q12.style("font-size","55%").align('left'); q12.select("Corn chips, potato chips,
" + "popcorn with butter",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-12'); b3 = main.addblock('center','bottom',30,20); b3.button("OK","inputbutton","click","inputbutton"); b3.await('click'); endform(); q9.destroy(); q10.destroy(); q11.destroy(); q12.destroy(); b3.destroy(); startform(); // DFS-Q QUESTION BLOCK 4 q13 = main.addblock('center',26.5,90,20); q13.style("font-size","55%").align('left'); q13.select("Doughnuts, pastries, croissants",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-13'); q14 = main.addblock('center',39,90,20); q14.style("font-size","55%").align('left'); q14.select("Cakes, cookies",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-14'); q15 = main.addblock('center',51.5,90,20); q15.style("font-size","55%").align('left'); q15.select("Ice cream (not sorbet or
" + " low fat
)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-15'); q16 = main.addblock('center',64,90,20).align('left'); q16.style("font-size","55%"); q16.select("Chocolate",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-16'); b4 = main.addblock('center','bottom',30,20); b4.button("OK","inputbutton","click","inputbutton"); b4.await('click'); endform(); q13.destroy(); q14.destroy(); q15.destroy(); q16.destroy(); b4.destroy(); startform(); // DFS-Q QUESTION BLOCK 5 q17 = main.addblock('center',26.5,90,20); q17.style("font-size","55%").align('left'); q17.select("Lollies",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-17'); q18 = main.addblock('center',39,90,20); q18.style("font-size","55%").align('left'); q18.select("Spreads including peanut
" + " butter, jam, honey",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-18'); q19 = main.addblock('center',51.5,90,20); q19.style("font-size","55%").align('left'); q19.select("Pancakes or French toast",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-19'); q20 = main.addblock('center',64,90,20); q20.style("font-size","55%").align('left'); q20.select("Sports drinks (e.g. Gatorade)
" + " or energy drinks (e.g. Red Bull)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-20'); b5 = main.addblock('center','bottom',30,20); b5.button("OK","inputbutton","click","inputbutton"); b5.await('click'); endform(); q17.destroy(); q18.destroy(); q19.destroy(); q20.destroy(); b5.destroy(); startform(); // DFS-Q QUESTION BLOCK 6 q21 = main.addblock('center',26.5,90,20); q21.style("font-size","55%").align('left'); q21.select("Soft drink (not including diet)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-21'); q22 = main.addblock('center',39,90,20); q22.style("font-size","55%").align('left'); q22.select("Milk (full fat only). Include milk
" + " drunk by itself or in cappuccinos,
" + " milkshakes, hot chocolates etc.",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-22'); q23 = main.addblock('center',53,90,20); q23.style("font-size","55%").align('left'); q23.select("Other sweetened beverages
" + " (e.g. juice with added sugar,
" + " cordial, sweetened teas)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-23'); q24 = main.addblock('center',65.5,90,20); q24.style("font-size","55%").align('left'); q24.select("White bread (white bread only)",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-24'); b6 = main.addblock('center','bottom',30,20); b6.button("OK","inputbutton","click","inputbutton"); b6.await('click'); endform(); q21.destroy(); q22.destroy(); q23.destroy(); q24.destroy(); b6.destroy(); p.destroy(); // Removes the DFS-Q instruction // Question 25 of the DFS-Q, presented by itself due to length q25 = main.addblock('center',20,90,20); q25.style("font-size","75%"); q25.radio("In the past 12 months, how many times have you eaten food from a takeaway or fast food restaurant, for example McDonalds, KFC, Mexican, Chinese, Thai, Italian (Pizza or pasta)?",[['Less than 1 per week',1],['2 - 3 per month',2],['1 - 2 per week',3],['2 - 3 per week',4],['5+ per week',5]],'DFS-Q-25'); q25.await('button:click'); q25.destroy(); // Question 26 of the DFS-Q, presented by itself as it has a different format from questions 1-25 q26 = main.addblock('center',20,90,20); q26.style("font-size","75%"); q26.radio("In the past week, how many teaspoons of sugar have you added to your beverages, cereal or food?",[['None',1],['1 - 2',2],['3 - 4',3],['5 - 6',4],['7+',5]],'DFS-Q-26'); q26.await('button:click'); q26.destroy(); //END OF DFS-Q directed = main.addblock('center',20,90,20); directed.text("You will now be automatically directed to the last questionnaire within 5 seconds").style("font-size","75%").align('left'); await(5000); directed.destroy(); // STRESS QUESTIONNAIRE ins2 = main.addblock('center',20,90,20); ins2.text("

Instructions


" + "Please rate the following questions about stress on a scale between Never and Very Often").style("font-size","75%").align('left'); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); ins2.destroy(); stress = main.addblock('center',10,90,20); stress.text("In the last month, how often have you...").style("font-size","80%"); s1 = main.addblock('center',35,90,20); s1.scale("Been upset because of something that happened unexpectadly?","Never","Very Often","Stress-Q-1").style("font-size","70%"); s1.await('button:click'); s1.destroy(); s2 = main.addblock('center',35,90,20); s2.scale("Felt that you were unable to control the important things in your life?","Never","Very Often","Stress-Q-2").style("font-size","70%"); s2.await('button:click'); s2.destroy(); s3 = main.addblock('center',35,90,20); s3.scale("Felt nervous and stressed?","Never","Very Often","Stress-Q-3").style("font-size","70%"); s3.await('button:click'); s3.destroy(); s4 = main.addblock('center',35,90,20); s4.scale("Felt confident about your ability to handle your personal problems?","Never","Very Often","Stress-Q-4").style("font-size","70%"); s4.await('button:click'); s4.destroy(); s5 = main.addblock('center',35,90,20); s5.scale("Felt that things were going your way?","Never","Very Often","Stress-Q-5").style("font-size","70%"); s5.await('button:click'); s5.destroy(); s6 = main.addblock('center',35,90,20); s6.scale("Found that you could not cope with all the things that you had to do?","Never","Very Often","Stress-Q-6").style("font-size","70%"); s6.await('button:click'); s6.destroy(); s7 = main.addblock('center',35,90,20); s7.scale("Been able to control irritations in your life?","Never","Very Often","Stress-Q-7").style("font-size","70%"); s7.await('button:click'); s7.destroy(); s8 = main.addblock('center',35,90,20); s8.scale("Felt that you were on top of things?","Never","Very Often","Stress-Q-8").style("font-size","70%"); s8.await('button:click'); s8.destroy(); s9 = main.addblock('center',35,90,20); s9.scale("Been angered because of things that happened that were outside of your control?","Never","Very Often","Stress-Q-9").style("font-size","70%"); s9.await('button:click'); s9.destroy(); s10 = main.addblock('center',35,90,20); s10.scale("Felt difficulties were piling up so high that you could not overcome them?","Never","Very Often","Stress-Q-10").style("font-size","70%"); s10.await('button:click'); s10.destroy(); stress.destroy(); // END OF PART 2 endpart2 = main.addblock('center',20,90,20); endpart2.text("

END OF PART 2

").style("font-size","75%").align('left'); await(3000); endpart2.destroy(); // DEBRIEFING debrief = main.addblock('center',20,90,20); debrief.text("DEBRIEFING").style("font-size","75%").align('left'); debrieftext = main.addblock('center',35,90,20); debrieftext.style("font-size","75%").align('left'); debrieftext.text("In this experiment we aimed to see whether feedback, music, stress, and high-fat high-sugar diet intake are associated with the rate of learning of novel language words."); ok = main.addblock('center','bottom',30,20); ok.button("OK","inputbutton","click","inputbutton"); ok.await('click'); ok.destroy(); debrief.destroy(); debrieftext.destroy(); // End of experiment end2 = main.addblock('center',20,90,20); end2.text("Well Done!
" + "
" + "Thank you for your participation!").style("font-size","90%").align('left'); browser2 = main.addblock('center',50,90,20); browser2.text("You may now close the browser").style("font-size","60%").align('left'); await(10000); close(); // FUNCTIONS FOR EXPERIMENT // Function to peform the full length of the stimuli words in the study phase function StudyPhase(stimuli_words) { // Shuffle the stimuli word list for randomization shuffle(stimuli_words); CreateBlocks(); for (var j in stimuli_words) { // Show fixation cross for 2 seconds m.text("+"); await(1000); // Remove fiaxtion cross m.clear(); // Grab word with index i from stimuli_words word = stimuli_words[j]; // Display the word r.text(word); // Uses the word of the animal list (e.g. KALA) to find that in the stimuli object l.setimage(stimuli_pictures[word]); // Show word-picture pair for 3 seconds await(3000); l.clear(); // Remove picture r.clear(); // Remove word } main.removeblock(l); main.removeblock(r); main.removeblock(m); } // Function to peform the full length of the stimuli words in the retrieval phase function RetrievalPhase(stimuli_words) { // Shuffle the stimuli word list for randomization shuffle(stimuli_words); CreateBlocks(); var correct_retrievals = 0; for (var j in stimuli_words) { // Show fixation cross for 2 seconds m.text("+"); await(1000); // Remove fiaxtion cross m.clear(); // Grab word with index i from stimuli_words word = stimuli_words[j]; // Uses the word of the animal list (e.g. KALA) to find that in the stimuli object l.setimage(stimuli_pictures[word]); RetrievalInput("What Finnish word belongs to this picture?", "input_retrieval", 2); l.clear(); // Remove picture r.clear(); // Remove word // See if the word was correct var correct = InputCorrect(response.input_retrieval, word); if (correct) { correct_retrievals++; } // Remove blocks: m, l & r main.removeblock(m); main.removeblock(l); main.removeblock(r); // Create block for confidence instructions y= main.addblock(6, 80, 90, 10); y.style("font-size","60%"); y.text("(You can use the arrow keys to fill in your answer & enter button to continue)"); // Confidence rating scale("How confident were you about your answer?", "Guess", "High confidence", "confidence_retrieval", "4"); // Remove block y main.removeblock(y); CreateBlocks(); // If the answe was correct and the participant gets feedback, show them if (correct && feedback) { m.text("CORRECT

The answer was " + word); await(2000); // Show feedback for 2 seconds m.clear(); } // If the answer was incorrect and they get feedback, show them else if (correct === false && feedback) { m.text("INCORRECT

The answer was " + word); await(2000); // Show feedback for 2 seconds m.clear(); } logtrial(correct, "correct", word, response.input_retrieval, response.confidence_retrieval, feedback); } main.removeblock(l); main.removeblock(r); main.removeblock(m); return correct_retrievals; } // Function to peform the full length of the stimuli words in the test phase function TestPhase(stimuli_words) { // Shuffle the stimuli word list for randomization shuffle(stimuli_words); CreateBlocks(); for (var j in stimuli_words) { // Show fixation cross for 2 seconds m.text("+"); await(1000); // Remove fiaxtion cross m.clear(); // Grab word with index i from stimuli_words word = stimuli_words[j]; // Uses the word of the animal list (e.g. KALA) to find that in the stimuli object l.setimage(stimuli_pictures[word]); RetrievalInput("What Finnish word belongs to this picture?", "input_test", 2); l.clear(); // Remove picture r.clear(); // Remove word var correct = InputCorrect(response.input_test, word); // Remove blocks: m, l & r main.removeblock(m); main.removeblock(l); main.removeblock(r); // Create block for confidence instructions y= main.addblock(6, 80, 90, 10); y.style("font-size","60%"); y.text("(You can use the arrow keys to fill in your answer & enter button to continue)"); // Confidence rating scale("How confident were you about your answer?", "Guess", "High confidence", "confidence_test", "4"); // Remove block y main.removeblock(y); CreateBlocks(); } main.removeblock(l); main.removeblock(r); main.removeblock(m); } // Function to see if input was correct function InputCorrect(input_user, correct_word) { // Goes trough every letter the user put in var correct_word_split = correct_word.split(); var input_user_split = input_user.split(); for (var letter in input_user_split) { // If the letters do not equal each other, return false. Make each inputletter uppercase if (correct_word_split[letter].toUpperCase() !== input_user_split[letter].toUpperCase()) { logtrial(false, "Correct"); return false; } }// If the letters equal each other, return true. logtrial(true, "Correct"); return true; } // Custom input function for in the right block function RetrievalInput(s, v, width) { r.style("fontSize").input(s,v,undefined,width); r.await('button:click'); clear(); } // Make left, middle and right block for the EXPERIMENT function CreateBlocks() { // Create block in which images will be shown (left) l = main.addblock("center", 10, 25, 30); l.resize(50, 50); // Create block in which words will be shown (right) r = main.addblock("center", 50, 35, 30); // Create block in which fixation cross will be shown (middle) m = main.addblock("center", "center", 25, 30); } // Function to play music function playSound(soundcondition) { if (soundcondition === 1) { sound_object_pinknoise.stop(); // Stop the audio if it's already playing sound_object_pinknoise.start(); } else { sound_object_whitenoise.stop(); // Stop the audio if it's already playing sound_object_whitenoise.start(); } }

Data inspection is forthcoming!

In the mean time, authors may download their own data and make it available as an Excel file. Check out the 'Stimuli and Files' tab.

Click on a category to view the stimuli and files

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

This experiment has no video links

You can download the files shown here by clicking on the file names or image. Note that you cannot link directly to the images, sounds, videos, etc. shown here from other web pages; the link will go stale in about one hour and will no longer work after that.

Related Experiments