SlideShare a Scribd company logo
1 of 80
Download to read offline
实验刺激的编排和呈现

           中国科学院心理研究所
           脑高级功能研究实验室

                 刘海程
            liuhc@psych.ac.cn



2006-6                          LAB-HBF, IPCAS
fMRI实验研究流程图
      问题提出

      实验设计

 扫描          刺激

      数据分析

      论文写作
                  LAB-HBF, IPCAS
实验刺激
• 实验刺激的类别
 – 视觉(文本、图片等)
 – 听觉
 – 其它如嗅觉、触觉等。Trigger




                       LAB-HBF, IPCAS
实验刺激
• 实验刺激的基本特征
 – 基本物理特征
  •   刺激大小
  •   位置
  •   刺激的呈现颜色、背景颜色
  •   亮度、灰度等
 – 持续时间
 – 间隔时间

                     LAB-HBF, IPCAS
实验刺激编排
• 编:对于图片(bmp)、声音(wav)的实验刺
  激,要先用专业软件制作好,并统一命
  名,存放在实验文件夹内。
• 排:在用计算机呈现刺激之前,一般要将
  刺激呈现顺序以及相应的属性列在表格中




                     LAB-HBF, IPCAS
实验刺激呈现
• 常用的刺激呈现的软件有Presentation、
  Inquisition、DMDX、 E-Prime等。
• E-Prime




                          LAB-HBF, IPCAS
E-Prime软件使用




          LAB-HBF, IPCAS
大纲
• E-Prime基本操作与应用
• E-Prime高级应用
• E-Prime专题讨论
 – Timing Precision
 – E-Basic编程




                           LAB-HBF, IPCAS
大纲
• E-Prime基本操作与应用
 – 安装
 – 使用E-Prime编写的程序演示(4个不同类型)
 –   向导使用、界面简介
 –   文本刺激的呈现(举例、总结)
 –   图片、声音刺激的呈现
 –   Slide中State的使用

                              高级应用



                         LAB-HBF, IPCAS
Installation
1、安装前请先下载1.1安装版、SP3、
 HDD32,同时拿到加密狗。
2、运行HDD32.exe,安装加密狗驱动,一直
 等到Finished出现,才进入下一步。
3、安装1.1
 – 输入序列号等信息。不理会安装过程中出现的
   Microsoft驱动徽标警告信息。
4、安装SP3补丁

                       LAB-HBF, IPCAS
一个例子
• 问题:真词和非词判断速度比较
 – Cat; 文明
 – Cak; 都展




                    LAB-HBF, IPCAS
Before E-Prime,
    the most important is……
• 实验设计
 – 实验设计的类别和方式直接决定了刺激应该以什么样
   的方式呈现
• 实验设计的可操作性规范
 – 将你的实验设计越具体化,越详细,在编写刺激呈现
   程序时失误的可能越小




                          LAB-HBF, IPCAS
实验设计的可操作性规范

• 1、实验包含哪些自变量?每个变量有几个水平?实验
    的关键刺激是什么?刺激呈现之后,需要被试作出反
    应吗?如果需要被试作出反应,被试应该如何反应?
•   2、实验的具体流程是什么?在一段时间内,被试需要
    经历哪些事件?
•   3、这些事件有何特点?
•   4、需要记录哪些因变量?
•   5、期望的实验过程?
•   6、期望计算机记录哪些数据?


                        LAB-HBF, IPCAS
问题1


 左键
 右键




      LAB-HBF, IPCAS
问题2




      LAB-HBF, IPCAS
问题3
           固定属性         变化属性
注视点     在屏幕中央呈现“+”
          Duration=1s
           前景 = 黑
           背景 = 白
Probe   在屏幕中央呈现“+”       刺激
          Duration=2s   正确的反应
         反应输入 = 1,2
        反应中止刺激呈现
          前景 = 黑
          背景 = 白

                                LAB-HBF, IPCAS
问题4
• 反应时、反应、反应准确率




                 LAB-HBF, IPCAS
问题5
•   正确反应-反应后刺激消失
•   错误反应-反应后刺激消失
•   无效反应-刺激在2秒时消失
•   2秒内没有反应-刺激在2秒时消失




                       LAB-HBF, IPCAS
问题6




      LAB-HBF, IPCAS
回顾• • • • • •




                LAB-HBF, IPCAS
1:为实验建立专门的文件夹
• 为实验创建一个专门的文件夹
  (e.g.,C:MyExperimentsLexicalDecision)
• 实验名称中最好包含版本信息(e.g.,
  LexicalDecision001).




                                    LAB-HBF, IPCAS
2: 核心实验DesignList/Material




                      LAB-HBF, IPCAS
3: 核心实验Procedual




                   LAB-HBF, IPCAS
4: 设定trial events的属性
           固定属性         变化属性
注视点     在屏幕中央呈现“+”
          Duration=1s
           前景 = 黑
           背景 = 白
Probe   在屏幕中央呈现“+”       刺激
          Duration=2s   正确的反应
         反应输入 = 1,2
        反应中止刺激呈现
          前景 = 黑
          背景 = 白

                                LAB-HBF, IPCAS
5:设定要记录的数据
• 反应时、反应、反应准确率




                 LAB-HBF, IPCAS
6: 执行和测试实验程序

•   正确反应-反应后刺激消失
•   错误反应-反应后刺激消失
•   无效反应-刺激在2秒时消失
•   2秒内没有反应-刺激在2秒时消失




                       LAB-HBF, IPCAS
7: 检查结果中记录到的数据




            LAB-HBF, IPCAS
如何编制实验呈现程序?

• 1、实验包含哪些自变量?每个变量有几个水平?实验
  的关键刺激是什么?刺激呈现之后,需要被试作出反
  应吗?如果需要被试作出反应,被试应该如何
  反应?
• 2、实验的具体流程是什么?在一段时间内,被试需要
  经历哪些事件?
• 3、这些事件有何特点?
• 4、需要记录哪些因变量?
• 5、期望的实验过程?
• 6、期望计算机记录哪些数据?

                      LAB-HBF, IPCAS
如何编制实验呈现程序?

• 1、实验包含哪些自变量?每个变量有几个水平?实验
  的关键刺激是什么?刺激呈现之后,需要被试作出反
  应吗?如果需要被试作出反应,被试应该如何
  反应?完成DesignList
• 2、实验的具体流程是什么?在一段时间内,被试需要
  经历哪些事件?完成Procedural
• 3、这些事件有何特点?Events的属性设置
• 4、需要记录哪些因变量?数据的记录
• 5、期望的实验过程?运行和测试
• 6、期望计算机记录哪些数据?数据初步分析

                      LAB-HBF, IPCAS
声音刺激的呈现
• Experiment-Device-Sound
• list-Script load




                            LAB-HBF, IPCAS
大纲
• E-Prime基本操作与应用
• E-Prime高级应用
                   刺
   1、Trial的精细化     激
                   呈
   2、List的完成       现
                   程
   3、Block的完成      序
                   编
   4、其它            制
     (1)设定时间模式 、测试
     (2)运行、分析、保存、系列实验



                        LAB-HBF, IPCAS
E-Prime的工作模式
                   ——Total
In E-Prime, 实验的关键框架的实现:
    List object (e.g., DesignList):选取样本点和样本点
      要执行的时间序列
    Procedure object (e.g., TrialProc) 指定时间序列上
      事件之间的关系
    Events (e.g., Fixation and Probe display). 指定时间
      序列上的事件




                                            LAB-HBF, IPCAS
E-Prime的工作模式
            ——上下级关系
      Session
       level
      context              Search
                Block
                 level
                context
                           Trial
                           level
                          context   Sub-Trial
         Inheritance                  level
                                     context


§The experiment data and associated routines are
combined to define the Context object
§上级Attribute中的值可以被下级继承和重设,当前遇到
[attribute],在从本级往上搜索,直到得到赋值。 -HBF, IPCAS    LAB
Property and Attribute
• Attributes是实验中主要的自变量和控制变
  量。如condition, stimulus, correct answer
• Properties是与对象相关的、可以被提取和
  修改的数据项目。如text, forecolor, duration
                 调用
  Property        赋值        Attribute
  [attribute]表示在程序运行过程中,某个object的某
  个property的值是通过调运指定的attribute,得到指
  定的attribute的当前值来赋予的。
                                 LAB-HBF, IPCAS
E-Prime的工作模式
            CorrectAnswer
                          ——List



                  2

                  1

                              Probe
              word
        Nonword

Condition
                                      LAB-HBF, IPCAS
1: Trial Procedure的精细化

• 目标:
 – 使被试能够控制trial出现的时间。
 – 刺激呈现之前的类别信息是否影响被试的判
   断。
 – 每个trial后给被试反馈信息。




                        LAB-HBF, IPCAS
2: 完成List,设定取样方式等
• 完成DesignList。
• 使词和非词出现的相对比率为1;2。
• 刺激随机呈现




                 LAB-HBF, IPCAS
2: 完成List,设定取样方式等
• Method A – Enter Conditions Directly
• Method B – Use of Nested Lists
• Method C – Factor Table Wizard




                                LAB-HBF, IPCAS
Nested Lists(1)
• The Nested column的使用可以实现当前
  表格对其它表格和属性的调用.
 – 不同的条件包含不同的刺激或者属性集
 – 这样可以为被调用的表格使用不同的取样方
   式




                        LAB-HBF, IPCAS
Nested Lists(2)




For the Stimulus attribute, the experiment resolves the
value of [Word] using the value obtained from the nested
List, and the Stimulus attribute is set to “dog.”
                                            LAB-HBF, IPCAS
Factor Table Wizard
• 适用于对于多因素多水平的实验设计
• Step:
 – 使用Creat New Factor来创建要交叉的因素
 – Add Column:添加和某个被交叉的因素牢牢
   所定的变量
 – Cross Factors:交叉因素,产生列表。



                          LAB-HBF, IPCAS
Sampling mode(1)
• Sampling modes include sequential, random
  (without replacement), random (with
  replacement),counterbalance, offset, and
  permutation




                                     LAB-HBF, IPCAS
Sampling mode(2)


subject
1,4,7
2,5,8
 …
 …




6,9,12




                             LAB-HBF, IPCAS
Sampling mode(3)

Counterbalance              一

    Offset       顺序组合
                             多
 Permutation     穷尽组合
                        LAB-HBF, IPCAS
3: 添加组块 (Block)
• 目标1:
 – 考察启动刺激(词/非词)的呈现时间
   (500ms vs. 100ms)对词汇判断有无影响




                          LAB-HBF, IPCAS
LAB-HBF, IPCAS
• 目标2 :
 – 比较对动物和水果词的词汇判断有无差异




                  LAB-HBF, IPCAS
Son2

Mother                                4


                 2




Me       1   3




 Son1
                            LAB-HBF, IPCAS
• 目标3:
 – 比较启动刺激后有无Mask的差别




                      LAB-HBF, IPCAS
LAB-HBF, IPCAS
3:添加组块 (Block)
– Use a block level attribute to set a parameter of
  an object executed in the trial procedure (the
  PrimeDuration) 同样的程序,同样的刺激,不同
  的刺激属性
– Use of nested lists passed from the block level
  同样的程序,不同的刺激
– Use of block Procedure to pass in the trial
  Procedure 同样的刺激,不同的程序
– 第一种方法trial直接调用Block。后两种方法Block都是
  作为trial和其它表格联系的桥梁。不同的是,前者的表
  格之间是嵌套关系,trial中有Attribute是通过其嵌套
  的表格来赋值的;而后者的表格之间没有嵌套关系,
  trial中的Attribute不需要被调用的表格来赋值 -HBF, IPCAS
                             LAB
4:时间模式设定
• Timing Precision
  计时精度




                     LAB-HBF, IPCAS
4:测试(1)
•   Run experiment to verify correct and error responses
•   Checking scoring and data collection
•   Checking timing accuracy
•   Running pilot subjects
    – Verifying the understanding of instructions
    – Checking the data




                                                    LAB-HBF, IPCAS
4:测试(2)
• Run experiment to verify correct and error responses
   –   正确反应
   –   错误反应
   –   无效反应
   –   没有反应




                                                 LAB-HBF, IPCAS
4: 测试 (3)
• Checking scoring and data collection
   – 白纸记录,机纸对照;不必全完,十个足够
   – E-DataAid 中检查是否正确记录了实验所有水平的
     数据
   – 反应和反应时是否记录并被正确地赋值
   – 检查trial和block数目,检查被试号和序列号
   – 正确反映了变量的水平和水平组合
   – 再次检查分析所需的数据是否都被记录




                                 LAB-HBF, IPCAS
Stage 8: 运行实验
• Running subjects
• Running on multiple machines
  – Subject Station installation




                                   LAB-HBF, IPCAS
4: 基本数据分析
• Merging data
   – Standard Merge vs. Recursive Merge operation
• Checking data condition accuracy and data
  quality [Data editing Tracking modifications]
   – the checking at this point is more in reference
     to the completeness and appropriateness of the
     data, the experimenter’s assignment of subject
     numbers, and assignment of subjects to
     conditions.
• Analysis and export of data
                                                LAB-HBF, IPCAS
4:保存
• 保存实验程序(ES)
• 保存实验结果EDAT ,EMRG, ASCII
 – 保存最原始的数据,去处过滤和隐藏




                       LAB-HBF, IPCAS
4: 系列实验
• Modifying experiments
  – 保持实验不同版本之间的一致(Consistency).
    • 实验名称和变量
    • 有利于数据比较和数据融合
  – 记录不同版本实验的差别
• Developing functional libraries
  – Subroutines与Procedures的打包


                                    LAB-HBF, IPCAS
大纲
• E-Prime基本操作与应用
• E-Prime高级应用
• E-Prime专题讨论
 – Timing Mode 的设置
 – E-Basic编程




                     LAB-HBF, IPCAS
Intended and Actual Display
Duration – Without E-Prime




                       LAB-HBF, IPCAS
哪些影响了精确计时?
• 显示前的准备工作
• 刷新周期
• 计算机的管理工作
• E-prime怎么办? E-prime如何克服或者最小
  化这些影响精确计时的因素?
• 不同的问题不同的解决办法



                        LAB-HBF, IPCAS
PreRelease
  Pre-release,在当前刺激呈现的同时进行下一个刺激呈现的准备工作




                                           刺激起始时间
序列刺激                                  1    2     3      4
Expected time 0 preparation           0    100   200    300
Time with preparation                 30   160   290    420
Time with pre-release & preparation   30   130   230   LAB-HBF, IPCAS
                                                        330
Tradeoffs of Using Pre-Release
• 优点
 – 避免了由于刺激准备时间带来的delay
• 不足
 – 使用受到限制
   • Feedback前的对象
   • 时间窗口长于对象的呈现时间
   • 被试的反应终止了对象的呈现
• 设置
 – 100-200ms

                          LAB-HBF, IPCAS
Event vs. Cumulative
      Event Mode Timing – 刺激的呈现时间固定,刺激之间的间隔变化。
      Cumulative Mode Timing – 两个刺激的起始时间之间的间隔不变,刺激的
      呈现时间变短.


                                         D ela y s
                                       S T IM 1                          S T IM 2                    S T IM 3                         S T IM 4                     S T IM 5
E ven t M o d e              P rep 2                           P rep 3                     P rep 4                         P rep 5                       P rep 6




                                                           y

                                       S T IM 1                       S T IM 2                  S T IM 3                   S T IM 4                  S T IM 5
C um u lat ive M o d e       P rep 2                           P rep 3                P rep 4                         P rep 5              P rep 6


                         0                           100                            200                         300                     400                         500

                                                                                                T i m e ( m s)

                                                                                                                                                     LAB-HBF, IPCAS
根据刷新率来设定刺激的Duration




 呈现第一个刺激-等待指定的持续时间-监视第二个刷新
 周期开始的信号-开始呈现第二个刺激
                    LAB-HBF, IPCAS
根据刷新率来设定刺激的Duration
• 设定的刺激呈现时间= 想要呈现的时间(刷
  新时间的倍数)- x
 – 刷新率60-75HZ,X=10ms
 – 刷新率大于75HZ,X=刷新时间/2ms
 60.15Hz, 16.63ms. 想要呈现50ms
 设定的刺激呈现时间= 16.63ms×3-10ms
                    = 49.89ms-10ms
                    = 39.89ms rounded 40ms

                                    LAB-HBF, IPCAS
如何使用
• 关键是实验对时间精度的要求。
• 误差:10; 100; ?00




                    LAB-HBF, IPCAS
不同实验设计与
              调整时间精度的方法
•   Single stimulus event to response timing,
     – 仅仅需要精确记录单个刺激的持续时间和被试的反应时间
     – Event mode without PreRelease
•   Critical sequence of events,
     – 刺激的持续时间和刺激之间的间隔都很重要
     – Event mode with PreRelease. Duration accord refresh rate.
•   Critical and varying duration of an event in a sequence,
     – 变化的刺激持续时间.
     – Event mode with PreRelease; list; Duration accord refresh rate
•   Cumulative timing of a repeating sequence of events,
     – 固定的/精确的呈现频率 重复的任务,
     – Cumulative with PrePelease; 前后
•   Continuous sequences of events at a high rate with short stimulus
    presentation
    durations,
     – 连续高速呈现短的刺激 cache read
                                                              LAB-HBF, IPCAS
不同机器的刺激Duration限制




              LAB-HBF, IPCAS
大纲
• E-Prime基本操作与应用
• E-Prime高级应用
• E-Prime专题讨论
 – Timing Precision
 – E-Basic编程




                           LAB-HBF, IPCAS
为什么要使用E-Basic?
E-Studio图形化、直观性、能
满足人们的绝大多数需求

E-Basic代码化、逻辑性、能
满足人们的特殊的、自定义需求




                    LAB-HBF, IPCAS
E-Basic是什么?
• E-Basic 是一种脚本语言,是E-Prime的根
  基。和Visual Basic for Applications相比较,
  只是为了实验研究的需要而增加了一些命
  令。
  – Visual Basic for Applications是嵌套在微软应用
    程序中的Visual Basic派生语言。




                                   LAB-HBF, IPCAS
如何使用E-Basic
• E-Studio 生成的EBS(E-Basic script file)
• 用户书写的代码
  – InLine对象: 编译时插入EBS文件,成为其一部分
    • 在程序中的某个时间点执行、
    • 在实验的开始用来初始化全局变量。
  – Script窗口中的User按钮:
    • 用于全局变量的定义(Declaration of global
      variables)
    • 函数(Function)和分路径 (Subroutine)

                                    LAB-HBF, IPCAS
例1:添加练习程序
• 目标
 – 在正式实验之前让被试进行练习,直到被试
   的正确率达到80%再进行正式实验




                   LAB-HBF, IPCAS
例1:添加练习程序




            LAB-HBF, IPCAS
例2:移动窗口
•   Dim Phrase1 as String
•   Dim Phrase2 as String
•   Dim Phrase3 as String
•   Dim Phrase4 as String

•   Dim i as integer

•   Dim Dashes(4) as string

•   Dim spaces as string
•   spaces = " "

•   Phrase1 = Item$((c.GetAttrib("Sentence")),1,,"/")
•   Phrase2 = Item$((c.GetAttrib("Sentence")),2,,"/")
•   Phrase3 = Item$((c.GetAttrib("Sentence")),3,,"/")
•   Phrase4 = Item$((c.GetAttrib("Sentence")),4,,"/")
                                                        LAB-HBF, IPCAS
•   Dashes(1)= String$(Len(Phrase1),"-")
•   Dashes(2)= String$(Len(Phrase2),"-")
•   Dashes(3)= String$(Len(Phrase3),"-")
•   Dashes(4)= String$(Len(Phrase4),"-")

•   For i=1 to 4
•         Select case i
•                  Case 1
•                  TextDisplay1.Text = spaces & Phrase1 & " " & Dashes(2) &
    " " & Dashes(3) & " " & Dashes(4)
•                  Case 2
•                  TextDisplay2.Text = spaces & Dashes(1) &" " & Phrase2
    & " " & Dashes(3) & " " & Dashes(4)
•                  Case 3
•                  TextDisplay3.Text = spaces & Dashes(1) & " " & Dashes(2)
    & " " & Phrase3 & " " & Dashes(4)
•                  Case 4
•                  TextDisplay4.Text = spaces & Dashes(1) & " "& Dashes(2)
    & " " & Dashes(3) & " " & Phrase4
•      End Select
•   Next i
                                                              LAB-HBF, IPCAS
帮助信息
GettingStartedGuide.pdf
UsersGuide.pdf
ReferenceGuide.pdf
http://www.pstnet.com/e-prime/support/
http://www.psy.vu.nl/download/menu/
http://step.psy.cmu.edu
http://listserv.linguistlist.org/archives/eprime.html
liuhc@psych.ac.cn

                                              LAB-HBF, IPCAS
Thank you!




             LAB-HBF, IPCAS

More Related Content

Similar to E prime instruction

Phpunit入门 r2
Phpunit入门 r2Phpunit入门 r2
Phpunit入门 r2
Baohua Cai
 
Testing in python 2.7.3
Testing in python 2.7.3Testing in python 2.7.3
Testing in python 2.7.3
Wen Liao
 
数据库性能模型与容量规划
数据库性能模型与容量规划数据库性能模型与容量规划
数据库性能模型与容量规划
freezr
 
Foundation of software development 1
Foundation of software development 1Foundation of software development 1
Foundation of software development 1
netdbncku
 
测试用例浅析 V1.1
测试用例浅析 V1.1测试用例浅析 V1.1
测试用例浅析 V1.1
shijian_dev
 

Similar to E prime instruction (17)

使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)
 
OpenEJB - 另一個選擇
OpenEJB - 另一個選擇OpenEJB - 另一個選擇
OpenEJB - 另一個選擇
 
Ecmascript
EcmascriptEcmascript
Ecmascript
 
Phpunit入门 r2
Phpunit入门 r2Phpunit入门 r2
Phpunit入门 r2
 
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
Web请求异步处理和海量数据即时分析在淘宝开放平台的实践
 
MySQL压力测试经验
MySQL压力测试经验MySQL压力测试经验
MySQL压力测试经验
 
Xpp
XppXpp
Xpp
 
PHPUnit
PHPUnitPHPUnit
PHPUnit
 
Testing in python 2.7.3
Testing in python 2.7.3Testing in python 2.7.3
Testing in python 2.7.3
 
Refactoring with Patterns in PHP
Refactoring with Patterns in PHPRefactoring with Patterns in PHP
Refactoring with Patterns in PHP
 
IOS入门分享
IOS入门分享IOS入门分享
IOS入门分享
 
例外處理與單元測試
例外處理與單元測試例外處理與單元測試
例外處理與單元測試
 
数据库性能模型与容量规划
数据库性能模型与容量规划数据库性能模型与容量规划
数据库性能模型与容量规划
 
Foundation of software development 1
Foundation of software development 1Foundation of software development 1
Foundation of software development 1
 
Oracle数据库性能模型
Oracle数据库性能模型Oracle数据库性能模型
Oracle数据库性能模型
 
Legacy code 讀書會 1st (Ch1 - Ch5)
Legacy code 讀書會 1st (Ch1 - Ch5)Legacy code 讀書會 1st (Ch1 - Ch5)
Legacy code 讀書會 1st (Ch1 - Ch5)
 
测试用例浅析 V1.1
测试用例浅析 V1.1测试用例浅析 V1.1
测试用例浅析 V1.1
 

E prime instruction