Working with Variables
What are Variables?
In Labvanced, variables are containers used to store and manage data during an experiment. They’re 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.
These 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 time)
- String (words or sentences)
- Categorical (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, creating variables helps you keep your experiment organized and ensures that all the important data is recorded and stored correctly and can be used later for analysis.
Section Summary: Concept of variables & why they matter?
🧠 What is a variable?
A variable is a named box where you store information that your experiment can use later.
For example:
score→ stores how many correct answers a participant haswordShown→ stores the word displayed on screenresponseTime→ stores how fast someone responded
🎯 Why variables matter
Variables let you:
- Save participant responses
- Keep track of things like score or progress
- Control what happens next in your experiment
👉 Without variables, your experiment can’t “remember” anything!!!