Media Lab Manual
Media Lab Manual
Media Lab Manual
All rights reserved. No parts of this work may be reproduced in any form or by any means - graphic,
electronic, or mechanical, including photocopying, recording, taping, or information storage and
retrieval systems - without the written permission of Empirisoft Corporation.
Products that are referred to in this document may be either trademarks and/or registered
trademarks of the respective owners. The publisher and the author make no claim to these
trademarks.
While every precaution has been taken in the preparation of this document, the publisher and the
author assume no responsibility for errors or omissions, or for damages resulting from the use of
information contained in this document or from the use of programs and source code that may
accompany it. In no event shall the publisher and the author be liable for any loss of profit or any
other commercial damage caused or alleged to have been caused directly or indirectly by this
document.
Empirisoft Corporation
347 West 39th Street, 13th Floor
New York, NY 10018
Website: www.empirisoft.com
Information regarding contact via regular mail, email and phone is available at
www.empirisoft.com/company.aspx.
Table of Contents
I
II MediaLab v2014
Labels................................................................................................................................... 55
Name................................................................................................................................... 56
Omit Conditions
................................................................................................................................... 57
Parameters
................................................................................................................................... 57
Position
................................................................................................................................... 64
Randomize Within Groups
................................................................................................................................... 64
Randomize Between Groups
................................................................................................................................... 65
Skip To
................................................................................................................................... 66
Text Labels
................................................................................................................................... 67
Write ...................................................................................................................................
to Data File 68
Write ...................................................................................................................................
Data as Text 69
Write ...................................................................................................................................
Reaction Time 69
Part VI Data 70
Data FAQ
................................................................................................................................... 72
Index 111
Getting Started
MediaLab Features 1 and Setup 4
MediaLab Samples 76
Welcome to the PDF documentation for MediaLab v2014. You can search this
documentation using Adobe Acrobat's search tool or by using the table of contents or
index at the end of the document. We have designed this document for easy printing
from Acrobat should you prefer a hard copy manual. Note that all of the information
contained in this document can also be accessed via the interactive help system located
in MediaLab's Help menu, or by clicking on the file named "interactive users guide" in the
C:\MediaLab\Help folder after installation.
If you are new to MediaLab, we suggest you start by running the on-line tutorial from
the Help menu of the main program window. You can also access a number of additional
(zipped) samples 76 in the C:\MediaLab\Samples folder.
If you have a question that these help files do not answer, please visit our support site
at support.empirisoft.com or visit www.empirisoft.com/company.aspx to contact us
directly.
1.1 Features
Randomize items within a single group 64 and the order in which groups of items 65
are presented.
Randomization routines at both the experiment level 29 and within questionnaires 64 .
Simple and complex skip patterns 66 . Base skips on any prior response, or even
combinations of prior responses 102 .
Calculate scores and other variables 101 while a session is running--present them on
screen as stimuli, use them in skip patterns 102 , or in post-session reports 102 .
Create and optionally print summary reports 102 from each session with graphs,
summary data, scale scores.
2 MediaLab v2014
Create your own custom questionnaire items 88 using standard HTML forms--MediaLab
will intercept the posted data!
Run DirectRT 43 or Inquisit 47 sessions from within your MediaLab experiment.
Create multiple custom preference settings 84 with choices of fonts and display colors.
Context sensitive help such that pressing F1 at any time will help you with what you
are currently doing.
Option of on-the-fly editing 83 of Word and WordPerfect documents—edit them as you
run through your experiment.
Resolution Independent 105 . Compatible with screen displays from 640x480 to
1600x1200 and beyond.
Easy-to-use intuitive interface--no programming code necessary for all but custom
items 88 .
Compatible with most non-English fonts 85 (e.g., Japanese, Chinese, Arabic, Greek).
Ranking 49 allows subjects to drag and drop words, phrases or pictures to sort them
by any criterion.
Essay-type 44 responses.
Present HTML 45 and other web pages with active hyperlinks. Internet Explorer
browsing engine can display anything that IE can handle.
Track browsing behavior 52 as subjects navigate through local HTML files or the World
Wide Web. Track every URL the subject follows and record in and out times.
Present Microsoft Word 52 and Microsoft PowerPoint 48 shows within your experiment
or questionnaires.
3
Gather on-line continuous rating data 48 during audio and video clips.
Create multiple style configurations 84 (e.g., colors and fonts) for use within the same
experiment or questionnaire.
Can't find what you need? Design your own custom items 88 using HTML forms.
Present video 47 (.avi, .mpg, .mov, .rm, .ra, .asf and more).
Present HTML, Flash, java, ASP and any other browser compatible files 45 .
Optional parameters 57 allow you to set the screen location of images and movies as
well as set the size of video clips all the way up to full screen.
Smart data structuring so results from multiple conditions can be viewed in a single
Excel or SPSS file. You can start analyzing your results immediately.
Two sets of data files are produced, one organized by questionnaires 71 , the other by
variable names 71 .
Includes a utility to merge 73 .CSV and .TXT data files collected on different computers.
Optionally write reaction time 69 data for any response to the data file.
Optionally write data from multiple computers to a single folder on your network 83 .
4 MediaLab v2014
1.2 Setup
System Requirements
For most uses, MediaLab v2014 will run well on any PC system or Mac (e.g., via
BootCamp), running Windows XP or Windows 7. At least 256 Mb of RAM is recommended.
If large experiments and/or large multi-media files are going to be used frequently, then
additional RAM is advisable though not necessary. Video cards with at least 16 Mb of
video memory also are recommended.
It is recommended that you also install Microsoft Office on machines that will be running
MediaLab. These programs allow MediaLab to present documents fully formatted by Word
and slide shows prepared in PowerPoint and allow you to execute a number of features
using the conditional logic of Excel. Although MediaLab will work fine without them, these
programs perform cooperatively with MediaLab to produce some very impressive
functionality. Microsoft's Internet Explorer version 7 or later is required in order for
MediaLab to present custom items and other HTML formatted pages (whether stored
locally or on the internet). Finally, it is necessary to have a spreadsheet application (e.g.,
Excel, SPSS) installed in order to view the data files produced by MediaLab (although the
.txt and .csv data files can also be viewed in any text editor).
Backward Compatibility
If you are accustomed to using a previous version of MediaLab (v1998/v3-v2012), you
should be able to continue using v2014 without having to learn anything new. v2014 is
backward compatible so that MediaLab experiments from all previous versions should run
the same as they always have without requiring modification. Of course, be sure to
confirm compatibility for yourself with any old experiments prior to scheduling
participants. As we continue to updated v2014 with new fixes and features, we will post
the changes on our support site at:
http://www.empirisoft.com/support/forumdisplay.php/50-MediaLab-v2014-Version-History
Installation
To install MediaLab, download and run ml2014.x.x.exe (where x.x is the specific release)
available from http://empirisoft.com/Download.aspx?index=4. If installing from a CD-ROM
then simply double-click on the ml2014.x.x exe file located on the CD. The installation
program will guide you through the set-up procedure. After the setup is complete, follow
the security instructions below to gain authorization for the workstation to run MediaLab.
Security
To help control unauthorized distribution and use of MediaLab, it has been secured with
ATX™ software protection. MediaLab will not run on any machine until this security has
been disabled. To disable the security follow these steps:
Install and run MediaLab.
You will receive a message that the current workstation requires authorization to use
the software, and a code number will be displayed.
E-mail the code to sales@empirisoft.com.
If you are an authorized user, you will receive a translation of this code which will be a
registration number unique for the machine on which you have installed MediaLab
(usually the same day). Then, re-start MediaLab and enter the six-digit code provided
to you. MediaLab should now be fully functional. Important: ATX codes are unique to
every machine. Be sure to get authorization for each machine that will be using the
software. If you have any difficulty at all with this procedure, please contact us for
assistance via sales@empirisoft.com.
Trial users may request a code that will enable MediaLab to run for 21 days.
Reinstalling MediaLab
If you are upgrading to a new version you will be asked to uninstall the existing version.
Experiments, data folders, preferences, and licenses will not be affected by uninstalling.
Of course, we recommend backing up experiment data and any existing MediaLab files
(e.g., any .que and .exp files) before making any changes to your system.
System Settings
The following are suggestions for your general system set-up:
True colors
To allow for the full range of colors usable by MediaLab, it is recommended that you use
16, 24, or 32 bit color. Some older systems are set by default to 8 bit, which provides for
only 256 colors (colors or color ranges may appear as dots, patterns, or solid regions). To
change these settings, open the Display properties in your computer's Control Panel, and
select Settings. Select the highest color range possible. 24 and 32 bit color ranges are
both capable of displaying close to the full range of colors detectable by the human eye.
then View. Deselect the option to have Windows Hide File Extensions. It is also useful to
have Windows Display the Full Path in Title Bar as well as Smooth Edges of Screen Fonts.
The latter setting should be on by default in Windows 7. In XP, the option can be found
in Control Panel > Display > Effects.
Screen Resolution
Although MediaLab was designed to work in all screen resolutions, how things look may
depend on the resolution you choose. Certain items may need to be repositioned with
the left and top parameters when running in high resolution modes. If you are working
on different computers, it is often best to pick a single resolution for your experiment
(e.g., 1024x768). To change these settings, open the Display properties in your
computer's Control Panel, and select Settings (Windows XP) or right click on your desktop
and select Screen Resolution (Windows 7).
Second, you need dependent measures. Typically, these will consist of questions you
have regarding participants' responses to your instructions or materials. These questions
may consist of lengthy open-ended responses, short fill-in-the-blank type responses,
multiple choice and scale responses, thought or recall listings, or even ratings of subjects'
own responses. MediaLab will allow you to ask your questions using a wide variety of
question formats.
Finally, you need an experimental design. For this, you need to know which of your
materials and questions are assigned to each of your experimental conditions, and the
order in which they will presented. You may have just a single condition with a single
questionnaire, or a complicated factorial design with many questionnaires and
randomization. Either way, MediaLab is very flexible in terms of experimental design.
Once you have your design planned, your questions in mind and your materials prepared,
MediaLab plays the simple role of executing your experiment and preparing your data for
analysis. To get MediaLab to do what you want, you need to understand two new types
of files:
level. Here, you simply specify which files are going to be presented in each of your
conditions. You basically tell MediaLab, "In condition 1, present file1, file2, file3, etc., and
in condition 2, present file1, file4, file5, etc." These files can be Word documents,
PowerPoint shows, HTML files, movies, sounds, images, executables, and MediaLab
Questionnaires. To learn more about experiment files, see the page about Key Concepts
of MediaLab Experiment Files 20 .
Menu Commands
The main menu commands are found at the top of the MediaLab program window. These
are the general commands used for running experiments, viewing data files, and for
setting preferences. Note that the MediaLab Experiment Editor 11 has it's own separate
menu system.
Run 9 Preferences 82
Data 70 Help 1
2.1 Run
Menu Commands
When you are ready to run your experiment, either as a trial run or to collect real data,
you have three options. From the Run menu you can choose to:
the other computer which contains the experiment (see above). Once you have done
this, you can run the experiment as if it were located locally. From the Run menu, choose
Select and Run an Experiment or Select and Run a Single Questionnaire and browse to the
experiment located on the mapped drive (e.g., h:\experiment1\myexperiment.exp). This
way, multiple computers can access the same experiment from a single computer. As
with writing data to an alternate data folder 83 (see above), it is recommended that you
specify a unique machine code in Preferences 84 because all the data from all machines
will be writing to the data folder on this single computer. This option may not be suitable
for experiments that require a lot of bandwidth (e.g., those that use a lot of video and
sound) or for experiments using many computers on a slow network.
"c:\medialab\medialab.exe" c:\medialab\samples\sample1\sample1.exp,15,1
2.2 Navigation
Key Navigation
As an alternative to having subjects click on the Continue and Go Back buttons, you can
have subjects use the keyboard to navigate their way through your experiment. The
Backspace and Space bar keys will simulate mouse clicks on the Go Back and Continue
buttons, respectively. This does not apply to essays, fill-in-the-blanks, and thought-listings
which can still be ended with the Escape key as an alternative to the mouse click (since
the Space bar and Backspace keys are necessary for open ended responses). Note: If you
use an Executable item, the navigation keys will become active only after the executable
program has ended and control is returned to MediaLab.
Not: When using an HTML item in your questionnaire that allows for spacebar or
backspace input, you may want to add a k-1 parameter 60 to disable keyboard
navigation for that item. This does not apply to Custom items made with HTML because
custom items do not allow for keyboard navigation.
Secret Keys
When test-running an experiment, you may want to skip over various items, files, or
questionnaires that you already know are working. You also may have timed items that
you don't want to wait for while you're testing things out. For this reason, there a few
secret key combinations that will allow you skip around. All use the right or left arrow
keys on your keyboard in combination with either or both of the Alt key or Ctrl key. Press
11
each key down and hold it until each of the remaining key(s) is pressed.
Notes
*In previous versions, the combination Alt + Right Arrow would end the current
questionnaire or file. Because this combination is now commonly used in web browsing
we added a shift key to the combination to avoid accidental endings.
Some item types that involve videos and or HTML may require that you first click on the
outer border of the MediaLab space in order to use the secret keys. This is because the
Windows Media Player and Internet Explorer engines will sometimes intercept keystrokes
and won't share them with MediaLab. For the same reason, the space bar may cause a
video to pause rather than causing MediaLab to continue to the next item. In any case, a
click on the outer border will return keystroke input to MediaLab if and when this
happens.
Due to setting of some Intel and NVidia brand chip sets, use of Ctrl + Alt + the arrow keys
may rotate your screen orientation instead of quitting the experiment in progress. To
disable the screen orientation in Windows 7, right click anywhere on your desktop and
select Graphics Options > Hot Keys > Disable.
StatusBar
The StatusBar is displayed at the bottom of the main MediaLab window. Allows you to
view some convenient information about the experimental session. The first cell in the
status bar displays information about current activities and when nothing else is going
on, it displays the name of the last experiment run during the current session. The next
cell displays the last Subject ID and Condition run during the current session. The next
two cells display the current date and time. Can be hidden with option on the Tools
menu.
Menu Commands
These main menu commands are found at the top of the Experiment Editor window. To
launch the experiment editor, either click on Experiment Editor in the main MediaLab
window, or click the MXEdit icon in the MediaLab startup folder. These are the general
commands used for editing Experiment (.exp) and Questionnaire (.que) files.
12 MediaLab v2014
File 12 Edit 14
Options 15 Window 15
3.1 File
QuickInfo
The following describes the functions provided in the File menu of the MediaLab
Experiment Editor.
Commands
New Questionnaire
Creates a new questionnaire file for editing. See Questionnaire Files 34 for details.
13
Open
Open Recent
Select from the list of recently edited experiment and questionnaire files for editing.
Launch Explorer
Runs Windows Explorer for file browsing. See suggestion regarding the visibility of file
extensions 5 (e.g., .que, .exp, .htm, .doc, .etc)
Launch DirectRT
Runs DirectRT if you have it installed. See www.empirisoft.com/directrt.aspx for details.
Sav e
Saves the active file with its current name and location on your drive.
Sav eAs
Saves the active file but allows you to specify a new file name and/or save location.
Page Setup
Allows you to set print options such as margins, portrait vs. landscape and which columns
to print. See Printing 16 for details.
Print
Prints the contents of the active file.
Exit
Exits the MediaLab Experiment Editor.
14 MediaLab v2014
3.2 Edit
QuickInfo
The following describes the functions provided in the Edit menu of the MediaLab
Experiment Editor. See also Editing Tips and Tricks 17 for a variety of editing
shortcuts.
Commands
Cut
Deletes the selected text or cells and places the deleted contents in the MediaLab
clipboard for pasting elsewhere.
Copy
Copies the selected text or cells and places the copied contents in the MediaLab
clipboard for pasting within the same or other questionnaire. See also External Copy
below.
Paste
Pastes the contents of the MediaLab clipboard to the selected cell(s). See also External
Paste below.
Fill Down
When cells from multiple rows are selected, copies the value from the top selected cell(s)
to the selected cell(s) below.
Fill Right
When cells from multiple columns are selected, copies the value from the left most cell(s)
to the selected cell(s) to the right.
Select All
Delete Rows
Deletes the selected rows from the active file.
External Copy
The MediaLab experiment editor uses it's own private clipboard for cutting, copying and
pasting. If you want to copy cells to paste in an external application (e.g., Excel, Word, a
text editor), select the cells and choose External Copy.
External Paste
To paste cells or text from external applications (e.g., Excel, Word, a text editor), select
External Paste.
3.3 Options
QuickInfo
The following describes the functions provided in the Options menu of the MediaLab
Experiment Editor.
Commands
Editor Font
Allows you to choose an alternate font for editing text within the editor. Can be useful for
international font requirements. You may also need to choose a Character Set for your
language from the main MediaLab Preferences 85 menu
3.4 Window
QuickInfo
The following describes the functions provided in the Windows menu of the MediaLab
Experiment Editor.
Commands
New Window
Equivalent to selecting Open from the File menu.
16 MediaLab v2014
Cascade
Neatly arranges all open windows in an overlap pattern making all window titles visible.
Tile Horizontal
Stretches all open windows their maximum width and arranges them in a horizontal
overlap pattern.
Tile Vertical
Stretches all open windows their maximum height and arranges them in a vertical overlap
pattern.
Arrange Icons
Neatly arranges all minimized window icons.
Hint
The most useful function in the Windows menu is that at the bottom of the menu will be a
list of all currently open files. You can select which file to bring to the forefront by clicking
on any file in this list. Note also that you can use Ctrl+Tab to flip through all open files.
3.5 Printing
QuickInfo
Prints the content of your experiment or questionnaire file.
Value
Mouse-click, Alt-P (Overview editor only)
Purpose
You may wish to print a hardcopy of information in your experiment or questionnaire file.
To select which columns to print, click Select Columns to View/Print. Check all the columns
you want to print. Note that you can start by clicking Select All or Deselect All.
You can manually widen any column if you want more of it displayed when printing.
For question wording cells (questionnaire files only), you can expand (print all lines) or
collapse (print only the first line) the cells when printing. When selecting Print, select
Expand All or Collapse All for the Multi-Line Cells option.
17
QuickInfo
The following describes how to use some of the editing features of MediaLab's new
Experiment Editor:
Double-Clicking Functions 19
Sometimes you may want to copy one cell over and over to a series of cells below it or to
its right. An example would be that you want to copy the same parameter value or scale
point labels to 20 sequential items without having to retype it each time. With the
FillDown function, this is easy:
To copy a cell to a series of cells below it, highlight the block of cells (including the one
you want to copy) and then select FillDown (Ctrl+D). This will copy the top cell to all the
cells selected below.
To copy a cell to a series of cells to its right, highlight the block of cells (including the
one you want to copy) and then select FillRight (Ctrl+R). This will copy the top cell to all
the cells selected below.
Note that the filling functions only operate in the main overview spreadsheet and not in
Details 36 mode.
Key Concepts 20 : Click here to find out more about exactly what the
Experiment Files are and do in MediaLab
File Details
Click on any of these links to find out more about specific features of the
Experiment Files in MediaLab
Condition 25 BackGround 27 Randomize Within
Groups 29
Position 25 BackSound 28 Randomize
Between Groups 30
With the exception of questionnaires, no data is gathered for files that you specify here.
This is a very important concept. Data is only gathered in questionnaire files that you
create. Questionnaires are much more flexible in terms of the types of files and
information that can be presented and the type of responses and data that can be
collected.
The Experiment file that you create with the experiment editor simply tells MediaLab
which files are to be presented in each of a virtually unlimited number of conditions. This
can be as simple as assigning a single questionnaire file to each condition, or as
complicated as multiple questionnaire files assigned to each condition, each interspersed
with video, audio, graphics, Word documents and PowerPoint shows for which data does
not need to be gathered (e.g., for instruction screens or debriefing documents).
Remember though that all file types can also be presented in a questionnaire if you like.
That is why the experiment file can be as simple as stating which questionnaire (or set of
questionnaires) is assigned to each condition. Additional files can be specified simply for
the purpose of having this flexibility in the case that your application requires it.
QuickInfo
In the overview editor, you can scroll through the basic information regarding your
experiment. In this mode, you can see and define which files are presented to
subjects in your different experimental conditions, and the order in which they're to
occur.
Click on a specific area for help on that topic:
22 MediaLab v2014
Hints
Double-click on any condition or position field, and the file details will be displayed for the
file at that location. Double-click on any file field, and you will be able to search your
drives for the file you're looking to put there. If you want to edit the file name field
without being prompted for a file, just highlight the cell and press enter to edit it.
Info
Allows you to save summary information and detailed notes regarding your
experiment.
The title and comments are for the Editor's reference only. The comments field has a very
large capacity if you wish to exploit it.
Details
Allows you to set various options for the presentation of your experimental files.
Explore a specific area for help on that topic:
23
Sort
Sorts the files in the experiment, first by condition and then by position.
The sort button makes life a little easier by automatically reordering all of the files in your
experiment so that you need not worry about where you are placing a file at any given
time. When MediaLab sorts the experiment files, it will first place all of the files in each
condition together. Next, it will reorder the files within each condition by their ordinal
position. If you forget to do this, the editor will do it automatically when you exit. You can
manually sort whenever and as often as you like by clicking the sort button.
Hints
To add a new file between two existing files (e.g., at positions 2 and 3), assign it a
position value between these values (e.g., 2.5) and then click the Sort button. After
sorting, you can automatically renumber all of your items as sequential integers by
clicking the renumber 23 button.
Important: MediaLab will first sort by the condition 25 field and then by the position field,
so be sure that you identify the condition of the file before you sort.
Renumber
Renumbers the position 25 values within each condition 25 with sequential integer
values.
The renumber button cleans up your position numbering by replacing the values with
sequential integers. Within each condition, the first file will get a position value of 1, the
second will get a 2 and so forth. This is not a necessary operation and is provided mainly
for the purpose of aesthetics and to help you verify that you have the correct number of
files in each condition.
Hint
If your files are out of order, be sure to sort 23 before you renumber.
Print
See Experiment Editor, Printing 16
Help
Starts the interactive help system.
You can search the documentation using the Contents, Index and Search tabs in the left-
hand window. Also note that MediaLab takes advantage of context sensitive help such
that pressing F1 at any time will often direct you immediately to help with what you are
working on. A printable PDF copy is available in the C:\MediaLab\Help folder.
24 MediaLab v2014
Save
Saves the current file.
Save As
Saves the current file while allowing you to set the file name and/or location.
OK
Closes the Details window and returns to the Ov erv iew window.
Navigation
There are many ways to navigate your way around the experiment editor. The most
useful methods to be aware of are:
to jump from field to field, you can simply click on the field you want to edit, or
you can also use the tab key and the arrow keys to jump from one field to the next.
When your are editing in the overview window, double-clicking will allow you to edit any
field or will pull open a file search box if a file is required. If you want to edit a field that
requires a filename but do not want to open a file search dialog, then simply highlight the
field and press enter to edit the field directly.
All forms have a button with a check mark, like this: . This button closes whatever
editor you are currently in. You will always be given the option to save any changes that
you've made.
Details Editor
In the details editor, you will notice four buttons with arrows:
The first key will take you to the details of the first file in your experiment,
The second key takes you to the file immediately preceding the one you are
currently editing,
The third key takes you to the file immediately after the one you are currently
editing,
and the fourth key takes you to the last file in your experiment.
25
4.3 Condition
QuickInfo
Identifies which files are presented together in an experimental session.
Values
Any text. Usually numbers but words are allowed. For more than 9 conditions, you can
label the first 9 conditions using two digits (e.g., 01, 02, 03 etc.) to preserve numeric/
alphabetic consistency.
Purpose
When you run a MediaLab session, you will be asked for two things: 1) a Subject ID for
writing to the data file, and 2) the Condition you want to run. MediaLab will then read
your experiment file and look for all the files that belong to the condition you specify.
Therefore, in the experiment editor you need to identify which conditions receive which
files.
In your experiment file, you can create as many conditions as you like. Simply create a
unique identifier for each. You can use numbers (1, 2, 3, and so forth) or text (cond1, male
speaker, sg24, and so forth) to identify your conditions. Just be sure to give the same
condition id to every file that you want to be presented in that condition. If a file is to be
presented in multiple or all conditions simply list it once with each condition id.
Hints
Values are treated as words for purposes of sorting. So if you have more than nine
conditions and are using numbers to label the conditions you may want to use two digits
(e.g., "01", "02" … "09", "10" etc.) to maintain your numerical order after sorting.
Using long text identifiers can be a pain when you are running many subjects and have
to type the long condition names to start the experiment every time. Using numbers or
short letter combinations to identify your conditions will solve this.
For factorial designs, try assigning single letters to represent the various levels of your
factors. For example, imagine a persuasion experiment with a 2 (attractive vs.
unattractive speaker) x 3 (strong vs. weak vs. no arguments) design. The two levels of
the speaker factor could be represented with A and U, and the three levels of the
argument factor could be represented with S, W, and N, respectively. The six conditions
might be identified as AS, AW, AN, US, UW, and UN. Or for simplicity, you might simply
label them 1, 2, 3, 4, 5, and 6 while keeping a record of which number corresponded to
which experimental condition.
4.4 Position
QuickInfo
Identifies the order in which files are presented in each condition.
Values
Any number. Decimal values are allowed.
26 MediaLab v2014
Purpose
This field determines the order in which files are presented in each condition. MediaLab
will automatically sort the files in each condition by the values you specify in the Position
field. You can manually sort the file at any time by using the Sort 23 button.
Hints
To add a new file between two existing files (e.g., at positions 2 and 3), assign it a
position value between these values (e.g., 2.5) and then click the Sort button. After
sorting, you can automatically renumber all of your items as sequential integers by
clicking the Renumber 23 button.
Important: MediaLab will first sort by the condition 25 field and then by the position field,
so be sure that you identify the condition of the file before you sort.
4.5 File
QuickInfo
Names of the files to be presented in each condition
Value
Any file name ending with the following three letter extensions:
.que MediaLab Questionnaire 34
Purpose
The File Name field simply tells MediaLab which files to present in the different
experimental conditions. See Questionnaire item types 43 for more details on specific file
types.
27
Hints
Double-click on the File field to browse your hard drive and select files automatically.
Press Enter to manually edit a file path.
To be safe, you can always specify the complete file path (e.g., c:\experiments\myexp
\myimage.bmp). If you specify a complete path, remember to make sure the path is
correct if you load the experiment files onto other computers.
Advanced Hints
If the file is located in the same folder as your experiment file, then you can simply enter
the name of the file (e.g., myimage.bmp). If the file is located in a subfolder that is located
in the same folder as your experiment files, then you can enter the name of the subfolder
followed by the name of the file (e.g., images\myimage.bmp). Otherwise, you need to
specify the full path and name of the file you want to present (e.g., c:\mypictures
\myimage.bmp).
The advantage of placing the file in the experiment directory (or a subfolder) is that the
experiment folder can then be moved to a different place and you won't have to worry
about checking path names (e.g., c:\..., d:\..., etc.)
If the file is not in the same directory as the experiment, and it's not in a subfolder, then
you must specify the complete path of the file, e.g., c:\pictures\myimage.bmp
Files may also be located on another computer on your local network. MediaLab can
display files located on any computer on your network as long as the drive has been
"mapped" on the system running MediaLab. For example, a hard drive on another
computer may be mapped on your system as "h:\" or "s:\" etc. If you are new to
mapping, ask your network administrator about "mapping" the drives of other machines
on your network or refer to the instructions from Microsoft about mapping in Windows.
Once the drive is mapped, you can refer to files on that drive just as you would local files
(e.g., h:\myfiles\myfile.bmp). See also Running Experiments Over a Network 9 for details
on how to run an entire experiment from another machine.
** It's generally not a good idea to place two DirectRT sessions directly back to back in
your experiment because each DirectRT session requires a few seconds for one session
to end and the next to begin. Instead, try separating the sessions with a simple
instruction screen of some type.
4.6 BackGround
QuickInfo
Display an image in the background as the current file is presented.
Value
Any image file with a .bmp, .jpg, or .gif extension
Purpose
If you would like an image displayed in the background, simply type in or select the name
of the image file in this field.
28 MediaLab v2014
Advanced Hints
You can specify the location of the background image in the same way as you do for the
primary image using parameter 31 values. This can be useful if you want to present two
images (one as the main, and one as the background). To specify the location of the
background image, place values for the top and left parameters 32 in parentheses after
the file name. For example typing myimage.bmp (t50,l200) will place the background
image 50 pixels from the top and 200 pixel from the left.
If you want to present images with Word or HTML documents, you can insert them
directly into the Word or HTML documents.
4.7 BackSound
QuickInfo
If you would like a sound played in the background while another file type is
presented then simply type or place in the name of a compatible sound file ( in this
field. Play a wave or mpeg (mp3) sound file in the background when the current file
is presented.
Value
Any sound file with a .wav or .mp3 extension
Purpose
Backsounds are sounds files that play while another file is being presented. Keep in mind
that MediaLab will play backsound files to their completion. This allows for a backsound to
play through multiple items if you care to structure things that way. To have MediaLab
wait for the duration of the sound file and then automatically proceed, use the delay
parameter for the item and specify the length of the sound clip in seconds, e.g., for a 30
second sound clip, use (d30). You can find out the length of a sound clip by right clicking
on the file in Windows Explorer and selecting Properties.
.
4.8 BackVideo
QuickInfo
Display a video in the background as the current file is presented.
Value
MediaLab will play most video files that are supported by the Windows Media Player.
Purpose
If you would like a video played in the background simply type in or select the name of
29
Advanced Hints
By default, the backvideo will be centered on the screen and play at its encoded size. To
specify the location of the backvideo, use the top and left parameters 32 in parentheses
after the file name. For example, myvideo.bmp (t50,l200) will place the backvideo 50
pixels from the top and 200 pixel from the left. To specify the size of the backvideo, use
the width parameter 32 (the height will automatically be adjusted proportionally). For
example, myvideo.bmp (w640) will play the video at a resolution of 640x480 pixels. A
number of special width values are also available (e.g., quarter screen, half screen, full
screen).
QuickInfo
Randomly orders and presents all files sharing the same RWG value.
Value
Any positive integer value
Purpose
To randomly order and present certain files in your experiment, assign the files you want
to have randomized with the same number in this field. For example, if you have five files
you want randomized, assign them each an RWG value of 1. The five files will be
randomly presented in the five positions they occupy in the experiment. All remaining files
will be presented in their normal positions as long as their RWG value is either 0 or none.
You can independently randomize another group of items by assigning them all a 2,
another group with 3s and so forth.
Example
In one condition, you want to present 1) Word document, 2) five images randomly
ordered, 3) five sounds randomly ordered, and 4) a final Word document. Assign an RWG
value of "0" or none to the Word documents to keep them where they are, a "1" to the
five images, and "2" to the five sounds. That's it. To randomize the order that groups of
files are presented (e.g., whether the images or the sounds are presented first),see
Randomize Between Groups 30 .
Hints
Use of the RWG field in the experiment files randomizes the order of questionnaires and
related files, whereas using the RWG field in the questionnaire files 64 randomizes the
presentation of items that generate the actual data. Thus, use this functionality when
you want to randomize the higher-level elements of your experiment, the questionnaires
themselves.
30 MediaLab v2014
QuickInfo
All files sharing the same RBG value define a group of questionnaires or files to be
kept together. If multiple groups are defined, then MediaLab will present them in a
random order.
Value
Any positive integer value
Purpose
You may wish to randomly order and present entire groups of files in a given condition
(e.g., randomizing whether personality questionnaires or demographic questionnaires
come first) . To do this, assign the same RBG value to all of the items you want to keep
together. For example, if you have three groups of ten files in one condition, and you
want to randomize the order in which these 3 sets of files are presented, then assign
each group a different number and make sure all the files within each group share the
same number for that group. The files within each group will all stay together, but the
groups themselves will be randomly ordered. All files assigned a 0 or none will not move.
Note that all files within a group must be sequential in the given condition.
Example
In one condition, you want to present a Word document, five randomly ordered sets of
five images, and a final Word document. Assign a value of "0" or none to the Word
documents to keep them where they are, a "1" to the images in the first set, a "2" to the
images in the second set, and so forth. That's it. To randomize the order that the files are
presented within each group, see Randomize Within Groups 29 .
Hints
Use of the RBG field in the experiment files randomizes the order of groups of
questionnaires and related files, whereas using the RBG field 64 Randomize Between
Groups 65 in the questionnaire files 64 randomizes the presentation of groups items that
generate the actual data. Thus, use this functionality when you want to randomize the
groups higher-level elements of your experiment, the questionnaires themselves.
31
4.11 Parameters
QuickInfo
Parameters supply additional information and functionality for the presentation of
certain files. In the experiment Editor, all parameters are optional but offer the user
some nice flexibility. Parameters can be given in any order, must be separated by
commas, and the entire set must be enclosed in a single set of parentheses. Note that
parameters also can be set for background 27 , backsound 28 , and backvideo 28 files
following the same rules except that their parameters are entered after the filename
rather than in the parameters field.
Parameters
$ quickstyle 31
l left position 32
t top position 32
w width 32
Details
$quickstyle (optional)
To apply custom color and font settings to a questionnaire, you can create a QuickStyle
84 file from the Preferences menu. To apply it to a particular questionnaire file you can
enter the name of the QuickStyle file precede by a $. E.g., ($mystyle).
This window shows you exactly where the top left pixel of your image will be placed.
The top and left pixel values are marked every hunderd pixels along the top and left
borders, respectively.
The unit of measurement is pixels so placement will depend on what resolution you are
running on your computer. MediaLab attempts to scale most screens so that the same
scale is applicable no matter what resolution you are running. A left value of 400 and a
top value 300 would be entered as (l400,t300).
Note: As of v2004, you can express ANY location and size parameters as a percentage of
the screen. E.g., (w.3,h.25) would be a rectangle 30 percent of the screen's width and 25
percent of its height. To use percentages, simply use a value less than 1 and greater
than 0.
width (optional)
By default, videos play in their original size. However, you can set the exact size of the
video using the width parameter. The height will automatically be set in proportion to the
width you specify. For example, if you specify (w200) for a video that is normally 320x240
it will appear as 200x150. You can also use the following shortcuts rather than specifying
an exact width (e.g., w-1, w2, etc.)
none or w0 = Default Size
33
w1 = Double Size
w2 = Half Size
Note: As of v2004, you can express ANY location and size parameters as a percentage of
the screen. E.g., (w.3,h.25) would be a rectangle 30 percent of the screen's width and 25
percent of its height. To use percentages, simply use a value less than 1 and greater
than 0.
Examples
Image. To set the top left corner of an image to the center of a 640x480 resolution
screen: (l320,t240) or (l.5,t.5)
Movie. To play a video file at full screen on a 800x600 resolution screen: (w800) or (w-1).
Word Document. To display a Word document for 60 seconds rather than allowing the
subject to press a key to continue: (d60)
Background. For a BackGround image to be displayed for 60 seconds with the top left
corner located at the top left corner of the MediaLab window, specify the background file
as: myimage.bmp (t1,l1,d60)
34 MediaLab v2014
Key Concepts 34
Overview Window 35
Item Details
BackGround 39 Labels 55 SkipTo 66
Item Types
questions. This is why in questionnaires we use the term items rather than files to
describe what is being presented. In contrast when talking about experiments, we use
the term files because that is all that experiments can present.
Just like experiment files, questionnaire files can present various media images, videos,
sounds, documents, html files, executable (.exe) programs, or PowerPoint shows. Unlike
experiment files, MediaLab questionnaires use a variety of items 43 . MediaLab's multi-
media flexibility also allows you in most cases to combine items and media, presenting
them simultaneously as part of a questionnaire file.
Another key concept to get with questionnaires is that they are self-contained. Once a
questionnaire file has been created, it can be copied and simply dropped into any other
experiment. This makes creating new experiments extremely easy when certain
components are re-used (e.g., a questionnaire that measures a personality trait, or a
questionnaire that contains a mood inducing video followed with manipulation checks,
etc.). You can also run a questionnaire file on its own 9 , but experiment files need other
flies like questionnaires to run.
Remember that MediaLab help is context sensitive. When you are creating a
questionnaire and you want to know what the purpose of a particular field is, just place
your cursor in the field and then hit F1. The help files have been designed to take you
right to the relevant information.
QuickInfo
In the overview editor, you can scroll through the basic information for each item in
your questionnaire file. In this mode, you can see and define which items are
presented to participants and the order in which they're to occur.
Click on a specific area for help on that topic:
36 MediaLab v2014
Hints
Double-click on any position or name field, and the details will be displayed for that item.
When your are editing in the overview window, double-clicking will allow you to edit any
field or will pull open a file search box if a file is required. If you want to edit a field that
requires a filename but do not want to open a file search dialog, then simply highlight the
field and press enter to edit the field directly.
Info
Allows you to save summary information and detailed notes regarding your
questionnaire.
The title and comments are for the Editor's reference only. The comments field has a very
large capacity if you wish to exploit it.
Details
Allows you to set various options for the presentation of your questionnaire items.
Click on a specific area for help on that topic:
37
Sort
Sorts the items in the questions by their position values.
The Sort button makes life a little easier by automatically reordering all of the items in
your questionnaire so that you need not worry about where you are placing any one item
at any given time. When MediaLab sorts the questionnaire items, it will reorder them by
their ordinal position. If you forget to do this, MediaLab will do it automatically when you
exit. You can manually sort whenever and as often as you like by clicking the Sort button.
Hint
To add a new item between two existing items (e.g., at positions 2 and 3), assign it a
position value between these values (e.g., 2.5) and then click the Sort button. After
sorting, you can automatically renumber all of your items with sequential integers by
clicking the Renumber button.
Renumber
Renumbers the position 64 values in the questionnaire with sequential integer values.
The renumber button cleans up your position numbering by replacing the values with
sequential integers. The first item will get a position value of 1, the second will get a 2
and so forth. This is not a necessary operation and is provided mainly for the purpose of
aesthetics and to help you know that you have the correct number of items your
questionnaire.
Hint
If your items are out of order, be sure to sort 37 before you renumber.
38 MediaLab v2014
Print
See Experiment Editor, Printing 16
Help
Starts the interactive help system. You can search the documentation using the
Contents, Index and Search tabs in the left-hand window. Also note that MediaLab takes
advantage of context sensitive help such that pressing F1 at any time will often direct
you immediately to help with what you are working on. A printable PDF copy is available
in the MediaLab program folder, installed by default as the C:\MediaLab\Help folder.
Save
Saves the active file with its current name and location on your drive.
Save As
Saves the active file but allows you to specify a new file name and/or save location.
OK
Closes the Details window and returns to the Overview window.
Navigation
There are many ways to navigate your way around the questionnaire editor. The most
useful methods to be aware of are:
To jump from field to field, you can simply click on the field you want to edit, or
You can also use the Tab key and the arrow keys to jump from one field to the next.
When your are editing in the Overview window, double-clicking will allow you to edit any
field or will open a file search box if a file is required. If you want to edit a field that
requires a filename but do not want to open a file search dialog, then simply highlight the
field and press enter to edit the field directly.
All forms have a button with a check mark, like this: . This button closes whatever
editor you are currently in. You will always be given the option to save any changes that
you've made.
Details Editor
In the details editor, you will notice four buttons with arrows:
The first key will take you to the details of the first file in your questionnaire file,
The second key takes you to the item immediately preceding the one you are
currently editing,
The third key takes you to the item immediately after the one you are currently
editing,
39
and the fourth key takes you to the last item in your questionnaire file.
5.3 BackGround
QuickInfo
Display an image or HTML file (or URL) in the background as the current item is
presented.
Value
Any image file with a .bmp, .jpg, or .gif extension, or any HTML or URL.
Purpose
In questionnaires, the item types that support background images are:
Essays 44
Fill-in-the-Blank 44
Image files 46
Instructions 47
Multiple Response 47
Recall-listing 49
Scale Response 50
Sound files 50
Thought-listing 51
If you would like an image, html file or web page to be displayed in the background
simply type in the name of the file in this field. If you want to present an image or HTML
file by itself, simply use the Image 46 or HTML 45 item type.
Important Note
If you want to display an HTML file or URL as a background image you MUST specify the
size and location of the area in which you want it displayed. This is because the browser
display area will cover and hide most other items that it overlaps so it's very important to
specify the area in which you want it (see below under Advanced Hints). To do this, use
the top (t), left (l) 60 , height (h), and width (w) 63 parameters. For example, if you have
some specially formatted instructions in an HTML file that you want to use for a scale
response, you could you could enter "instructions.htm (t50,l50,w400,h150)" in the
BackGround field for that item. This defines an area for the html to appear that will not
cover the buttons and labels of the scale response.
Advanced Hints
You can specify the location of the background image in the same way as you do for a
primary image using parameter 57 values. This can be useful if you want to present two
images (one as the main, and one as the background), or to present an image at the
40 MediaLab v2014
same time as a question item (e.g., to get judgments of the image). To specify the
location of the background image, use the top and left parameters 60 in parentheses
after the file name. For example, myimage.bmp (t50,l200) will place the background
image 50 pixels from the top and 200 pixel from the left.
If you want to present images within html, Word or Word Perfect documents, you can
simply insert them into the html, Word, or WordPerfect files themselves.
Inserting some html with pop-up links in your background can allow your participants to
click a link on the question page to see a message, helpful hints, instructions,
translations, or any other text elaboration.
5.4 BackSound
QuickInfo
Play a wave (.wav) or mpeg (mp3) sound file in the background when the current
item is presented.
Value
Any sound file with a .wav or .mp3 extension
Purpose
In questionnaire files, all items support the Backsounds field. If the item is a movie or
sound file that already has sound content, then the content of the Backsounds field will
be superimposed. If you would like a sound played in the background as another item is
presented, simply type in the name of the sound file in this field.
Hint
Keep in mind that MediaLab will play files in the Backsounds field their completion. This
allows for files in the Backsounds field to play through multiple items if you care to
structure things that way. To have MediaLab wait for the duration of the sound file and
then automatically proceed, use the duration parameter 60 for the questionnaire item
using the Backsounds field and specify the length of the sound clip in seconds. For
example, type (d30) in the Parameter(s) field of the questionnaire item to play the file in
the Backsounds field for 30 seconds. You can find out the length of a sound clip by right
clicking on the file in Windows Explorer and selecting Properties.
5.5 BackVideo
QuickInfo
Display a video in the background as the current item is presented.
Value
By default, MediaLab will play any video file that is supported by the Windows Media
Player. This typically includes .mpg, .avi, .asf, .wmv, .dat, and .mpv video formats.
Purpose
In questionnaire files, all item types except executables, DirectRT and Inquisit sessions
support the Backvideos field. If you would like a video played in the background simply
type in the name of the video file in the Backvideos field of the item.
Advanced Hints
By default, the file in the Backvideos field will be centered on the screen and play at its
encoded size. To specify the location of the backvideo, use the top and left parameters
60 in parentheses after the file name. For example, myvideo.bmp (t50,l200) will place the
backvideo 50 pixels from the top and 200 pixel from the left. To specify the size of the file
in the Backvideos field, use the width parameter 63 in parentheses after the file name.
For example, myvideo.bmp (w300) will play the video at a resolution of 300 by its
proportional height. As with any parameters, you may combine multiple parameters in a
single set of parentheses.
5.6 Filename
QuickInfo
For item types that use files or programs from outside of MediaLab, the Question
Wording/File Name field identifies the location of the external files or programs.
Value
Certain item types in questionnaire files use particular file formats in their Question
Wording/ File Name field:
Double-click on the File field to browse your hard drive and select files instead of having
to type the name. To be safe, you can always specify the complete file path (e.g., "c:
\experiments\myexp\myimage.bmp"). If you specify a complete path, remember to make
sure the path is the same if you load the experiment onto other computers or drives.
Advanced Hints
If the file is located in the same folder as your experiment file, then you can simply enter
the name of the file (e.g., myimage.bmp). If the file is located in a subfolder that is
located in the same folder as your experiment files, then you can enter the name of the
subfolder followed by the name of the file (e.g., images\myimage.bmp). Otherwise, you
need to specify the full path and name of the file you want to present (e.g., c:\mypictures
\myimage.bmp). The advantage of placing the file in the experiment directory (or a
subfolder) is that the experiment folder can then be moved to a different place and you
won't have to worry about checking path names (e.g., c:\..., d:\..., etc.)
Do not place any parameter 57 values in the File Name field. Any relevant parameters
should go in the Parameter(s) field. Parameters should follow the filename only for files in
the Backgrounds 39 , Backsounds 40 , and Backvideos 41 fields.
If you specify a file name ending with .txt for a scale response or fill-in-the-blank item, the
subject's response to the question will be written to that text file preceded by a ~. This is
so that other programs you may want to run during the session have the option of
reading and acting on this information. It was particularly intended for use with DirectRT
so that responses provided by subjects could be used as stimuli in an embedded DirectRT
session.
5.7 GoBack
QuickInfo
If checked, an option will be provided to participants to return to the previous
questionnaire item.
Values
True (checked) or False (unchecked)
Purpose
In the details window of a questionnaire file, you can check the GoBack option for any
questionnaire item. If you check the GoBack option for any given item, then that item will
be provide participants with a "Go Back" button which can be clicked to return to the
previous questionnaire item. This is especially useful if you are concerned about
participants entering responses they might want to go back and change. However, be
43
aware that only the participants last response to an item is recorded in the data files; if
an item is encountered for a second time after the "Go Back" button is used, any previous
responses to that item are not recorded in the data.
If you check the GoBack option for a sequence of items, then participants will be able to
back up through the questionnaire. Note though that the GoBack function is limited to the
active questionnaire file and will not let participants return to a previous questionnaire
file from that experiment file.
Item Types
The following are descriptions of the various item types that can be included in a
MediaLab questionnaire. See also information on how to set parameters 57 .
Custom
Can't find what you need? MediaLab now allows you to create your own custom item
types using Visual Basic, Visual C++ or other development platforms using the MediaLab
ActiveX control. You can reuse your custom item type in other experiments or share it
with others. Data are integrated with MediaLab's regular data files. Limited only by your
imagination (ok, and maybe a little programming ability :)) See Creating Custom Item
Types 88 for more information.
DirectRT
To embed a DirectRT session within your questionnaire, simply select the DirectRT item
type and enter the name of the input file in the File field. MediaLab will pass the current
subject and condition values to DirectRT which will run the session and then pass control
back to MediaLab when it's finished. Note: DirectRT takes a few moments to start up and
shut down. It's generally not a good idea to place two DirectRT sessions directly back to
back in your questionnaire. Instead, try separating the sessions with a simple Instruction
item (e.g., that says Click Continue to proceed). See DirectRT for more details on how to
obtain DirectRT and what you can do with it. Note that MediaLab can save certain
responses for later use as stimuli in a DirectRT session. 106
44 MediaLab v2014
Essay
An essay item allows subjects to enter a response of unlimited length. Subjects will be
given your question wording at the top of the screen and a box below it in which to type
their response. Participants can voluntarily end the Essay item using the Esc, which you
can explain in your question wording if you like, or it can automatically end by setting a
time limit with the optional duration parameter 60 . Data for essay questions will
automatically be written to a separate file named with the variable name you assign to
the item.
By default, the essay response box below the question wording takes up the remainder
of the screen. Optionally, you can specify the size of the essay response box using the
height (h) and width (w) parameters 63 and the placement of the essay response box
using the top (t) and left (l) parameters 60 . This allows additional room for question
wording or for background images/html.
Note about reaction times. By default, response times for fill-in-the-blank and essay
questions taken at the time the subject continues to the next item. You can optionally get
it for the first key stroke instead by using (k1) in the Parameter(s) field 60 of the Essay
item.
Executable
In the case that MediaLab can not meet your needs for a particular experiment or
questionnaire, MediaLab will run any other program for you (including DOS, Windows 3.1,
and Windows 95/98/NT/2000/XP programs). Simply embed the program within your
questionnaire by selecting the executable item type and specify the file name in the
Question Wording/File Name field. Hint: MediaLab writes the current subject number and
condition to a file called CurrentSubjectInfo.txt at the beginning of every session in case
you want your custom program to access this information. The Visual Basic code to do
this is:
Fill-in-the-blank
Exactly as it sounds, fill-in-the-blank items provide the question wording and space for a
short open-ended answer. Fill-in-the-blank responses become available for insertion
within the question wording and response options 76 of subsequent items.
You can limit the response to a number by using the range (r) parameter 62 . Both
positive and negative values are permitted when using the range parameter. For
example, to accept only a valid age, you might use (r16-125) which would require a
response between 16 and 125. The user will be prompted to enter a number within that
45
HTML
Displays an HTML file exactly as it would appear in Microsoft's Internet Explorer. MediaLab
will open a full screen browser window to display the HTML or other URL that you specify.
The HTML page will be fully active so that the subject can click on hyperlinks or other
objects and browse to other pages that you make available. HTML files can be located
either locally or on the internet. Simply choose the HTML item and then enter the location
of the HTML file in the Question Wording/File Name field (e.g., c:\experiment\stim1.htm, or
www.mysite.edu/stim1.htm). Both .htm and .html are acceptable suffixes. To limit
browsing by time, use the duration parameter 60 ; otherwise, the subject can click
Continue to proceed. Any Java or ActiveX applications will be fully supported.
Optionally, you can have navigation buttons appear while HTML pages are displayed. You
can display any or all of: back, forward, home (will return to the starting URL), refresh and
search. To enable this option, simply create a text file in your experiment folder called
"browser.txt" and copy the following into it, changing true to false for any buttons you do
not want displayed.
back = true
forward = true
stop = true
home = true
refresh = true
search = true
Note that the HTML item is capable of displaying many other file types than just HTML.
Essentially, MediaLab passes whatever file or URL you specify to the Internet Explorer
Browser engine. So, if you can view it in Explorer, then you can present it using the HTML
item type. So if you have a file of any type that you want to display in MediaLab, try
specifying it as the filename in an HTML item (see also Word Document item below).
Caution: HTML pages that require input may have a subject pressing the spacebar as a
part of that input. Since the spacebar is also used in MediaLab to continue with the next
46 MediaLab v2014
item, this can cause a conflict. If this applicable to your HTML file, you can add a (k-1)
parameter 60 to disable the spacebar as a means to proceed to next item.
Image File
Displays an image file. MediaLab supports BMP, GIF and JPG image formats. You can
specify the location of the image on the screen using the optional top and left parameters
60 . Hint: To display two images at a time you can select a background 39 image and
place it accordingly, or you can insert multiple images in an HTML or Word file and then
simply present that instead. To get ratings of an image, use a Scale Response and use
the image as a background image.
Images by default appear in their actual dimensions. Optionally, you can use the height
and width parameters to specify the image display size. Note that if you size an image
using the height and width parameters 63 you need to also specify the top and left
parameters 60 otherwise it will appear in the top left corner of the screen by default.
Note that size and location parameters vary slight depending on your display settings.
MediaLab provides a guide for understanding these values in the Help menu with an
option called "Show Location Points:
Advanced Hints: BMP files will load faster than JPG or GIF formats because they do not
have to first decompress. Also, 256 (8-bit) color images will load much faster than images
encoded with thousands or millions of colors. Most image editing programs will allow you
to convert images to 256 colors without a noticeable degradation in quality. If you do see
a noticeable difference, try another image editor (e.g., IrfanView is very good and can be
downloaded from http://www.irfanview.com). All MediaLab images (e.g., the blue screen,
the MediaLab rats, the opening splash screen, etc. are 256 color images. The reason the
display should be set to thousands or millions of colors is so that multiple 256-color
images can be displayed simultaneously.
47
Inquisit
To embed an Inquisit session within your questionnaire you must have Inquisit build 1.25
(except build 1.32) or later installed and operational (see www.millisecond.com). Simply
select the Inquisit item type and enter the name of the Inquisit experiment file in the File
field. MediaLab will pass the current subject values to Inquisit which will run the session
and then pass control back to MediaLab when it's finished.
Instructions
For many instructions, you may not want to go to the effort of creating a Word or HTML
document. In many cases, simple text will do it. In such cases, choose the Instructions
item and provide the text you want displayed in the Question Wording/File Name field.
Instructions items have a number of options to control their appearance. You can control
the positioning of instruction text using the top and left parameters 60 . You can also
embed images, html, sound and video in an instruction item by using the BackGround 39 ,
BackSound 40 , or BackVideo 41 fields on any Instructions screen.
Instruction items also allow you to specify the onset parameter 61 like other items to
create a delay before the text appears. Note that the response time 69 (if you choose to
record it) will include the onset value.
To control the amount of time that instructions are presented, you can use the duration
parameter 60 as you would with other item types. Instruction items also offer a unique
option you can use to create a minimum exposure time. On any instruction item, if you
use a negative duration value (e.g., d-10) then the Continue button will not appear until
that many seconds have passed. You can use this option to ensure that subjects are
exposed to some information for a minimum amount of time, after which they may
proceed when ready.
By using the x parameter 61 , you can require that a password be entered to continue
beyond the instruction screen. This is a handy way to prevent subjects from continuing
after a certain point without experimenter intervention. Note that you can also set a
password for the end of all experiments in the Preferences 83 section of the toolbar of
the main MediaLab menu.
Movie
Presents a video file. By default, MediaLab will play any video file that is supported by the
Windows Media Player. This typically includes .mpg, .avi, .asf, .wmv, .dat, and .mpv video
formats.
You can specify the location of the video on the screen using the optional top and left
parameters 60 . You can specify the size of the video using the width parameter 63 (the
height will automatically be set in proportion). Movies can also be shown simultaneous
with most other items types by specifying a video file in the Backvideo 41 field.
Multiple Response
The "check all that apply" multiple response format is the standard format to use when
you want to offer closed ended response alternatives AND allow subjects to select one or
more of the response alternatives. Use from 1 to 12 response options and provide a text
label for each. Subjects can select and deselect multiple response options by hitting the
appropriate key or clicking the appropriate button with the mouse. You can also have
them use the function keys (F1 through F12) in order to respond when 10 or more
alternatives are presented. MediaLab will create a unique variable for each option and
record whether or not each item was selected (1) or not (0).
48 MediaLab v2014
Multiple response items require the p parameter 61 to indicate how many response
options to use, e.g., (p5) for five options. You can optionally add a range parameter 62 to
specify a minimum and/or maximum number of responses to take. For example, (p5,r1-3)
would require that the subject choose at least 1 and no more than 3 of the 5 options. To
require a single response, you could specify r1-1. Multiple response items support the
BackGround 39 , BackSound 40 , or BackVideo 41 fields.
You can also now include <specify> in the text label of any response option. This will not
be displayed to the subject but will cause MediaLab to prompt subjects to enter a text
response. This is handy in cases where you want to provide an alternative such as
"other." For example, if you wanted the seventh option to be "other" and you wanted
subjects to specify what "other" means, then enter other <specify> for the text label. The
actual text response will be written to the data file instead of whether or not the item
was selected. If you choose to use this feature, you should select the Write As Text
option for the variable since a numeric variable in SPSS will not be able to store a text
response.
Multiple Response items support all of the same optional parameters as Scale Responses
50 (below).
On-Line Rating
The on-line rating feature allows you to capture continuous response data from subjects
over the course of an entire item (e.g., movie, sound file, timed image or document).
Using either a joystick (default if one is connected) or the left and right arrow keys,
subjects will be asked to give continuous rating feedback for the duration of the item
following the on-line rating item. All you need to do is set the number of scale points for
the rating scale and the text labels for the scale points (use none to leave a label blank).
When the subsequent item starts, MediaLab will present the online rating scale which
subjects can move up or down by using the joystick or arrow keys. MediaLab will take 10
samples every second and average these to provide a value for that second. MediaLab
will continue doing so for the duration of the item and then write these values to a
separate data file which will be named after the item being rated. For example, if you
have subjects perform an online rating of a movie item called movie1, then all the online
data will be stored in a file called movie1_online.csv. This file can be opened in Excel or
other spreadsheet application for viewing.
Note that there is also a viewer included in the Utilities folder called "OnLineViewer". You
can open any online output file to view the data plotted as a continuous graph with this
program. You can also select by subject, by condition and you can set the time interval
you want to see plotted. At any time, you can also copy the plotted values and paste
them into Excel or another spreadsheet for further manipulation or graphing. There is
also a joystick calibration program located in the Utilities folder as well.
PowerPoint Show
Presents a Microsoft PowerPoint show. This is an ideal way to present impressively
formatted sequential display screens. Using PowerPoint, simply create a slide show and
then save the file as a PowerPoint show (.pps format). Then, enter the filename in the
Experiment editor in the position and condition(s) you want it to occur or enter it as an
item within a questionnaire. PowerPoint shows do not require any parameters.
Hint: If you are new to PowerPoint, follow these steps to create your first slide show.
Open PowerPoint and select File->New from the main menu. Choose the Presentations
file tab and select a template (the Business Plan, Standard is very cool).
Click on the text and replace it with whatever you like (e.g., ‘Welcome to the
experiment!"). Use the Page Down key to advance to the next slide and edit it as well.
49
Add new slides with the Insert->New Slide command. Delete slides with the Edit-
>Delete Slide command.
When you're happy with the show, select File->Save As from the main menu. In the
window that appears, click on the Save As Type box and select PowerPoint Show
(*.pps). Enter a name for the file.
Drop it into your questionnaire or experiment file. You're done!
Ranking
With the ranking item, you can give subjects up 12 items to rank in any order they
choose. The items will appear as labels that subjects will be able to drag and drop into a
special ranking area using the mouse. To design your ranking item, first enter a points
parameter 61 to indicate how many items you want to have subjects rank. For example,
to have 6 items ranked, enter (p6) in the Parameter(s) field. This will allow you to enter
those 6 items in the text labels area. Enter any text you like. To have participants rank
images, enter the name of each image file in a text label field. For examples of ranking
(standard and with images), visit our Experiment Sharing area at support.empirisoft.com.
That is all that's necessary for a ranking item, but there are a number of formatting
options. For example, you may choose to have an instruction window pop up at the start
of the item. You can do so by entering text in the Question Wording/File Name field for the
item. Subjects will be able to bring these instructions up again at any time by clicking the
Instructions label at the bottom of the screen.
You can display labels at the top and bottom of the ranking area such as "Most
Important" and "Least Important" so that subjects know which items go toward the top
and which go toward the bottom. To do so enter these labels in the Question Wording/File
Name field after the instructions (if any) like this:
=Most Important, Least Important
If you don't have any question wording then you can simply type the labels in the
question wording field preceded by an equals sign.
By default, the ranking items will be as wide as they need to be to fit on one line. Long
words and phrases will consequently be wider than short words and phrases. If you
have entire sentences being ranked, you may find they are too wide. There are two ways
to control the size of the items. First, you can specify a width parameter 63 . This will force
the items to be a constant width and the text will wrap to accommodate the width—i.e.,
becoming multi-lined. A second way you can control the size is by specifying a spacing
parameter 62 . E.g., to display 6 items with a fixed width of 250 pixels and a font size of 7,
you would use parameter values of: (p6,w250,s7).
When saving the data, MediaLab will create a unique variable for each of your ranked
items and save it's ordinal value in the ranking as its value. For example, if your ranking
item's variable name were "rk1", then the fourth item in your list will be called rk1_04. If
that forth item were ranked second, the value of rk1_04 would be 2. If you select the
Write Reaction Time option for a ranking item, you will also get the first time each item
was selected by the subject—these values will be recorded as typical RTs using the same
variable name preceded with a t (e.g., trk1_04).
Recall List
Allows subjects to indicate what they can recall, one memory at a time. Operates in the
same was as thought listings 51 (see below). Recall list items support the BackGround 39 ,
50 MediaLab v2014
Scale Response
The scale response format is the standard format to use when you want to offer multiple
closed ended response alternatives. Use from 1 to 12 response options and provide a
text label for each. Subjects can select a response option by either using the number key
that corresponds to the alternative (1 through 9) or you can have them use the function
keys (F1 through F12) in order to respond when 10 or more alternatives are presented.
Scale responses require the points parameter 61 to indicate how many scale points to
use, e.g., (p5) for a five point scale. Scale responses support the BackGround 39 ,
BackSound 40 , or BackVideo 41 fields. The selected response also become available for
insertion within the question wording of subsequent items 76 .
By default, scale responses offer a single line for the text labels. In cases where you
need more space because of long labels, you can use the spacing parameter 62 . This
allows you to create more space for labels with lots of text or if you're using an html file
for your labels. For example, if you want to "double-space" your response options to
create more space, use the parameter (s2), or (s3) to triple space, or (s1.5) to add a half
space and so on. You can enter any value from 1 to 5 and decimals are ok. This will
produce evenly spaced response options with as many extra lines per item as you need.
Importantly you can do this on an item by item basis--the default of course is single
space if you don't specify the space parameter.
By default, scale responses are presented vertically. They can be presented using a
horizontal format by using the width parameter 63 to specify the width of the scale (see
Help -> Show Location Points for help with sizing on your system). For example, (w.7)
would make the scale span 70% of the screen width. Scales will be centered in this
space.
With both horizontal and vertical scale formats, you can specify how far down the buttons
appear by using the top parameter 60 . This can help to create more space for extra
question wording. Note that if you don't see your scale you might have moved it down
too far (i.e., try a smaller top value).
To force a subject to answer with a correct response you can enter the item's variable
name in Skip to field for any incorrect answers. For example, if a question's variable name
is q1 then simply enter q1 in the Skip to field for any response options that are wrong. If
one of these options is selected, the subject will be prompted to try again. Response
times 69 will reflect the time of the first correct answer.
Finally, you may want a subject to specify their answer if, for example, you give the an
"Other" option. Just include <specify> in the text label of the response option. This will
not be displayed to the subject but will cause MediaLab to prompt subjects to enter a
text response if they choose this option. For example, if you wanted the seventh option
to be "other" and you wanted subjects to specify what "other" means, then enter other
<specify> for the text label. The actual text response will be written to the data file
instead of response number. If you choose to use this feature, you should select the
Write As Text 69 option for the variable since a numeric variable in SPSS will not be able
to store a text response.
Sound File
Plays a .WAV or .MP3 format sound file. For WAV files, larger sound files may take a few
seconds or longer to load. Note that 8-bit mono sound files will load and play much faster
than will 16 bit stereo sounds. In contrast, MP3 audio files are much smaller in size and
will start to play immediately. Importantly, MP3 sound files are compressed with virtually
no loss in sound quality! Sound files support the BackGround 39 , BackSound 40 (which
will play simultaneously), or BackVideo 41 fields.
51
For flexibility in playing sound files, they can be presented as a Sound item or they can be
presented as BackSounds to other items. Note that Sound items end automatically when
the next item appears even if they have not yet completed. In contrast, BackSounds
continue until completion (overlapping subsequent items) or until a file in another
BackSound field of a different item is encountered. Thus Sounds and BackSound can be
used strategically to accomplish different effects. Note that if you need to stop a
BackSound upon item completion then you can simply insert "silence.wav" in the
Backsound field for the subsequent item. It is a short silent sound file that will cancel any
currently playing BackSound. Silence.wav can be found in the Utilities folder.
Thought Listing
The thought listing item is used when multiple open-ended responses are desired for a
single question. For example, a common use for this item type is to expose subjects to
information and then ask them to indicate the thoughts that occurred to them during
exposure. Thought listing items require the n parameter 61 to indicate the number of
responses you want listed, e.g., (n4) for four thoughts. You can also specify a time limit
for the thought listing item using the duration parameter 60 . Note also that the escape
key will end the thought listing question. You can optionally inform subjects of this so that
they can continue whenever they are done listing their thoughts.
Thought Rating
MediaLab allows you to have subjects rate their own open-ended responses from
thought or recall lists on any dimension you like. The thought rating item works much like
a scale response but feeds back to subjects their responses from an earlier thought or
recall list question. To do this, you need to specify the variable name you gave to the
thought or recall list from which MediaLab is to supply the responses. For example, say
subjects listed their thoughts earlier in a variable you named tlist. To have subjects later
rate these thoughts using a thought rating item (for example how positive or negative
each thought was), you would specify (qtlist) in the Parameter(s) field your though rating
item. Note that for thought rating items, you must also specify the number of scale points
parameter the points parameter 61 . Thought rating items support all of the same
optional parameters as Scale Responses (above) as well as the BackGround 39 ,
BackSound 40 , or BackVideo 41 fields.
You can also include <specify> in the text label of any response option. This will not be
displayed to the subject but will cause MediaLab to prompt subjects to enter a text
response. This is handy in cases where you want to provide an alternative such as other.
For example,iIf you wanted the seventh option to be other and you wanted subjects to
specify what other means, then enter other <specify> for the text label of the response
choice. The actual text response will be written to the data file instead of whether or not
the item was selected. If you choose to use this feature, you should select the Write As
Text 69 option for the variable since a numeric variable in SPSS will not be able to store a
text response.
Voice Response
MediaLab allows you to record voice responses and optionally measure the reaction time
of those responses. To save a voice response as a sound file, simply enter a name in the
Question Wording/File Name field of the Voice Response item. It will automatically be
saved by that name in a Voice subfolder within the main Data folder. If you specify none
then no sound file will be saved. If you check Write Reaction Time 69 then you will get the
latency of the response in milliseconds. You can check this option and specify none for the
filename if you are interested only in the RT.
52 MediaLab v2014
By default, MediaLab will record the voice response until the subject clicks Continue. You
can optionally specify a duration parameter 60 to record the voice response for a fixed
time. For example, (d5) would record a voice response for 5 seconds and then
automatically continue to the next item.
You will need to make sure you have a microphone connected to the microphone input
connector on your sound card. You will also need to make sure that the microphone is
active and able to record. Finally, you will need to tell MediaLab how sensitive it should
be in detecting response times.
To make all this easier, MediaLab comes with a tool called SoundCheck in the Utilities
folder. After making sure your microphone is plugged into your soundcard, click Monitor
and speak into the microphone. If all is well, you should see the bar labeled Microphone
Level respond immediately to your voice. If that works, then click Stop to end the
monitoring. Now try a sample voice rt. Click Test RT and then speak into the microphone.
SoundCheck should report the response time in milliseconds.
If you need to speak too loudly to set off the test, then try moving the sensitivity slider
toward the left. If the test is set off too easily, then try moving the sensitivity slider
toward the right. Try this until you find an RT sensitivity that works well for you. When
you are happy with the sensitivity, click Save. This will make the new sensitivity level
available to MediaLab when you run a session with voice responses. It is advisable to run
a few test RTs on any machine before running a MediaLab session with voice responses
for the first time. Note: Some users have reported that optimal performance for Voice RTs
requires restarting MediaLab between sessions. While we work on figuring out why, we'll
simply pass on this recommendation.
Web Tracker
The HTML item type allows you to present HTML and other "browser-compatible" files.
The WebTracker item extends this functionality by tracking a subject's behavior while
browsing through a sequence of HTML or other browser-compatible files. It stores each
link that the subject follows as well as the time at which the link was followed and how
long the subject stayed there before continuing to the next link. The item ends when the
subject clicks the "Continue" button. These data are all written to a separate
spreadsheet file (.csv) that will be named after the variable name you assigned to the
WebTracker item and will be located in the experiment's data folder.
Some important considerations for using Word and WordPerfect documents with
MediaLab
Some documents may appear without regard to their top and left margins (i.e., the text
will appear to the very left and very top of the screen). If you experience this, don't
bother to adjust your margins. Instead, select the text and increase the paragraph
indentation (on the menu, select format > paragraph.). For extra space at the top, insert
hard returns. This solves the problem.
Microsoft Word may warn you about macros when MediaLab attempts to present a
Word file. You can choose to disable macros, or you can save your documents without
macros. Either way, if this happens, you can tell Word not to warn you about this every
time so that this window does not pop up every time MediaLab displays a document
with macros in it.
MediaLab uses a 2-second keyboard/mouse cancellation buffer for Word/WordPerfect
documents to avoid accidental skipping of Word documents. This is done because Word
documents may take a second or two to load and subjects may "continue" repeatedly
while this is happening.
Note that Word Document item is also capable of displaying many other file types than
just Word Documents. If you have a file of any type that you want to display in MediaLab,
try specifying it as the filename for Word Document items (see also HTML items above).
MediaLab will attempt to cooperate with the file's usual program to have it displayed
correctly (e.g., an Adobe Acrobat file, an Excel Spreadsheet, a Flash Presentation, etc.).
Of course this depends on how cooperative the other program is but it's definitely worth
checking if you're curious.
See also
Appendix A: Unusual Task Specific Features 106 for a few functions that are task specific.
QuickInfo
Identifies the question wording for the questionnaire item type being presented.
Multiple Response
Recall Listing
Scale Response
Thought-listing
Thought-Rating
5.10 Labels
QuickInfo
For scale response, multiple response, thought rating, and online rating item types,
the buttons labels determine what is shown on the buttons when that item is
displayed onscreen. The default labels are the numbers from 1 to 12, starting with
the top response option. These values can be changed to whatever you want (e.g., A,
B, C, -1, -2, -3, etc.).
When using the keyboard, these numbers correspond to what number key (1-9 for
the first 9 options) and/or function key (F1-F12 for any of the 12 options) can be
pressed to select a button. However, any button can be selected using a mouse to
move the cursor to the desired button and left-clicking it.
Advanced Hints
You can modify the the size, format and location of response options and buttons using
the Text Label 67 field to the right of the Label field.
On scale responses and thought ratings, the default value written to the data file is
always the ordinal value of the response option. For example, if the first option is chosen
then a 1 is written to the data file—no matter what is in the Label field for that button. For
multiple response items, a button that is chosen and shows a check mark when the
Continue button is pressed will be recorded as 1 while buttons that are not chosen are
recorded as 0.
For all of these item types you can specify an alternate value to record in the data file for
any given response option by placing it in squiggly brackets {} after the text label like so:
Starting with the "strongly disagree" option and going down the list, these options will
now be recorded as -2, -1, 0, 1, and 2, respectively. Note that the value can be text or
numeric although numeric is recommended. If you use text, make sure the Write as Text
69 option is checked for the item.
You should not modify the first or third line. The second line represents the values of the
variables listed on the first line. You can change any of these as necessary. The
remaining lines tell MediaLab how to map incoming signals to response keys. On each line
you can list a pair where the first value is the signal sent to the serial port (i.e., 1-255)
and the second value is the response it should map on to (i.e., 1 to 12). In the example
above, if MediaLab detects a "1" coming through the serial port, it will react as though
the 1 or F1 key had just been pressed. See the Serial Data 107 section for more
information.
5.11 Name
QuickInfo
Identifies the item name and provides a variable name for the data file.
Values
Any string, up to 60 characters. Keep in mind though that some statistical packages and
spreadsheet applications may still have difficulty working with longer variable names.
Avoid spaces, special characters and variable names that start with a number. Be sure to
view and analyze some practice data before going too crazy with this feature.
Purpose
This field is the variable name. A unique name is required for every item in the
questionnaire. This is the name that will be written to the SPSS and SAS input files. For
items that collect multiple responses, numbers will be appended to the name. Item
names also allow for skip patterns 66 and thought ratings 51 and for the insertion of
subjects' responses into later question wordings 76 .
Hints
Most data analysis programs react negatively to a few things that can be avoided here.
For example:
Avoid variable names that begin with a number.
thlist_2, thlist_3, etc.). Consequently, to keep the output variable name to a maximum
of 8 characters, keep in mind that 2 to 4 additional characters will be appended to the
variable name (e.g., _4, _12, plus a t prefix for the reaction time variables if they’re
being recorded). If you always limit such variable names to a maximum of four
characters you will always be safe.
QuickInfo
Omits the particular question in the conditions specified. Response is assigned a
missing value.
Details
Although you may want to administer a given questionnaire in multiple conditions, you
may want to skip certain items in some conditions. To skip the item, simply enter the
condition(s) that are not to receive the item in the omit conditions field.
Example
Subjects watch a video about sexual harassment of women in the workplace by male co-
workers. Afterwards they fill out a female sexual harassment questionnaire. Men are all
assigned to condition 1 and women are assigned to condition 2. The question "Have you
ever been sexually harassed by a male co-worker?" is to be omitted for male subjects.
Therefore, in the Omit Conditions field, there will be a (1). The question "Have you ever
sexually harassed a female co-worker" is to be omitted for female subjects, and so (2) is
placed in the Omit Conditions field.
If more than one condition should not get the item, then separate the conditions with
commas, e.g., (1,2,6,cond3).
5.13 Parameters
QuickInfo
Parameters
$ quickstyle 59
@ time stamp 59
58 MediaLab v2014
h height 63
k key 60
l left position 60
m mask 61
r range 62
s spacing 62
t top position 60
w width 63
Parameters for Different Item Types – Required parameters are in bold CAPS
Details
Note: (optional) indicates the parameter is NEVER a required parameter of ANY item type.
$ quickstyle (optional)
To apply custom color and font settings to a questionnaire item, you can create a
QuickStyle 84 file from the Preferences menu. To apply it to a questionnaire item you can
enter the name of the QuickStyle file precede by a $, e.g., ($mystyle). The style will
remain in effect until you apply different style file on a subsequent item or enter $off as a
parameter for a subsequent item.
Parameter(s) field would cause myprog.exe to launch at the start of a 7pt scale response.
This is especially useful for programs that should run silently in the background as
MediaLab will not attempt to keep the program visually in the foreground unless it is
launched via the regular Executable item 44 type.
key
Open Ended Response Times: By default, response times for fill-in-the-blank and essay
questions are taken at the time the subject continues to the next item. You can optionally
get it for the first key stroke instead by using the parameter (k1).
Disable the Spacebar: HTML pages that require input may have a subject pressing the
space bar as a part of that input. Since the space bar is also used in MediaLab to continue
with the next item, this can cause a conflict. If this applicable to your HTML file, you can
add a (k-1) parameter to disable the space bar as a means to proceed to next item.
Track Key Presses: When used with an essay item, this parameter allows you to record
every time a given key is pressed over a given time period. Simply add the key parameter
to indicate that you want to track a key press response over the duration of the essay.
You need to tell MediaLab what key you want by giving it a code (e.g., k57 will have
MediaLab track the 9 key). There is a utility included in the Utilities folder called
keycodes.exe. It will quickly tell you the code for any key on the keyboard including
function and non-character keys. Just double click the keycodes.exe program and hit any
key to get its code. These codes are NOT the same as the more extensive set of DirectRT
key codes!
Here's an example. You want to track every time the subject hits the 9 key over a 30
second interval. Run keypress.exe and hit the 9 key. You will see that its code is 57. Using
an essay item, enter the parameters (d30,k57). This means the item will be displayed for
30 seconds and track every time the user hits the 9 key. Medialab will write the key
tracking data to a file called the same thing as the essay variable name file but with
"keypress.csv" added to it. You can open the data file in Excel or similar spreadsheet
program. It will indicate the subject and condition IDs and give you the time in milliseconds
from the start of the essay for each time the key was hit.
m ask (optional)
You can use the mask parameter to specify the number of characters allowed in a fill-in-
the-blank item as well as whether each is fixed or free. For example, the parameter
(m*****) will provide five blanks that are free to be filled by any character. The
parameter (m***ck) will offer three free blanks preceeded by "m" and followed by "ck".
Fixing characters in this way allows subjects to offer partial responses such as in a word
completion task.
You can also combine the mask and range 62 parameters. For example, the parameters
(m*********, r100000000-999999999) could be used to prompt the subject for a valid,
nine-digit social security number.
range (optional)
You can now limit a fill-in-the-blank item 44 response to a numerical range by using the
range parameter. For example, to accept only a valid age, you might use (r16-125) which
would require a response between 16 and 125. The user will be prompted to enter a
number within that range if they fail to do so. You can optionally combine this with the
mask parameter 61 to provide the appropriate number of spaces for the number. You can
also add a range parameter 62 to multiple response items 47 to specify a minimum and/
or maximum number of responses to take. For example, (p5,r1-3) would require that the
subject choose at least 1 and no more than 3 of the 5 options.
spacing (optional)
For items that use response buttons (i.e., scale responses, multiple responses and
thought ratings) you can use the spacing parameter to create more space for options
with lots of text or if you’re using an html file for your labels. For example, if you want to
"double-space" your response options, use the parameter (s2), or (s3) to triple space, or
(s1.5) to add a half space and so on. Values from 1 to 5, including decimals, are
permitted. This will produce evenly spaced response options with as many extra lines per
item as you need. Importantly you can do this on an item by item basis--the default of
course is single space if you don't specify the space parameter.
For fill-in-the-blank items 44 , you can use the Space parameter to tell MediaLab how
many lines of text you want to allow. For example, a parameter of (s3) will provide three
lines of text instead of one (the default). Note that if you specify more than 1 line, the
Enter key will not send the subject to the next item but rather to the next line in the text
box. The Escape key may be used as an alternative to the Enter key in such cases.
w1 = Double Size
w2 = Half Size
Examples
Scale Response. To set the number of response options for a scale response to 5: (p5)
Image. To set the top left corner of an image to the center of a 640x480 resolution
screen: (l320,t240) or (l.5,t.5)
Instructions. To require that password be entered before the subject can continue (e.g.,
at the end of the experiment, between phases of the experiment), specify a password
preceded by an x, e.g., (xmonkey).
Movie. To play a video file at full screen: (w-1)
Thought listing. To have subjects list up to 8 thoughts, or until 120 seconds have passed,
which ever comes first: (n8,d120).
Background. For backgrounds, backsounds and backvideos, the parameters are always
entered in parentheses after the filename and are always optional. E.g., For a
background image to be displayed with the top left corner located at the top left corner of
the MediaLab window, specify the background file as: myimage.bmp (t1,l1)
64 MediaLab v2014
5.14 Position
QuickInfo
Identifies the order in which items are presented in the questionnaire.
Values
Any number. Decimal values are allowed.
Purpose
This field determines the order of the items in the questionnaire file. MediaLab will
automatically sort the items in the questionnaire by these values when you close the file.
You can also manually sort the items at any time using the Sort 37 button.
Hints
To add a new item between two existing items (e.g., 2 and 3), assign it a position value
between the values of the two existing items (e.g., 2.5) and then click the Sort button.
After sorting, you can automatically renumber all of your items as sequential integers by
clicking the Renumber 37 button.
QuickInfo
MediaLab will randomly order and present all items sharing the same RWG value.
Value
Any positive integer value
Purpose
You may wish to randomly order and present certain items in your questionnaire file. To
do this, assign the same RWG value to all the items you want to have randomized with
each other. For example, if you have five items you want randomized, assign them each
a 1 in the RWG field of each item. The five items will be randomly presented in the five
positions they occupy in the questionnaire. All other files will be presented in their
assigned positions as long as their RWG value is either 0 or none. You can independently
randomize another group of items by assigning them all a 2, another group with 3s and
so forth.
Example
In your questionnaire, you want to present 1) an instruction screen, 2) five scale
response items randomly ordered, 3) three fill-in-the-blank items randomly ordered, and
4) a final Word document. Assign an RWG value of 0 or none to the instruction screen and
65
Word document to keep them where they are, a 1 to the five scale response items, and 2
to the three fill-in-the-blank items. That's it. To randomize the order that groups of items
are presented (e.g., whether the scale items or the fill-in-the-blank items are presented
first),see Randomize Between Groups 65 .
Note
For ease of analysis, variables will be written to the data file in the order the occur in the
questionnaire, not in the randomized order in which they are presented.
QuickInfo
All items sharing the same RBG value define a group to be kept together. If multiple
groups are defined, then MediaLab will present the groups of items in a random order.
Value
Any positive integer value
Purpose
You may wish to randomly order and present entire groups of items in your questionnaire
(e.g., randomizing whether demographic or personality questions come first in a
questionnaire). To do this, assign the same RBG value to all of the items you want to
keep together. For example, if you have five sets of ten items, and you want to
randomize the order in which these 5 groups of items are presented, then assign each
group a different number in the RBG field and make sure all the items within each group
share the same number for that group. The items within each group will all stay together,
but the groups themselves will be randomly ordered. Items assigned a 0 or none will not
move. Note that all items within a group must be sequential in the questionnaire.
Example
In your questionnaire, you want to present 1) an instruction screen, 2) five scale
response items, 3) three fill-in-the-blank items, and 4) a final Word document. Whether
the scale responses come first or the fill-in-the-blanks come first is to be random. Assign
an RBG value of 0 or none to the instruction screen and Word document to keep them
where they are, a 1 to each of the five scale response items, and a 2 to each of the five
fill-in-the-blank items. When MediaLab runs that questionnaire file, the instruction screen
will always come first, followed randomly by either all 5 of the scale response items or the
three fill-in-the-blank items, and always end with the Word document item. To randomize
the order of the items within each group, see Randomize Within Groups 64 .
Note
For ease of analysis, variables will be written to the data file in the order the occur in the
questionnaire, not in the randomized order in which they are presented.
66 MediaLab v2014
5.17 Skip To
QuickInfo
The Skip to field allows the Editor to create simple or advanced skip patterns in their
questionnaire.
Details
Unconditional Skipping
In some cases you may want to skip over items unconditionally. Unlike conditional
skipping, you can do this with any item type. For unconditional skipping from a scale
response simply place the same variable name in each Skip To field of all the response
choices. For all other item types, simply enter the variable name you wish to skip to in the
single Skip To field.
Unconditional skipping is especially useful for rejoining subjects who have been
conditionally skipped to various points in the questionnaire so that they end up at a
common place. When they are done their special sections, they can be joined up to the
same question by putting an unconditional skip item at the end of each of their custom
sections. In each case they are all skipped to the same item and continue on with the
same set of items.
Advanced Hints
Combining the skip function with RWG (Randomize-Within Groups) 64 you can achieve
extra randomization functionality. For example, to randomly present 5 of 10 items give all
10 items the same RWG value (e.g., 1). This will randomize their order. Then, embed a
blank instruction item with a delay of 1 second after the fifth item and give it a skip value
to go the item following the tenth randomized item. This will result in the five of the ten
items being presented (which were randomly ordered) after which MediaLab will
automatically skip the remaining 5 unpresented items and proceed with the rest of the
questionnaire.
that only one of the five response options must be chosen and, consequently,
guarantees your skips to work.
QuickInfo
Text labels provide the response alternatives (e.g., strongly agree, female, >10,000,
and so forth, very positive) for scale response and thought rating items. Simply type
whatever label you want in the Text Label field of a response option. If you specify
none, for a given text label, then that label will appear blank. This can be used, for
example, to create a scale anchored only at the ends.
Hints
You can also now include <specify> in the text label of any response option. This will not
be displayed to the subject but will cause MediaLab to prompt subjects to enter a text
response. This is handy in cases where you want to provide an alternative such as
"other." For example, if you wanted a response option to be labeled as "other" and you
wanted subjects to specify what "other" means, then enter other <specify> in the Text
Label field for that response choice. The actual text response will be written to the data
file.
Also note that copying and pasting a questionnaire item using the <specify> options, all
the copied items will also contain the <specify> option.
Advanced Hints
If you want to specify a specific location for a button you can add top and left parameters
60 to the Text Label field for that response option. For example, if you want to relocate a
button with a text label of "skip this question" then you could type "Skip this question
(t.7,l.7)" in the Text Label field for that response option. That would make the button
appear 70% of the way across and 70% of the way down the screen.
If you want to adjust the size of the button you can add height and width parameters 63
to the Text Label field for that response option. In the example above, if you wanted to
resize the button as well as relocating it, you could type "Skip this question (t.7,l.7)" in
the Text Label field for that response option. This would produce the same result as
above except the label would be 20% of the screen width.
Finally, if you want to place the text label within the button itself, then simply put the text
label in the Label field the parameters in the Text Label field for that response option, like
this:
You can also insert prior responses 76 from fill-in-the-blank items, scale responses,
multiple responses, and any response.xls variables you have calculated 101 into the
response options of any subsequent questionnaire item that allows response options.
Simply type the item name 56 with a set of <>, like this: <item_name>. For example, if
you have items named "friend1" and "friend2" you could have whatever was recorded for
those items appear in the response options for a later item like this:
1. I would pick <friend1>
2. I would pick <friend2>
Whatever value was recorded for the "friend1" item will appear in place of <friend1>, and
whatever value was recorded for the "friend2" item will appear in place of <friend2>.
Remember that to insert a variable into an item, that variable must first have a response
recorded in the data file.
<body style="font: 12pt arial; color: navy; background: #ccccff; margin: 0px">
<i>Strongly</i> Agree
</body>
Enter "label1.htm" for your button label and this is how it will appear:
See also
Questoinnaire (.que) Files > Labels 55 , especially for information regarding valid input
options and recoding response data
QuickInfo
By checking this field, data will be written to the data file. When the value is unchecked,
MediaLab will not write a value for this variable to the data file and will not include the
variable name in the data input file. See Data 70 for more details.
For item types like Instruction items that do not gather input data, the response "ok" is
written to the data file to confirm that the item was presented (i.e., as opposed to being
skipped). If this you do not to write data from these items for whatever reason (e.g.,
practice trials), simply uncheck the Write to Data File field for that item.
69
QuickInfo
When the Write as Text field is checked in the Details menu (see below), MediaLab will
write the data to the data file with quotes surrounding it. It will also indicate in the SPSS
input file that the variable format is text; otherwise, value formats are recorded as
numeric. Missing values for items with the Write as Text field checked will also be treated
as text format; otherwise missing data values will be recorded as numeric format.
Typically, this option is checked for item types like essay 44 , recall list 49 , and thought
listing 51 whose data are primarily text, but it can be used with other item types as well.
Also see the Data 70 section of the manual for more details.
QuickInfo
When the Reaction Time field is checked in the Details menu (see below), the response
time for the item will be written to the main data file. In the data input file which
MediaLab creates, a "t" will be appended to the beginning of that item name 56 in order
to create a new variable name for the response time. You can leave this field unchecked if
you have no interest in assessing the response time for a given item. Also see the Data
70 section of the manual for more details.
70 MediaLab v2014
Viewing Data
By default, data files are written to a Data subfolder located in the same folder as your
experiment (.exp) file. For example, if your experiment were c:\experiments\test\test.exp
then your data would be saved to c:\experiments\test\data\*. If this data subfolder does
not exist when you run a session, MediaLab will create it. The main data file will be given
the same name as the experiment file, but with different file extensions to indicate the
different formats (e.g., .txt for the SPSS text-formatted data, .sav for the native SPSS
data file and .csv for the comma-delimited text files). Data from essay items 44 and on-
line rating items 48 will also be located in the Data subfolder.
You can view these files by browsing through "My Computer" on your desktop to the
appropriate data folder. You can also select View Data from the Data menu in MediaLab--
this will allow you to view any data file (.txt, .csv, .sav) you select. Note that MediaLab
will use the default program your computer uses to view these file types.
ByQuestionnaire and ByVariablename and can be found in the Data subfolder of your
experiment. Here is the difference between the folders:
ByQuestionnaire
The ByQuestionnaire data folder organizes your data by questionnaire (hence the name).
Before writing the data, MediaLab alphabetically orders all of the questionnaires in the
experiment. MediaLab then writes all of the data for each variable in the first
questionnaire, the second questionnaire and so forth. If a subject did not receive a
particular questionnaire in their condition, then missing values are written. Thus, the final
data file lists variables sorted first by the alphaabetical order of the names of the
questionnaire files used and then by the order of the items as they were programmed
into the questionnaire file. This results in a constant data format no matter which
questionnaires a subject received and the order in which they were administered.
ByVariablename
In contrast, the ByVariablename data folder organizes your data by variable names.
Before writing the data, MediaLab goes through all of the questionnaires in your
experiment and alphabetically orders all of the variable names. It then proceeds to write
the data for all of the variables in this order—regardless of the questionnaire in which
they occurred. Remember that the variables will be in alphabetical order so q10 would
end up following q9; If you are using a naming system like that, you might want to use
q09 instead. Because the ByVariablename data files don't care about which questionnaire
asks the questions, the data for items with identical variable names will all be written to
the same column even if they are asked in different questionnaires. Thus, the final data
file lists all variables in alphabetical order of their item names, regardless of their
questionnaire file or order of presentation during an experiment session. This results in
an extremely easy way to analyze data from most experiments. It is also especially useful
when you want to include the same variable in different questionnaires for different
experimental conditions.
Advanced Hint
Some people strongly prefer using the .csv data format but get stuck when they have
more than 255 variables because they do not have Excel v2007 or later. If you try
opening your .csv file in Excel and get the "file not loaded completely" message, you can
deal with this by importing the file directly into SPSS. To do so, first rename the file from
.csv to .txt. Then, in SPSS, you can select
Predefined format? No
Delimited? Yes
Finish
If you have any trouble reading in the data, you can look at the data directly in any text
editor. If the file is especially large and difficult to read in its raw form, try a powerful free
text editor like PSPad from www.pspad.com.
See also
Data FAQ 72
Viewing Data 74
How do I get SAS and other data analysis packages to read the data?
Most stats package will have the capability to read the .csv file (this is the comma-
delimited file) in the data folder of your experiment directory and transform it into format
74 MediaLab v2014
compatible with itself. If not, have Excel read the .csv file and then have your stats
package read the Excel file. Some will require you to save the Excel file in an earlier
version (e.g., as an Excel 2003 worksheet).
How can I tell exactly when an item was presented—i.e., in real time?
By entering @ in the Parameter(s) field 59 for any item in a questionnaire, you can have
MediaLab write a timestamp at the onset of the item. When you do this, a timestamp will
be appended to a file called timestamps.csv in the data folder. It will include the subject
id, the variable name, the time at which the item *started* (e.g., 12:23:22), the
milliseconds elapsed from the beginning of the experiment and the milliseconds passed
since the last timestamp.
Note that the value can be text or numeric although numeric is recommended. If you use
text, make sure the Write as Text 69 option is checked for the item.
75
What is the Clear Data button for and can I disable it?
When you make changes to your experiment, you often change the structure of your
data. This can cause confusion in your data because one subject's data are always
appended to the last. Consequently, it is always a good idea to clear your data folder
after making changes to your study. If the existing data are important, then back them
up and merge them later 73 with the new data. If they are not important (e.g., they are
just test files) then you can click the Clear Data button when entering the subject and
condition IDs after selecting a file to run 9 :
This will delete everything in your data folder resulting in a clean start. Note that some
people get very nervous about having this button so accessible. If that's you, there is a
way to disable it—on the Preferences menu, simply click Disable Clear Data. Note that
MediaLab will attempt to send cleared data to the Windows Recycle Bin if the experiment
is stored locally (i.e., as opposed to on a network drive).
See Also
Data 70
7.1 Samples
2.Go to the Run 9 command in MediaLab and choose Select and Run Experiment.
3.Find the Samples folder located in the C:\MediaLab directory.
4.Double-click on the Sample1 folder, and then double-click on Sample1.exp. Note that
experiment files 20 are indicated by a green "building block" icon and that
questionnaire files 34 are indicated by a "paper and quill" icon.
5.Enter a Subject ID (e.g., 5), and press Enter.
6.Enter a 1 for the experimental Condition, and press Enter.
7.Follow the instructions as if you were a participant.
When the Experiment Editor opens, select Open from the File Menu and open
Sample1.exp.
You'll see that there are 2 conditions 25 . Everybody in condition 1 gets only one file—
selfesteem.que.
However, in condition 2 you see that these subjects will also get a PowerPoint Show (.pps)
file before they get the self-esteem questionnaire. In MediaLab experiments, you can
define as many conditions as you like, with each having as many files as you like. These
files can be the same ones in different orders, or they can be different files altogether.
That's all there is to this experiment.
78 MediaLab v2014
Close the experiment file by clicking OK. Then close the Experiment Editor. This will return
you to the main MediaLab window. Now run the experiment, enter a subject ID, but ask
for Condition 2 this time. After that...
4.5.
Now click Save 38 and OK to close the questionnaire.
Now we need to add your new questionnaire to the experiment file 20 . From the File
menu select Open and open the Sample1.exp experiment file.
Let's replace the selfesteem questionnaire in Condition 1 with your new questionnaire.
Simply double-click on selfesteem.que in Condition 1, Position 1. When the dialog box
opens, select you new questionnaire. See how it has replaced the old questionnaire?
Let's add another file to Condition 1 in addition to your questionnaire. In the first
available row of your experiment file and enter a value of 1 in the Condition 25 field. Enter
a value of 2 in the Position field. Double-click on the File Name 41 field and select an image
file on your hard drive (and jpg, bmp or gif file). To see the types of files you can add
here, click Files of Type when the dialog box opens. If you have Internet Explorer 4 or
later installed, you could also enter a web address (e.g., www.empirisoft.com) here or a
local HTML file. After selecting a file, click Sort, then Save and OK.
That's it. Close the Editor and return to the main MediaLab window. Choose Select and
Run Experiment 9 and run Sample1, Condition 1 again. Note that if you have made
changes that will affect your data files, you'll want to click the Clear Data button 75 to
delete the old data files and start fresh (after backing them up if there are data you want
to save).
That's the gist of MediaLab. Of course experiments can get much more elaborate than
this but the basic idea is always the same. The experiment file defines the files that will
be presented in each condition. These files can be pretty much anything including
MediaLab Questionnaire files which allow you to ask questions. For more detailed help,
be sure to check out the manual (MediaLabManual.pdf) contained in the MediaLab Help
folder and to use the OnLine Help by pressing F1 at any time. More samples are
contained in the Samples folder.
The first scale response you'll see is the standard format which uses just the point (p)
parameter 61 to indicate the number of scale points (see the Parameters field). This tells
MediaLab how many scale points you want. In this case, it's 6. Click Continue or press the
space bar to see the item. When the item appears, you can click Go Back 42 to see this
screen again or enter a response to continue.
you to skip a subject to any subsequent questionnaire item by entering the item name in
the Skip To field. Below, you can see the Details for the next three questions: rse10,
rse11 and rse12 (you may have to scroll down). To illustrate, say we want people who
disagree with rse10 to answer question rse11 and we want those who agree to rse10 to
answer question rse12. To do this we enter "rse12" in the Skip To field of the agree
responses in rse10. If the subject agrees to rse10, they will be skipped to rse12,
otherwise they will continue on to question rse11. Scroll down here to see the details of
rse11. See how the subject is unconditionally skipped to rse13? This ensures that they
will not get rse12 which was designed for those agreed to rse10. If that's confusing try
going back and forth using the Go Back button trying the different combinations to see
how it works. You'll see that depending on what you answer to rse10, you will get only
rse11 OR rse12. Instead of a single item, you could also have entire blocks of items
designed for a particular response.
The next scale item is the same as the first except we now add the width parameter 63 .
This tells MediaLab we want a horizontal scale and specifies that it should be 500 units
wide. See "Show Location Points" in the Help menu for the sizing scale that is used with
your display. MediaLab tries its best to use a resolution-independent display. Click
Continue, or press the space bar to see the item.
QuickInfo
The Preferences menu in the main MediaLab window provides a way to edit and save
default and alternative program options.
Two types of files can be created and edited here. The first is the MediaLab Preferences
File (.mlp) which contains font and colour combinations as well as a number of general
program options. The second is the MediaLab QuickStyle File (.mlq) which contains ONLY
font and colour information. Normally, you would have just one Preferences file (usually
default.mlp which is loaded automatically) and many QuickStyle files. This is because you
can only have one Preferences file loaded during an experiment, but you can apply
multiple QuickStyle files throughout your experiment by requesting them in your
questionnaires or experiment files. If you do not create or request any QuickStyle files
during your experiment, then the default fonts and colors in your Preferences file will be
used.
Preferences 83
Quick Styles 84
You can change the fonts and colors MediaLab uses during experimental sessions. Select
Edit Preferences > Font & Colors. You can set fonts and colors separately for windows that
display text provided by you and for windows that allow subject input.
recommended that you use a "Unique Machine Code" (see below) for each computer. This
3-letter identifier of each computer will be appended to all of its data files. This serves to
identify which data files came from which computer and also helps to prevent conflicts
that may occur from multiple computers attempting to write to the same files at the same
time (since each computer will write to its own unique files). These multiple files can be
easily merged later using the FileMerge utility provided in MediaLab's data menu 73 .
You can create, edit and save as many Preference files as you like.
Quickstyle (.mlq) files are just like Preference files (.mlp) except that they contain ONLY
font and color information. You can create many quickstyle files with various foreground
and background color combinations as well as font options. The benefit of quickstyle files
is that you can instruct MediaLab to apply a different quickstyle file at any time during the
experiment or in the middle of a questionnaire. In the parameter field of any experiment
or questionnaire item you can name a quick style file preceded by a $ which will cause
MediaLab to switch to that style. You are no longer limited to using a single set of color
and font options.
To create a quickstyle (.mlq) file, select QuickStyles from the Preferences menu. You can
then select a configuration of fonts and colors. Select SaveAs and save the quickstyle file
with a name of your choosing (e.g., mystyle1.mlq). You can either save it in the MediaLab
Styles folder so that all experiments can use it, or you can save it to your experiment
folder to make it available only to your current experiment.
Then, in your questionnaire or experiment files, enter the name of the style file preceded
by a $ in the Parameter(s) field 59 of any item, e.g., ($mystyle1). When MediaLab sees
this it will read the style file and apply it immediately. MediaLab will first look in your
experiment folder for the file (e.g., mystyle1.mlq). If it doesn't find it, it will look in the
MediaLab Styles folder. If it finds it, it will immediately apply that style to your running
experiment. You can have as many quickstyle files as you like and can apply them
however frequently you like. The currently applied style will remain in effect until you
request a different style file, or until ($off) is encountered in the parameter field of
another item.
Aside from added flexibility of formatting, this allows you to store color and font
information within your experiment folder so that it's always available. If for example, you
send someone your experiment folder, the formatting will remain the same so long as the
quick style files are included in the folder. This also means you no longer have to worry
about loading the correct Preferences file before each experiment because your
experiment takes care of this for you.
Note that you don't have to use quick style files at all. If you do not apply any quick style
files in your experiment, MediaLab will simply use the colors and fonts specified in the
Preferences file (e.g., default.mlp which is loaded automatically).
Foreign fonts
And copy them to "substitute.txt" where you can change them to anything you like:
87
If you were to do that, then these messages (103,104,106) would be used instead of
those contained in the message.txt file.
When you run the experiment, MediaLab checks to see if an autostart.txt file exists in the
same folder. If it does exist then it automatically runs the next subject ID and condition
on the list. If it doesn't then you will be prompted for the subject ID and condition as
usual.
MediaLab will mark the subject ID condition with a * so it knows where to start next time.
Following the session, MediaLab will ask if you want to run the next session--if you say
yes it automatically gets the next subject ID and condition from the list and runs it. This
way you can run sessions all day on multiple computers and never have to enter a
subject ID or condition. Note that you will probably want to create a unique list of subject
ID's and conditions for each computer to prevent redundancy!
Finally, an alternative way of using the AutoStart feature is to type "select subject" as
the first line in the autostart.txt file. If you do this, then MediaLab will prompt you only for
the subject ID. It will then look up the condition for that subject ID from the list and run it
automatically. This is useful if you want to have a constant autostart.txt file on all of your
computers and don't mind keeping track of which subjects still need to be run. It simply
eliminates the need to keep track of which conditions to assign.
88 MediaLab v2014
Using a substitute.txt 86 file, you can have a blank message ("") defined for the end of
session event. If MediaLab sees that you have no message and you are using an
autostart file, then it will proceed automatically with the next session without asking if
you want the next session run; it will simply start. Doing so requires ctrl-alt-delete when
you finally want to escape.
Overview
MediaLab allows you to create your own custom items using HTML. Using the Custom item
type, you can specify any web browser file (local or internet) in the Question Wording/File
Name field. If and when a post event occurs, MediaLab will save any submitted data that
you like and then continue on to the next item in the questionnaire. In order for a posted
variable to be saved with the regular data files, its variable name simply needs to match
that of the Custom item or any other item in the current experiment.
<form method="post">
questions and variable names for responses go here
</form>
The <form method="post"> tag tells the browser to keep track of any data that is
collected within the form and make it available for saving when the user clicks a button to
submit their responses. Although it can get more complicated, this is the gist of how most
questions are asked when you are surfing the internet.
For more information regarding HTML forms, see:
www.w3schools.com/html/html_forms.asp
Example
What is the mysterious code that goes between the <form> tags? This item below
presents a text box in which subjects can enter a response. When they click Continue,
MediaLab will check to see if any variables in the experiment are called textBox1. If so,
the response will be saved to the data files under that name. We can handle that easily
by assigning the variable name textBox1 to the Custom item itself when we list it in the
questionnaire.
<form method="post">
What is your answer?
<input name="textbox1">
<input type="submit" value="Continue">
</form>
How it looks in a browser:
90 MediaLab v2014
Try It!
To create your first custom item you can copy the code above (everything from <form> to
</form>) into a blank text file (e.g., via Notepad). Save it somewhere as myTextBox.htm.
Voila! You have just created a custom item! You can view it in Internet Explorer if you like
by double clicking on it.
To use it with MediaLab, open a questionnaire file and add an item--choosing Custom as
the item type, myTextBox.htm as the file name, and textBox1 as the variable name. That's
it! Try running the questionnaire and then view your data to see if the posted response
was written to your data file. Remember that if you have made changes that will affect
your data files, you'll want to click the Clear Data 75 button to delete the old data files
and start fresh (after backing them up if there are data you want to save).
Hint: You can see these samples already prepared in the C:\MediaLab\Samples\Sample 5
Custom Items folder.
MediaLab will not display the standard Continue button when a custom item is used.
Instead, it will wait until some data is posted via a submit button. In some cases though
you may not want this to happen automatically. An alternative is to use the password
parameter 61 . In this case the password can be a variable name, e.g., (xvarname). If you
do this, MediaLab will not proceed to the next item unless the password variable is
included in the post. This is especially handy if you want to make a multi-page custom
item with multiple postings.
See Also
Repeating Custom Items 91
91
Instead of adding the exact question wording to your custom item's HTML code, you can
simply say <ml.wording> and MediaLab will automatically substitute the question wording
from your questionnaire file. This means, each time you use your custom item in a
MediaLab questionnaire, you can enter different question wording the you would for any
other normal item. MediaLab will take it and put it into you HTML file for you!
Likewise, instead of using a specific variable name in the HTML form code, you can simply
specify <ml.varname>. This means you can now use the same custom item file with many
questions in the same questionnaire because each time, MediaLab will substitute the
current variable name into the HTML.
You can also substitute other values such as backgrounds, backsounds, backvideos,
fonts and colors from the current session and so forth without having to change your
item. For all the stuff that MediaLab can substitute into your HTML, see the variable
reference 94 table.
Note it is super supremely critical to use the <ml.varname> substitution if you are going
to be using the same custom item file over and over again in the same experiment.
Otherwise, the posted variable name will be always be the same and so the response
will always be written to the same variable in the data file. All of the other substitutions
can provide for some handy tricks but they are never necessary.
<form method="post">
<ml.wording>
<input name="<ml.varname>">
<input type="submit" value="Continue"">
</form>
Create three Custom items in your questionnaire and assign them variable names such
as ques1, ques2, and ques3. For each, enter the same custom item file: myTextBox3.htm
for the file name. As you do this, create a different question wording for each one (e.g.,
What is your favorite food? What is your favorite animal? What is your favorite movie?). Now
run the questionnaire and see what happens. You should find that each time you request
it, MediaLab will display it with the appropriate wording from the questionnaire and will
save the data from the item using the appropriate variable name.
92 MediaLab v2014
See Also
Custom Items, Overview 88
Single Vs. Multiple Variables 92
Variable Reference 94
Samples 97
<form method="post">
<table>
<tr><td> What is your: </td></tr>
<tr><td> Name? </td><td> <input name="name"></td></tr>
<tr><td> Age? </td><td> <input name="age"></td></tr>
<tr><td> Sex? </td><td> <input name="sex"></td></tr>
<tr><td> Ethnicity? </td><td> <input name="ethnicity"></td></tr>
<tr><td> Marital Status? </td><td> <input name="marital"></td></
tr>
<tr><td> <br><input type="submit" value="Continue"></td></tr>
</table>
</form>
How it looks in a browser:
94 MediaLab v2014
See Also
Custom Items, Overview 88
Repeating Custom Items 91
Variable Reference 94
Samples 97
Variable Reference
The following variables can be placed in the HTML of any custom item. MediaLab will
substitute the appropriate values in the HTML code before it is displayed. This is a
convenient way to substitute information from the current MediaLab item without having
to alter the HTML code. Such substitutions could include color and font information,
response options, question wording, background images, parameters, and so forth.
Note that you can also substitute calculated values from a responses.xls file 101 by placing
the variable name in angular brackets. For example, if you had a calculated value named
"total" in your responses.xls file, you could enter <total> in your HTML file and MediaLab
would substitute the correct value at the time the HTML is displayed.
from
responses.xls if
applicable.
<ml.color> Main area text <ml.h> height
color. Will have
prefix "#" e.g.,
#CCCCFF
<ml.bgcolor> Main area <ml.k> key
background
color. Will have
prefix "#" e.g.,
#CCCCFF
<ml.font> Main area font <ml.l> left position
name, e.g., arial
<ml.fontsize> Main area font <ml.m> mask
size. Will have
"pt" appended,
e.g., 16pt.
<ml.color2> Input area text <ml.n> number of
color. Will have thoughts to
prefix "#" e.g., take
#CCCCFF
<ml.bgcolor2> Input area <ml.o> question
background wording onset
color. Will have
prefix "#" e.g.,
#CCCCFF
<ml.font2> Input area font <ml.p> number of scale
name, e.g., arial points (1-12)
<ml.fontsize> Input area font <ml.q> target question
size. Will have for thought
"pt" appended, rating
e.g., 16pt.
<ml.bg> BackGround. <ml.r> range
Append
parameters if
desired: .t, .l, .h
, .w, e.g.,
<ml.bg.w>
<ml.bs> BackSound <ml.s> spacing
<ml.bv> BackVideo. <ml.t> top position
Append
parameters if
desired: .t, .l, .h
, .w, e.g.,
<ml.bg.w>
<ml.textx> Text Label (1- <ml.ttl> send ttl signal
12). Replace x
with option
number, e.g.,
<ml.text7>
96 MediaLab v2014
All of the variables above may be directly substituted into your HTML file. For example, if
the question wording in you HTML were: "Please choose from one of the <ml.p>
alternatives" and you had used the parameter (p5), the question wording would appear
as "Please choose from one of the 5 alternatives."
The code to display an image in HTML may look like this:
<img src="mypic.jpg">
Instead of having this be a fixed image, you could have your custom item pull up a
different picture every time by placing an image in the background field in the
questionnaire. Then, in your HTML you could specify:
<img src="<ml.bg>">
Voila--a different picture every time--whatever you have put in the BackGround field!
<form method="post">
<img src="mypic.jpg"><br>
some wording here
<input name="varname">
<input type="submit" value="Continue"">
</form>
97
<!--ml.subs
ml.sub "question wording" = <ml.wording>
ml.sub "varname" = <ml.varname>
ml.sub "mypic.jpg" = <ml.bg>
-->
See Also
Custom Items, Overview 88
Repeating Custom Items 91
Single Vs. Multiple Variables 92
Samples 97
9.4 Samples
Some Custom Sample Code
Examples of custom items and various code snippets can be found throughout the forums
at www.empirisoft.com/support
The following examples of HTML form code are taken from www.w3schools.com/html/
html_forms.asp
Text Fields
Text fields are used when you want the user to type letters, numbers, etc. in a form.
<form>
First name: <input type="text" name="firstname"><br>
Last name: <input type="text" name="lastname">
</form>
How it looks in a browser:
Note that the form itself is not visible. Also note that in most browsers, the width of the
text field is 20 characters by default.
Radio Buttons
Radio Buttons are used when you want the user to select one of a limited number of
choices.
<form>
<input type="radio" name="sex" value="male"> Male <br>
<input type="radio" name="sex" value="female"> Female
</form>
98 MediaLab v2014
Checkboxes
Checkboxes are used when you want the user to select one or more options of a limited
number of choices.
<form>
<input type="checkbox" name="bike">I have a bike <br>
<input type="checkbox" name="car">I have a car
</form>
How it looks in a browser:
<form method="post">
Username: <input type="text" name="user">
<input type="submit" value="submit">
</form>
If you type some characters in the text field above, and click the "Submit" button, you will
make the text data available to MediaLab for the variable User.
Overview
This section will show you how to accomplish three advanced functions with MediaLab:
Calculate scores and other variables while a session is running. Present these
calculated values on screen as stimuli or feedback, use them in skip patterns, or in
post-session reports.
Execute complex skip patterns. Base skips on any prior response, or even combinations
of prior responses and calculated variables.
Create and optionally print summary reports immediately following the experimental
session. Create graphs, scale scores, or anything else you want based on raw and/or
summarized data.
Sample
Before we look into the technical details of accomplishing these advanced functions, let's
run a quick sample that demonstrates all three. Note that to take advantage of the
functions described in this section, you will need to have Microsoft Excel installed on your
system—both to design and to run the sessions. Also, because these are considered
advanced features, we're going to presume you have some basic familiarity with
MediaLab.
From the samples folder, run Condition 1 of the following experiment:
We have also been able to calculate your average response time and tell you if you've
been fast or slow. On the following screen we continue by asking a question about your
membership in a racial minority or majority—based on how you responded to the race
question earlier in the questionnaire.
What happens next will depend on how you scored on the self-esteem test. You can try
this a couple times to see for yourself. If you scored moderately (2, 3, or 4), then you will
be at the end of the session. If you scored very high (greater than 4) then you will be at
a screen representing where a social desirability scale might be administered. If you
scored very low (less than 2) then you will be at a screen representing where a
depression inventory might be administered.
When you're done, go to the experiment's data folder. In here, you'll find a folder called
"reports". Inside the reports folder is a file called 1.xls (this will be different if you used
another subject ID). Open this file by double-clicking on it. First you'll see many of the
responses you gave to the questionnaire. Click on the tab at the bottom left that says
"sheet 2". Here you'll find a custom report for the session that displays your name, age
and self-esteem score. It presents a graphic that is based on your self-esteem score and
also displays a graph of the individual response times for each question. This report is
completely customizable and can be created automatically for each subject—with any raw
100 MediaLab v2014
or summary data you like, and formatted in any way you like.
=AVERAGE(B4,B5,B7,B9,B10)
This is an Excel calculation formula. We're telling Excel that we want the value here to
equal the average of the cells listed in parentheses. If you look at what's in those cells,
you'll see that it's the subject's responses to rse1, rse2, rse4, rse6, and rse7. These
happen to be the positively scored self-esteem items such as "I feel that I have a number
of good qualities."
Now let's look at rse (negative scored) . You'll see that this cell contains:
=7-AVERAGE(B6,B8,B11,B12,B13)
101
Here we're averaging the reverse scored items (e.g., "I am inclined to feel that I am a
failure.") and then subtracting that value from 7 to recode it such that higher numbers
reflect higher self-esteem.
=AVERAGE(B27,B28)
We see that the final calculated self-esteem score is an average of the two sub-scores
above. Now we have a calculated variable rse that is the subject's overall self-esteem
score.
=IF(B29>3,"high","low")
Using Excel's language for conditional logic, here we're saying that if the subject's
calculated self-esteem is greater than 3, then they're "high" and that otherwise, they're
"low". Calculating and presenting the subject's average response time, whether it is
considered "slow" or "fast" are additional examples of the same idea—calculating new
variables from gathered data and using those values in the same session.
Let's take the fill-in-the-blank age question for example. Currently, there is no skipto
value. What would happen if we typed "debrief" into the skipto column for that item?
When the age item came up in the MediaLab session, MediaLab would see that age is
listed in the responses.xls file. It would see the skipto value of debrief and send the
subject to the last item in the questionnaire because it is named debrief. If you have used
MediaLab's skipto function in the past, this is pretty standard stuff.
Where it gets interesting is in the fact that you can now use the responses.xls file to
calculate skipto values. Instead of placing a static value in the skipto column, we can
compute a variable based on what's been happening in the experiment. Let's say that
we want to use the subject's self-esteem score to determine what happens next. If they
scored extremely high, we want to administer a scale which measures socially desirable
responding. If they scored extremely low then we want to administer a depression
inventory. If they scored in the normal range, we'll skip them to the end of the session.
Take a look at how we do this by checking out the formula in C26, that is the skipto value
of the essay item, ess1:
=IF(B29<2,"dep",IF(B29>4,"sdes","debrief"))
In this formula, you can see three items from the questionnaire file—dep, sdes, and
debrief. These are our three skipto candidates. The conditional logic of Excel is applied to
say: "If self-esteem is < 2 then dep otherwise if self-esteem is > 4 then sdes, otherwise
debrief."
values are updated on the main sheet—so are the fields and figures in the report. When
the session is over, the report is saved for easy access to these summary data. Take a
look at "sheet2" of data\reports\1.xls as an example.
Notice that on the main page of responses.xls there are two lines that read:
print.sheet1 no
print.sheet2 no
You can add these optional lines to any responses.xls file. If listed with "yes" in the value
column, they instruct MediaLab to send the listed worksheet(s) directly to your default
printer. This is handy, for example, if you want a report on "sheet2" to print automatically
so that you might discuss the results with the participant.
10.4 Tips
You can include as many or as few experimental variables as you like; you don't need
to list every variable from your questionnaire files in the responses.xls file. Feel free to
include only those that you need for your calculations.
A complete discussion of Excel's logic and math functions is way out of the scope if this
tutorial. If you've never done calculations in Excel this might seem a bit intimidating at
first, but it's really not too bad (honest!). The trick is getting an understanding of how
to nest multiple conditions within a single calculation. Grab a pot of coffee and go
through Excel's help on this for an hour or so and you'll get it.
To access the relevant help on constructing calculations and conditional statements,
press F1 in Excel. Using the Answer Wizard or the Index, look up terms like If, And, Or,
Logical Functions, Functions Listed by Category.
When including experiment variables in the responses.xls file, you can include ANY
variable from ANY questionnaire in your experiment—everything goes into the
responses.xls file, which is placed in your experiment folder.
Variable names used for experiment variables need to match the variable names used
in the MediaLab data files. This is important to remember for items that record multiple
values. For example, let's say you have a multiple response question called MR1 that
has five response options. Normally, there won't be a variable in your data file called
MR1. Since there are five responses written, they will be called MR1_01, MR1_02,
MR1_03 and so forth. This applies also to thought listing items and ranking items. If in
doubt, you can always check one of your data files to see how the variable names are
written.
104 MediaLab v2014
responses.xls files should not have any empty rows on the main page
MediaLab executes skips by skipping over items until the desired item is found. This
means that if you tell MediaLab to skip to a variable that doesn't exist then the session
will end.
Using a responses.xls file will have no impact on your primary data files—i.e., calculated
variables are just for use during the experiment and are saved only in the post-session
report (i.e., in the reports folder see above).
In addition to saving a copy of the responses.xls file under the subject's ID in the data
\reports folder, MediaLab will also save a copy as !currentsession.xls in the same
folder. This is a temporary file reflecting the responses of the most recent participant in
the experiment.
Currently the MediaLab GoBack function is disabled if calculated skips are involved..
QuickInfo
Here are a few miscellaneous tips that don't easily fit elsewhere in this guide.
Absolute Paths
If the file you are presenting exists anywhere outside of the experiment folder then you
will have to specify an absolute file path. An absolute file path is the exact location of the
105
file (e.g., c:\mypictures\myimage.bmp). You can find the absolute pathway of a file by
right-clicking it and selecting Properties. Next to the word "Location:" in the General tab
of the window that opens, you will find the absolute pathway with everything except the
file name at the end. Simply copy the entire pathway next to the word "Location:" paste
it where you need it, and be sure to add "\your file name here" (without the quotation
marks) to the end of the pathway you copied.
Remember, if the file is not in the same directory as the experiment or it's not in a
subfolder in the experiment file folder, then you must specify the complete path of the
file. Make sure that any absolute file paths you use will still be valid if you copy your
experiment to another computer.
Relativ e Paths
If the file is located in the same folder as your experiment file, then you can simply enter
just the name of the file (e.g., myimage.bmp). If the file is located in a subfolder that is
located in the same folder as your experiment files, then you can enter the name of the
subfolder followed by the name of the file (e.g., images\myimage.bmp). You can use a
relative path for ANY file located anywhere within your main experiment folder.
The advantage of placing the file in the experiment directory (or a subfolder) is that the
experiment folder can then be moved to a different place and you won't have to worry
about checking path names (e.g., c:\..., d:\..., etc.). You could copy your experiment folder
to any location on any drive and all of the relative paths would still be valid.
Hint
You can specify relative or absolute file paths to be the default when selecting files in the
Experiment Editor. You can set your preferred default in the Options menu 15 . It is
recommended to set this option to Use Relative Paths. This is because the only time an
absolute path is necessary is when the desired file is not located somewhere within the
experiment folder. However, even if you are using relative paths, the editor will enter an
absolute path if this is the case.
screen resolution. How you can combat this is to use the special width parameters 63
provided especially for movies. For example, (w-1) will play the movie at full screen, (w-2)
will play it half screen, (w-3) at a quarter and there are others.
Note also that although the scale applies to images, that this is only true if you explictly
define the size of the image (using the height and width parameters). Otherwise the
image will appear as it's default size. For example a 300 pixel wide image will appear
smaller when you use higher screen resolutions. However if you explicitly define the size
using the height and width parameters then it will appear according to the MediaLab
scaling system. You can find more information about this in the following sections of the
manual:
The most common resolutions are 640x480, 800x600, and 1024x768. The first number
tells you the number of pixels that are displayed across your screen, and the second
number tells you the number that are displayed down your screen. You can determine
and/or set the resolution of your display by right clicking on your desktop and selecting
Properties > Display. MediaLab tries to use a resolution-independent scale so that your
experiments will look the same no matter what resolution you run in. Some differences
can not be avoided however. To see what the scale is on your particular system, choose
Show Location Points from the Help menu in MediaLab.
By right clicking on your desktop and choosing Settings you can see if your system is set
to use large or small fonts. In 640x480 mode, only small fonts are available. At greater
resolutions, you may optionally choose large fonts. This impacts on window sizes as well.
Larger fonts result in larger windows. In our testing, MediaLab has worked well in most
resolutions with both large and small fonts.
You should not modify the first or third line. The second line represents the values of the
variables listed on the first line. You can change any of these as necessary. The
remaining lines tell MediaLab how to map incoming signals to response keys. On each line
you can list a pair where the first value is the signal sent to the serial port (i.e., 1-255)
and the second value is the response it should map on to (i.e., 1 to 12). In the example
above, if MediaLab detects a "1" coming through the serial port, it will react as though
the 1 or F1 key had just been pressed.
{
Hello World
This is data for MediaLab
}
The comdata.txt file will contain the data
Hello World
This is data for MediaLab
This function requires that you create a file called comdata.txt and place it in your
experiment folder. If MediaLab sees this file, it will automatically watch for and save any
serial data that is surrounded in { } brackets. In order for MediaLab to use the proper
serial port settings, you should also include a comport.txt file as described above. If you
do not want any key mappings, it could simply look like this:
If you are using a comport.txt file, you can also send a string of data to the serial port by
adding the string as a parameter value for any given questionnaire item. The string
should be enclosed within braces-{}- and angular brackets-<>- like this:
<{112340}> or <{RED}>
When included in the parameters for a 5pt scale response, for example, your parameters
field might look like this:
(p5,<{SCALE1}>)
In this example, so long as you have a valid comport.txt file in your experiment folder (see
above), then MediaLab would send "SCALE1" to the appropriate port at the onset of this
scale response item. Again, if you do not want any key mappings, comport.txt could
simply look like this:
109
See Also:
Receiving Responses Via TTL Signals 62
Receiving Response Via Serial Port 55
Does the same thing happen with any of the files that come with MediaLab in the
Samples folder or is it specific to a single file that you've created (see above)?
What version of MediaLab (e.g., ver20xx.x.xxx) are you using? You can find this by
clicking "About" on the Help menu. What version of Windows are you using? Have you
tried making sure that no other programs are running at the same time that might be
causing some kind of interference?
110 MediaLab v2014
Note that the samples that come with MediaLab should always run fine. If they don't, you
may have a system problem. In this case, the first thing to try is usually making sure you
have the latest version of MediaLab.
One thing we can do is look over your system diagnostics and see if there are any
obvious problems that could be corrected. If you want to try that, here is how you do it:
Type "dxdiag" from the "Run" command on the Windows "Start" menu. You will get a
complete diagnostic description of your system. If you then click "Save All Information"
and send the resulting file to us, we'll take a look at it and see if we can see anything
problematic. You can also check for some obvious problems here yourself--the display tab
in particular may indicate you could benefit from a driver update or other action.
111
CD-ROM Experiments, 9 E
Clear Data, 75, 84
Essay, 44
Codes, License, 4
Data 74
Colours, 83
Parameters 57
Command Line, c Parameter, 31, 57
Excel, 70, 73
ComPort Data, 107
Executable, 44
Copying and Pasting in Editor, 17
Parameters, .exp 31
CSV Data Files, 70, 73
Parameters, .que 57
Custom Items, 43
Creating 88 Experiment Editor, 11, 17
Edit Menu 14
Data 76
Editing Tips 17
D File Menu 12
Options 15
Data, Printing 16
Access MDB file 75 Windows 15
ByQuestionnaire 70 Experiment Files, 6, 20
ByVariablename 70 BackGround 27
Clear Data 75, 84 BackSound 28
CSV 70, 73 BackVideo 28
Custom Items 76 Editing 20
SPSS, 73
Syntax and Data 70 Z
Variable Names 56
Zip Files, 76
Support, 109
Supporting Applications, 84
System Requirements, 4
System Settings, 4
WebTracker, 52
Width, w Parameter, .que, 63
Word Document,
Experiment File 26
On-the-fly Editing 83
Parameters, .exp 31
Parameters, .que 57
Questionnaire Item 52
Write Data as Text, 69
Write Reaction Time, 69