Introduction to Variables
Every experiment built in Labvanced relies on variables. They are the mechanism through which the platform stores participant responses, tracks timing, drives event logic, and adapts what participants see at runtime. Without variables, an experiment cannot record anything, make any decisions, or respond to participant behavior. Understanding how variables work is the foundation for everything else in Labvanced.
What Are Variables?
In Labvanced, variables are containers used to store and manage data during an experiment. They are fundamental for controlling logic, recording responses, and adapting what participants see. Think of variables like labeled boxes where you can keep different kinds of data.
Variables can hold things like:
- Participant responses (e.g., answers or button clicks)
- Details about what is shown in the experiment (stimuli)
- Automatically recorded data (e.g., reaction times)
- Calculated values based on other data
Each variable has a type, which tells Labvanced what kind of data it will store. For example:
Numeric: numbers like reaction timeString: words or sentencesCategorical: predefined groups, like "correct" or "incorrect"Boolean: true/false values
Variables can also exist at different levels of your experiment:
- Trial-level: specific to a single trial
- Block-level: shared across a group of trials
- Participant-level: applies to the whole participant
In short, variables are how your experiment remembers anything. Without them, no data is stored, no logic runs, and no adaptive behavior is possible.
Further reading
Creating Variables
The four ways to create a variable in Labvanced, with step-by-step instructions for each method.
Variable Types
A reference for all six variable types: system, factor, object, custom, array, and data frame.
Variable Properties
A full reference for every variable setting: data type, scale, format, start value, reset behavior, and recording options.