labvanced logoLabVanced
Contact
    • Remote Physiological Measurements
    • Eye Tracking
    • Head & Face-Tracking
    • Emotion Detection
    • Heart Rate Detection (rPPG)
    • Generative AI
    • Audio Transcription
    • EEG & Hardware Integrations
    • Decision Making
    • Reaction Times
    • Keyboard Inputs
    • Mouse Tracking
    • Mobile / Touch
    • Questionnaires
    • Gamepad / Joystick Integration
    • Audio Recordings
    • Audio Transcription
    • Video Recordings
    • Screen Recordings
    • Photos / Snapshots
    • Video Conferencing
    • Canvas Drawings
    • Build with AI
    • Build with Spreadsheets
    • Using the Experiment Editor
    • Coding
    • Creating Questionnaires
    • Balancing & Randomization
    • UX & Website Testing
    • Single Session Studies
    • Factorial Designs
    • Longitudinal & Multi-session Studies
    • Individual & Case Studies
    • Real-time Multi-user Studies
    • Interviews & Video Calls
    • Surveys & Questionnaires
    • Experience Sampling & Diaries
    • Classroom & Group Testing
    • Interventions & Clinical Trials
    • In the Browser
    • Mobile App
    • Desktop App
    • WebBridge Chrome Extension
    • Stroop Test
    • Flanker Task
    • N-back Task
    • Implicit Association Test
    • Trail Making Test
    • Digit Span
    • Corsi Block Tapping
    • Tower of London
    • Balloon Analog Risk Task
    • Preferential Looking
    • Browse more →
    • DASS-21
    • GAD-7
    • Rosenberg Self-Esteem Scale
    • PHQ-9
    • Ten-Item Personality Inventory
    • Big Five Personality Test
    • Adult ADHD Self-Report Scale
    • Browse more →
    • Building a Multi-user Study
    • Webcam Eye Tracking with AOIs
    • Website Frame Eye Tracking
    • Conditional Eye Tracking Opt-in
    • ChatGPT Study
    • Desktop App Study with EEG
    • Between-subjects Group Balancing
    • Building a Reading Study
    • Stroop Task
    • Lexical Decision Task
    • Browse more →
    Public Experiment Library
    • Arts Research
    • Clinical Psychology & Neuropsychology Medicine
    • Cognitive Psychology
    • Developmental Psychology
    • Behavioral Economics & Decision Science
    • Educational Research & Psychology
    • HCI & Human Factors
    • Linguistics & Language Sciences
    • Consumer & Marketing Research
    • Social & Personality Psychology
    • Sport & Movement Science
    • UX & Website Testing
    • Executive Functions
    • Language & Reading
    • Decision-Making & Reasoning
    • Attention
    • Overview
    • HCI & Human Factors
    • UX & Website Testing
    • Consumer & Marketing Research
    • White-Label App
    • PageGazer
    • Webcam vs. Lab Eye Tracking in InfantsAnna Banki & Gabriela Markova
    • Eye Tracking for Influencer MarketingDr. Alexander Edeling
    • Eye Tracking Infant Word ComprehensionDr. Giulia Calignano
    • Sentence Reading and Grammar JudgmentsDr. Jonathan Mirault
    • Regulating Emotions with MusicDr. Katrin Starcke
    • Game-Based Grammar Learning in ChildrenDr. Mireia Marimon
    • Gaze Cueing and AutismMax Soares Miehstein
    • Personality and Hearing in NoiseDr. Malte Wöstmann
    • All interviews →
    • Lab Notes
    • How to Cite Labvanced
    • Labvanced Platform Paper (2017)
    • Webcam Eye Tracking Validation (2024)
    • Webcam Eye Tracking Studies
    • Cognitive Psychology Studies
    • Developmental Psychology Studies
    • Linguistics Studies
    • See all publications →
    • Getting Started
    • Guide
    • Video Tutorials
    • Walkthroughs
    • Live Chat
    • Webinars & Onboarding Calls
    • AI Assistant
    • FAQ
    • Importing Templates Guide
    • Test Templates
    • Live Eye Tracking Metrics
    • Mouse Tracking Demo
    • ChatGPT Demo
    • Audio Recording Object Demo
    • Adding Image Stimuli Demo
    • Score & Feedback Demo
    • Browse all technical demos →
    • Timing Precision
    • Stimuli Presentation
    • Headphone Checks
    • Bot Checks
    • Participant Management
    • Comparisons
    • Research Blog
    • Prolific Integration
    • CloudResearch Integration
    • Sona Systems Integration
    • BeSample Integration
    • Panelabs Integration
    • Clickworker Integration
    • Labvanced Webhook API
    • Labvanced REST API
    • About Us
    • Newsletter Archive
    • Terms & Conditions
    • Data Security & Data Privacy
    • Technical & Organisational Measures
    • Accessibility
    • W-8BEN-E Form
    • Data Processing Agreement Template
    LinkedInYouTubeDiscord
    • Individual
    • Lab
    • Department / Consortium
    • Teaching
    • Campus
    • Commercial
    • Browse recording top-ups →
    • Browse AI token top-ups →
    • Overview
    • Study Building
    • Subject Recruitment
    • Dedicated Support
    Checkout
  • Contact
    • ZH
      • 中國人
      • Deutsch
      • Français
      • Español
      • English
      • 日本語
    • Logout
    • Loginlogin icon
    Platform
    Labvanced makes it easy to implement the most advanced study design and reliably collect your data.
    Biosignals & AI
    Remote Physiological MeasurementsEye TrackingHead & Face-TrackingEmotion DetectionHeart Rate Detection (rPPG)Generative AIAudio TranscriptionEEG & Hardware Integrations
    Behavioral Recordings
    Decision MakingReaction TimesKeyboard InputsMouse TrackingMobile / TouchQuestionnairesGamepad / Joystick Integration
    Media Recordings
    Audio RecordingsAudio TranscriptionVideo RecordingsScreen RecordingsPhotos / SnapshotsVideo ConferencingCanvas Drawings
    Implementation Techniques
    Build with AIBuild with SpreadsheetsUsing the Experiment EditorCodingCreating QuestionnairesBalancing & RandomizationUX & Website Testing
    Study Formats

    Your study can take whatever format your research needs. Here are a few popular examples.

    Single Session StudiesFactorial DesignsLongitudinal & Multi-session StudiesIndividual & Case StudiesReal-time Multi-user StudiesInterviews & Video CallsSurveys & QuestionnairesExperience Sampling & DiariesClassroom & Group TestingInterventions & Clinical Trials
    Where Studies Run

    Run your study online in the browser, on mobile or tablet with the mobile app, or in-lab with the desktop app.

    In the BrowserMobile AppDesktop AppWebBridge Chrome Extension
    Tests
    Explore cognitive tests, questionnaires, walkthroughs, and our public experiment library: a starting point for your next study.
    Popular Cognitive Tests
    Stroop TestFlanker TaskN-back TaskImplicit Association TestTrail Making TestDigit SpanCorsi Block TappingTower of LondonBalloon Analog Risk TaskPreferential Looking
    Browse more →
    Questionnaires & Scales
    DASS-21GAD-7Rosenberg Self-Esteem ScalePHQ-9Ten-Item Personality InventoryBig Five Personality TestAdult ADHD Self-Report Scale
    Browse more →
    Public Experiment Library

    Take a look at what other researchers in the community are doing through our extensive, open catalog of shared studies.

    Open the public library →
    Walkthroughs

    Step-by-step builds of complete studies, from a blank project to a running experiment, that you can follow along or adapt.

    Building a Multi-user StudyWebcam Eye Tracking with AOIsWebsite Frame Eye TrackingConditional Eye Tracking Opt-inChatGPT StudyDesktop App Study with EEGBetween-subjects Group BalancingBuilding a Reading StudyStroop TaskLexical Decision Task
    Browse more →
    Research
    One platform for students, academics, and industry researchers studying human behavior.
    Harvard UniversityStanford UniversityCambridge UniversityUCLNYUMax Planck InstituteUCLATU Munich

    Trusted by researchers at 1,500+ universities worldwide

    Academic Research
    Arts ResearchClinical Psychology & Neuropsychology MedicineCognitive PsychologyDevelopmental PsychologyBehavioral Economics & Decision ScienceEducational Research & PsychologyHCI & Human FactorsLinguistics & Language SciencesConsumer & Marketing ResearchSocial & Personality PsychologySport & Movement ScienceUX & Website Testing
    Research Areas
    Executive FunctionsLanguage & ReadingDecision-Making & ReasoningAttention
    Industry / Commercial
    OverviewHCI & Human FactorsUX & Website TestingConsumer & Marketing ResearchWhite-Label AppPageGazer
    Researcher Interviews

    Conversations with researchers about the studies they ran with Labvanced, what worked, and what they learned.

    Webcam vs. Lab Eye Tracking in InfantsAnna Banki & Gabriela MarkovaEye Tracking for Influencer MarketingDr. Alexander EdelingEye Tracking Infant Word ComprehensionDr. Giulia CalignanoSentence Reading and Grammar JudgmentsDr. Jonathan MiraultRegulating Emotions with MusicDr. Katrin StarckeGame-Based Grammar Learning in ChildrenDr. Mireia MarimonGaze Cueing and AutismMax Soares MiehsteinPersonality and Hearing in NoiseDr. Malte Wöstmann
    All interviews →
    Our Research
    Lab NotesHow to Cite Labvanced
    Peer Reviewed Studies

    A selection of peer-reviewed work built on Labvanced: our own platform and validation papers, and studies by the research community grouped by area. Hundreds more are listed on the full publications page.

    Labvanced Platform Paper (2017)Webcam Eye Tracking Validation (2024)Webcam Eye Tracking StudiesCognitive Psychology StudiesDevelopmental Psychology StudiesLinguistics Studies
    See all publications →
    Resources
    Valuable resources to help you learn the platform, stay updated, and more.
    Documentation
    Getting StartedGuideVideo TutorialsWalkthroughs
    Support
    Live ChatWebinars & Onboarding CallsAI AssistantFAQ
    Templates & Demos

    These are a few popular examples. Browse our guide and a selection of technical demos to get started with implementation.

    Importing Templates GuideTest TemplatesLive Eye Tracking MetricsMouse Tracking DemoChatGPT DemoAudio Recording Object DemoAdding Image Stimuli DemoScore & Feedback Demo
    Browse all technical demos →
    Methodology
    Timing PrecisionStimuli PresentationHeadphone ChecksBot ChecksParticipant ManagementComparisonsResearch Blog
    Integrations & APIs
    Prolific IntegrationCloudResearch IntegrationSona Systems IntegrationBeSample IntegrationPanelabs IntegrationClickworker IntegrationLabvanced Webhook APILabvanced REST API
    Company & Legal
    About UsNewsletter ArchiveTerms & ConditionsData Security & Data PrivacyTechnical & Organisational MeasuresAccessibilityW-8BEN-E FormData Processing Agreement Template
    LinkedInYouTubeDiscord
    Pricing
    Our licenses and additional services at a glance.
    Licenses
    IndividualLabDepartment / ConsortiumTeachingCampusCommercial
    Top-Ups

    Need more recordings for your lab or your own research? Simply use one of these recording top-up packages.

    Browse recording top-ups →

    Need more AI tokens for the AI assistant and study translations? Simply use one of these AI token top-up packages.

    Browse AI token top-ups →
    Additional Services

    Hire Labvanced’s expert team to quickly bring your project to the level of rigor it needs.

    OverviewStudy BuildingSubject RecruitmentDedicated Support
    Checkout

    Ready to purchase a license or top-up? Head straight to checkout.

    Go to checkout →
    • 中國人
    • Deutsch
    • Français
    • Español
    • English
    • 日本語
    • 入门
    • 指南
      • 入门

        • 任务编辑器
        • 框架
          • 画布框架
          • 页面框架
          • 网站框架
          • 覆盖层与对话框 | Labvanced
        • 试验时间线
        • 刺激呈现
        • 反应的正确性
        • 对象
        • 事件
        • 变量
        • 任务向导
        • AI助手
        • 试验系统
        • 实验设计
          • 创建研究
          • 在 Labvanced 中导入模板
          • 数据框模式
          • 多用户实验设计
          • 纵向实验设计
      • 特色主题

        • 随机化与平衡
        • 眼动追踪
          • 在眼动追踪任务中呈现刺激
          • 如何选择眼动追踪校准设置
          • 在任务中设置眼动追踪
          • 记录和导出注视数据
          • 使用形状作为兴趣区域 (AOI) 进行眼动跟踪
          • 参与者校准体验
        • 网络桥接
          • 选择网站 AOI | 锚点、调整和验证 AOI 跟踪
          • 在网站区域(AOI)上跟踪鼠标行为 | Web Bridge指南
        • 问卷
        • 桌面应用
        • 示例研究
        • 参与者招募
        • API访问
          • REST API
          • Webhook API
          • WebSocket API
        • 其他主题

          • 精确的刺激时间
          • 多用户研究
          • 头部追踪在 Labvanced 中 | 指南
      • 主应用标签

        • 概览:主标签
        • 仪表板
        • 我的研究
        • 共享研究
        • 我的文件
        • 实验库
        • 我的账户
        • 许可证与服务
      • 研究标签

        • 概览:研究特定标签
        • 研究设计
          • 任务
          • 区块
          • 会话
          • 组
        • 任务编辑器
          • 任务控制
          • 试验系统
          • 框架类型
          • 对象
          • 对象属性表
          • 变量
          • 系统变量表
          • 事件系统
          • 文本编辑器功能
          • 任务编辑器中的眼动追踪选项
          • 任务中的头部追踪
          • 多用户研究
        • 设置
        • 变量
        • 媒体
        • 文本与翻译
        • 启动与参与
        • 受试者管理
        • 数据视图和导出
    • 视频教程
      • 视频概述
      • 在 Labvanced 中入门
      • 创建任务
      • 元素视频
      • 事件与变量
      • 高级主题
    • 演练
      • 介绍
      • 斯特鲁普任务
      • 词汇决策任务
      • 波斯纳注视提示任务
      • 注意盲点闪烁范式
      • 眼动追踪示例研究
      • 婴儿眼动追踪研究
      • 使用鼠标追踪的注意捕获研究
      • 快速串行视觉呈现
      • ChatGPT 研究
      • 眼动追踪演示:将 SVG 作为关注区域
      • 多用户演示:显示参与者的光标
      • 游戏手柄/操纵杆控制器 - 基本设置
      • 带有 EEG 集成的桌面应用研究
      • 被试间组平衡和变量设置
      • 构建多用户研究
      • 网站框架眼动追踪演练
      • 条件网络摄像头眼动追踪
      • 文本分段研究构建
      • 构建一个与 AI 的研究
    • 常见问题
      • 功能
      • 支持政策与指南
      • 安全与数据隐私
      • 许可
      • Labvanced 的精确度
      • 编程使用与 API
      • 离线使用 Labvanced
      • 故障排除
      • 研究创建问题
    设置 / 记录变量操作将新值写入 Labvanced 中的变量

    设置 / 记录变量操作

    Set / Record Variable 操作在包含它的事件触发时,将一个值写入变量。它属于事件系统的 Variable Actions 类别,并且是 Labvanced 中最常见的操作:几乎每一个记录的行为测量和几乎每一个由变量驱动的条件都在某个时刻通过它。

    目录

    • 概述
      • 常见用例
    • 所需的背景知识
    • 工作原理
    • 工作流程提示
    • 研究和示例场景
    • 进一步阅读和开放材料

    概述

    一旦变量存在,Set / Record Variable 就是它实际获得值的方式:反应时间、参与者的选择、进行中的得分、鼠标移动的坐标对。如果没有它,变量在整个研究中将保持其初始值。

    Labvanced 事件菜单中设置 / 记录变量操作的位置

    在事件菜单的变量操作下定位 设置 / 记录变量。

    常见用例

    Set / Record Variable 几乎在每个研究类别中都有出现,从简单的按钮按压任务到全面的生理记录。

    • **记录行为测量:**将反应时间、准确率或输入的响应保存到变量中,以便在导出数据中显示。
    • **构建计数器:**每次触发器触发时将变量增加 1,以计算完成的试次、发生的错误或按键次数。
    • **捕捉特定触发值:**将触发器提供的值(如鼠标 X/Y 坐标或凝视位置)直接写入变量。
    • **驱动条件逻辑:**设置一个变量,稍后 Requirement Action 检查,以决定下一个执行的研究分支。

    所需的背景知识

    在深入了解此操作之前,建议了解变量创建及其属性的基本功能,如这些页面所述:

    创建变量

    创建变量

    在 Labvanced 中创建变量的不同方法,包括变量选项卡、任务编辑器、对象提示或事件系统。

    变量属性

    变量属性

    定义变量的设置:名称、数据类型、规模以及记录变量开关。

    工作原理

    要访问 Set / Record Variable,请在任务编辑器中打开 事件系统 并创建一个新事件。在 Add Action → Variable Actions 下,选择 Set / Record Variable。

    出现一个简单的对话框,具有两个部分,可以看作一个公式:

    Labvanced 中的设置 / 记录变量对话框

    设置 / 记录变量 对话框:等号左侧是目标变量,右侧定义了它的新值。
    选项描述
    Select (绿色按钮)选择应存储该值的变量,等号左侧。您还可以在此处创建一个新变量,而无需离开对话框。
    笔图标打开 值选择菜单,位于等号右侧,以定义新值的实际内容:常量、另一个变量的当前值、特定触发值或算术表达式。

    这就是整个操作:选择一个变量,定义其新值,完成。对话框还显示一条固定的线,“录音将在试验结束时进行”:当操作运行时,变量的值会立即在客户端更新,但该值仅在试验结束时发送到服务器并记录,而不是在每个单独的更改时。

    一个实用场景:构建计数器。 Labvanced 中没有内置的“计数器”变量,任何变量都可以作为计数器。创建一个适合您研究的数字变量名称(例如 trial_count 或 error_count),然后使用值选择菜单的 Arithmetic 选项在相关触发器触发时将该变量的新值设置为其自身加一。这是 Labvanced 任务中试验计数器、错误计数器和点击计数器背后的相同机制,因此了解此设置的工作原理非常重要,以便理解此操作的能力。

    在某些情况下,在构建您的任务时,您可能会收到一个对话框,询问您是否希望自动创建事件以捕获某些类型的数据,如眼动追踪。接受此选项将为您构建触发器和 Set / Record Variable 操作,已经配置好,与上述操作和对话框完全相同。

    眼动追踪设置对话框提供自动添加凝视和注视记录事件,及其创建的设置 / 记录变量操作

    接受 眼动追踪设置 对话框提供的功能可以自动添加凝视和注视事件。

    设置 / 记录变量操作配置为在 Labvanced 中将计数器变量增加 1

    使用 设置 / 记录变量 将计数器变量设置为自身加 1。

    工作流程提示

    • **在构建之前规划您的变量:**在开始构建之前,确保您了解在研究中需要捕获的所有数据,并大致了解哪些变量需要创建以存储这些数据。 Set / Record Variable 是实现该计划的地方,因此事先做出决定可以避免在构建过程中重构事件。
    • **重用类似的操作而不是重新构建:**如果您在同一触发器或研究的其他地方已经有类似的 Set / Record Variable 操作,请使用 Copy to Clipboard 并将其粘贴到所需位置,然后稍作编辑目标变量或值,而不是从头开始重新点击 Select 和值选择菜单。
    • **将属于一起的操作分组:**如果多个 Set / Record Variable 操作通常在一起使用,请围绕包含它们的 Action Group 规划事件设计。之后移动或复制整个组合会比单独处理每个操作更快。
    • **首先检查自动事件设置:**在某些情况下,例如眼动追踪、情感检测或心率,Labvanced 可以为您构建触发器及其 Set / Record Variable 操作。在手动设置相同内容之前,请检查该对话框是否可用。

    研究和示例场景

    两个来自已发表 Labvanced 任务的真实示例,一个评分单次响应,另一个记录连续运动。

    在 Flanker 任务中评分准确率

    在 Flanker 任务 的 Main_task_desktop_Flanker 任务中,帧 3 (Response Window),Requirement Action 在 Response Recording & Progression 事件中检查按下的键是否与目标方向匹配。当匹配时,Set / Record Variable 将 accuracy 变量设置为 1。

    记录鼠标轨迹数据

    Web Bridge 鼠标追踪设置使用 Set / Record Variable 将 Mouse [Name, Info, X, Y] Array 触发器特定值在每次鼠标移动时写入变量。将格式设置为 Array,记录类型设置为 Time series,并将采样方法设置为 record all (allow repeated duplicates),以便捕获每次运动,而不仅仅是最新的运动。

    进一步阅读和开放材料

    Labvanced 中事件系统的插图,所有触发器和操作的完整参考

    事件系统

    Labvanced 中所有触发器和操作的完整参考。

    值选择菜单

    值选择菜单

    如何定义常量、变量、触发器特定值和作为此操作分配的值的表达式。

    条件操作 (如果...那么...否则)

    条件操作 (如果...那么...否则)

    最常在 Then 和 Else 分支中触发设置 / 记录变量的条件逻辑块。

    创建变量

    创建变量

    如何在使用此操作之前或期间创建变量并设置其数据类型、格式和记录选项。