Professional Documents
Culture Documents
Statistical Analysis - 2023 - Mo
Statistical Analysis - 2023 - Mo
Statistical Analysis - 2023 - Mo
Zhiying Long
A very simple fMRI experiment
One session
Task: 110 units
Rest: 101 units
被动听词 vs 静息
7 cycles of
rest and listening
问题:在聆听和休息之间
,BOLD的反应有什么
变化吗?
Stimulus function
我们不想知道任务区fMRI活动是否比非任务区更大。
我们想知道在对同一被试、同一组或整个人群的重复观察中,
Inferential Statistics
l Research hypothesis H1
States possible relation between IV and DV
H1: condition 1≠condition 2
l Null Hypothesis H0
States the manipulation has no effect
H0: condition 1=condition 2
l Significance testing
反证法思想:
l Evaluating whether difference between conditions are likely
to be due
先假定H to chance.
0成立,看由此产生什么结果,如果导致不合
l Significance is the probability
理现象出现,表明原假设H that the results could occur
0不成立,拒绝原假设,否则接
under the null hypothesis (alpha value).
受原假设。
l If probability of result < alpha, then reject H0 as untenable
不合理:计算事件发生的概率,小概率事件在一次观察中
可认为基本不会发生。 P<0.05
The alpha value
provides the
probability of a
type I error.
False positive
(假激活)
False negative
(假未激活)
在单个voxel上进行推断统计
为了检验一个假设,我们构建“检验统计量”。
Null Distribution of T
Hypothesis Testing
l Type I Error α: u
Acceptable false positive rate α.可接受的假阳性率α。
Level threshold uα
Threshold uα controls the false positive rate
p(T u | H 0 )
Null Distribution of T
P-val
Null Distribution of T
Statistical Parametric Maps 统计参数图
Basic Statistics
lT test
¡t分布描述了来自同一正态分布的两个样本之间
的期望差异。
¡零假设
l条件1和条件2的fMRI数据均值之间的任何差异都是由
于随机因素。
¡描述了观察和预期之间的匹配性
¡Ranges from -1 to 1
¡反应强度不直接影响相关性
Basic Concepts of the GLM
l GLM将数据视为模型因素加噪声的线性组合
¡模型因子(xi)具有已知的形状
¡参数权重(ai)未知
l GLM分析确定了一组最能说明数据的振幅值
¡常用代价函数:建模后残差的最小二乘偏差(噪声)
Form of the GLM
SPM
Design matrix
Voxel-wise time series analysis
Model
specification
Parameter
estimation
Time
Hypothesis
Statistic
Ti
m
e
BOLD signal
single voxel
time series SPM
Single voxel regression model
error
=1 + 2 +
Time
BOLD signal x1 x2 e
Mass-univariate analysis: voxel-wise GLM
Model is specified by
y = + 1. Design matrix X
2. Assumptions about
e
N: number of scans
GLM的四个基本组成部分 p: number of regressors
经验数据(y)
设计矩阵(X)
The design matrix embodies all available knowledge
参数权重(β)
about experimentally controlled factors and potential
剩余误差(e)
confounds.
Parameter estimation
= +
y X
N Least squares
Estimate parameters
such that e
t 1
2
t
minimal parameter estimate
(assuming iid error)
Constructing a Design Matrix (Model
building)
lExperimental factors
¡Model factors that are associated with specific
experimental hypotheses.
lNuisance factors
¡Reduce the amount of residual variation
included in the error term
¡Assigning known variability to nuisance factors
improves the validity of the GLM.
lCollinear factors
¡Complicated the interpretation of results
l 时间导数回归系数的正估计意味着血流动力学响应的峰值比
平常出现得更早。
l 色散导数的正估计意味着比通常情况下分散的响应更少。
Design matrix
这种模式有什么问题?
1. BOLD反应具有延迟和分散的形式。
热电厂
2. BOLD信号包含大量的低频噪声。
3.数据是序列相关的(时间自相关),这违反了
GLM中噪声模型的假设
问题1:BOLD响应的卷积模型
具有典型血流动力学反应函数
(HRF)的卷积刺激函数: t
f g (t ) f ( ) g (t )d
0
HRF
问题2:低频噪声解决方案:高通滤波
discrete cosine
transform (DCT) set
Global Normalization
Contrasts
l 我们通常对整个ß向量不感兴趣。
l Contrast选择特定的感兴趣的效果:
a contrast c is a vector of length p.
cT = [0 -1 1 0 0 …]
cTβ = 0xb1 + -1xb2 + 1xb3 + 0xb4 + 0xb5 + . . .
T-test - one dimensional contrasts –
SPM{t}
Question: box-car amplitude > 0 ?
cT =10000000 =
b1 = cTb> 0 ?
contrast of
estimated
parameters
T=
variance
Test statistic:
estimate
T-contrast in SPM
q For a given contrast c:
ResMS image
beta_???? images
ˆT ˆ
ˆ 2
Np
SPM{t}
T-test: a simple example
q Passive word listening vs rest
cT = [ 1 0 ] Q: activation during
listening ?
1
SPMresults:
Null hypothesis:
10
Height threshold T = 3.2057 {p<0.001}
20 voxel-level
mm mm mm
30
T ( Zº ) puncorrected
Statistics:p-values13.94 Inf 0.000
adjusted for search volume
-63 -27 15
40
set-level
p c
12.04
cluster-level
p corrected k E p
Inf 0.000 voxel-level
p FWE-corr p FDR-corr T (
-48
Zº )
-33 12 mm mm mm
p uncorrected
11.82 uncorrectedInf 0.000 -66 -21 6
50
0.000 10 0.000
13.72520
Inf
0.000 0.000
0.000
0.0000.000 13.94
0.000 12.04
57
Inf
Inf
-21
0.000
0.000
12 -63 -27 15
-48 -33 12
12.29 Inf 0.000 0.0000.000 11.82 63 -12
Inf 0.000 -3 -66 -21 6
60
0.000
9.89426
7.83
0.000
0.000 0.000
0.000 0.000 13.72
0.000 12.29 57 -39
Inf
Inf 0.000 6 63 -12 -3
0.000 57 -21 12
l t统计量不依赖于回归量的缩放。
l t统计量不依赖于对比度的尺度。
[1 1 1 ]/ 3
l 但是要注意However be careful of the
interpretation of the contrasts
themselves (eg, for a second level
Subject 5
analysis):本身的解释(如对于二阶分析)
sum ≠ average
T-test:几点说明
l t检验是一种信噪比测量(估计值与估计值标准差的
比值)。
l t对比是β的简单组合;
t统计量不依赖于回归量的缩放或对比的缩放。
l 单侧检验
H0: c T 0 vs H A: c T 0
0.4
0.35 n=1
n=2
n=5
0.3 n=10
n=¥
0.25
0.2
0.15
0.1
0.05
0
-5 -4 -3 -2 -1 0 1 2 3 4 5
Probability Density Function of Student’s t distribution
F-test - 额外的平方和原则
l模型比较:完整模型与简化模型?
RSS RSS0
full
ˆ
2
reduced
ˆ
2
1 = rank(X) – rank(X0)
Full model ? Or Reduced model? 2 = N – rank(X)
F-test - multidimensional contrasts –
SPM{F}
lTests multiple linear hypotheses:
H0: True model is X0 H0: b3 = b4 = ... = b9 = 0 test H0 : cTb = 0 ?
X0 X1 (b3-9) X0 0010000
0
cT =0 0 0 1 0 0 0
0
0000100
0
0000010
0
0000001
0
0000000
1
SPM{F6,322}
ResMS image
beta_???? images
ˆT ˆ
ˆ 2
Np
l Hypotheses:
1 0 0 0
0 0
0
1
0
0
1 0
Null Hypothesis H 0 : 1 2 3 0
0 0 0 0
Alternative Hypothesis H A : at least one k 0
l 在用f检验测试一维对比时,例如β1 - β2,结果将与
测试β2 - β1相同。它将恰好是t检验的平方,同时检
验正和负的效应。
Design matrix with canonical HRF only.
在之前的设计矩阵中,onset时间与典型血流动力学
响应函数(HRF)卷积形成左边的两个回归量。
Design matrix with canonical HRF + 2 derivatives.
这与之前的模型相同,但使
用3个回归因子对每种条件
进行建模。
这三个基础函数是典型的
HRF及其关于时间和离散度
的导数。
time derivative+dispersion derivative
For this new model, how do we test the effects of, for
instance, the right motor response ?
[0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 0 0 1 0] 首先,使用Fcontrast对所有对这一反
应建模的回归因子进行测试。
这种contrast检验针对参数为零的零
假设对每一行进行检验。
由于参数是针对零进行测试的,因此
必须重建拟合数据,并检查响应的正
or负方面。
我们如何测试左右侧响应之间的总体差异
[1 0 0 -1 0 0 0
0 1 0 0 -1 0 0
0 0 1 0 0 -1 0]
这显示了用于测试左右响应之间
的总体差异(跨基础函数)的f对比。
SPM-F图像对应于左右响应的总体差异。
Comparison of the fitted response
这些图显示了单个体素(先前SPM-F图的最大值)的血流动力学反应。
左图显示了使用简单模型估计的HRF,并显示出一定的拟合不足。
右图使用具有基函数的更灵活的模型纠正了这种拟合不足。
Orthogonal regressors正交回归因子
Variability in Y
Correlated regressors 相关回归因子
Shared variance
Variability in Y
Correlated regressors
Variability in Y
Correlated regressors
Variability in Y
Correlated regressors
Variability in Y
Correlated regressors
Variability in Y
Correlated regressors
Variability in Y
Correlated and orthogonal
regressors y
x2 * x2
x1
Residual
Correlation between regressors
b1 = 0.79
b2 = 0.85 Residual var. = 0.3
b3 = 0.06
p(Y| b1 = 0)
p-value = 0.08
(t-test)
= + P(Y| b2 = 0)
p-value = 0.07
(t-test)
Y Xb e
1 2
Correlation between regressors
True signal
Fit
Residual
Correlation between regressors
b1 = 1.47 (0.79)
b2 = 0.85 (0.85) Residual var. = 0.3
b3 = 0.06 (0.06)
p(Y| b1 = 0)
p-value = 0.0003
(t-test)
p(Y| b2 = 0)
= +
p-value = 0.07
(t-test)
Y Xb e
1
2
1 2
Design orthogonality
l 对于设计矩阵的每对列,
正交性矩阵描述它们之间
角度的余弦值大小,从白
色映射到黑色,范围 0 到
1。
q如果两个向量的均值为零,
则向量之间角度的余弦与两
个变量之间的相关性相同。
Design efficiency
q 目的是最小化 t 对比的标准误差(即 t 统计量
的分母)。
q 这相当于最大化效率efficiency e:
e(ˆ 2 , c, X ) (ˆ 2 cT ( X T X ) 1 c) 1
Noise variance Design variance
q 如果我们假设噪声方差Noise variance与特定设计无关:
q 这是一个相对的衡量标准:我们只能说一种设计比另一种设
计更有效(对于给定的contrast)。
Design efficiency
A B
A+B
A-B
q回归量之间的高相关性导致对每个回归量单
独具有低敏感性。
q我们仍然可以有效地估计它们之间的差异。
Estimability of a contrast
Factor 1
Factor 2
Mean
l 如果 X 不是满秩,那么我们可以有 One-way ANOVA
Xb1 = Xb2 with b1≠ b2不同的参数) (unpaired two-sample t-test)
l 因此,这些参数不是“唯一”、“可 1 0 1
识别”或“可估计的”。 1 0 1
images
l 对于这样的模型,XTX is not不是可 1 0 1
逆的,所以我们必须求助于广义逆( 1 0 1
SPM 使用伪逆)。(SPM uses the 0 1 1
pseudo-inverse). 0 1 1
0 1 1
0 1 1parameters
Rank(X)=2
q Example: parameter estimability
®
(gray b not uniquely specified)
1 0
1 0
1 0 [1 0].β = y1
1 0 β1=y1 [0 1].β = y2
0 1 β2=y2 [1 -1].β = y1-y2 1 0 1
0 1
0 1
[.5 .5].β = mean(y1,y2) 1 0 1
0 1 1 0 1
1 0 1 β1+β3=y1
0 1 1 β2+β3=y2
0 1 1
0 1 1
0 1 1
[1 0 1].β = y1
[0 1 1].β = y2
[1 -1 0].β = y1-y2
[.5 0.5 1].β = mean(y1,y2)
A real example (almost !)
V A C1 C2 C3
C1
V
C2
C3
C1
C2
A
C3
Asking ourselves some questions
...
V A C1 C2 C3
Test C1 > C2 : c = [ 0 0 1 -1 0 0 ]
Test V > A : c = [ 1 -1 0 0 0 0 ]
[001000]
Test C1,C2,C3 ? (F) c= [000100]
[000010]
• 设计矩阵不正交
• 许多contrast是不可估计的
• MxC 的交互作用未被纳入模型
Modelling the interactions
Asking ourselves some questions ...
C1 C1 C2 C2 C3 C3 Test C1 > C2 : c = [ 1 1 -1 -1 0 0 0]
VAVAVA
Test V > A : c = [ 1 -1 1 -1 1 -1 0]
P < 0.05 (about 4000 voxels) P < 0.01 (about 800 voxels) P < 0.001 (about 80 voxels)
多重比较
l在多次具有随机噪声的数据集中,n 统计检
验的假阳性结果数量大致为 n*α
l无假阳性结果的概率 p=(1-α)n
A B C
t = 2.10, p < 0.05 (uncorrected) t = 3.60, p < 0.001 (uncorrected) t = 7.15, p < 0.05,
Bonferroni Corrected
统计校正
l 如果进行了多次测试,则集体 alpha 值大于单个测
试 alpha
¡也就是说,总体 I类错误增加
lWorsley及其同事开发的用于解释多重比较
的方法
¡ 构成大部分SPM的基础
l根据数据的平滑度(空间相关性)估计独
立统计检验的数量
¡如果数据非常平滑,则噪声点通过阈值的几率
就会降低
Gaussian Field Theory
l控制超阈值之间的误报值与定义的预测的
比例 (q)
¡Via 假阳性的次数
¡Vaa +Via 表示声明为激活的体素数
l基于p值在数据中的分布
uFDR校验步骤如下:
选择q值 q即所期望的最大的FDR值,常选择q=0.05
No
判别式中c(V)为一常数,它的选择
Yes 依赖于各个体素p值的联合分布情
况,通常取c(V)=1。
按大小顺序排列的p值
斜率为q/m
Thresholding of statistical maps in functional neuroimaging using the False Discovery Rate,
Christopher R. Genovese. et.al, NeuroImage, 2002
FDR用比较温和的方法对p值进行了校正
。其试图在假阳性和假阴性间达到平衡
,将假/真阳性比例控制到一定范围之
内。例如,如果检验1000次,我们设定
的阈值为0.05(5%),那么无论我们得
到多少个差异蛋白,这些差异蛋白出现
假阳性的概率保持在5%之内,这就叫
FDR<5%。
u基于voxel的Bonferroni与FDR校验方法在对各个体素做显著性
检验时都是将该检验作为独立的检验来完成的,即voxel-wise的
校验方法将对统计参数图的检验当作一组离散的检验,事实上,
fMRI数据中各个体素之间往往存在一定的相关性,也即fMRI信
号是在某种程度上连续的信号,理由如下:
False discovery rate revisted: FDR and topological inference using Gaussian random fields, Justin
R. Chumbley. et.al, NeuroImage, 2009.
uspm8中已将voxel-wise FDR隐去,并且加入了两种统称为
topological FDR的方法:cluster-FDR;peak-FDR。但是
在spm_defaults代码中可将参数defaults.stats.topoFDR改
为0来调出voxel-wise FDR这一功能。
Ø 拓扑 FDR 在簇上应用 FDR(因此考虑到数据/结果具有空间结构的事实)
--> do p= 0.001 得到簇,然后从簇分布中进行 FDR 校正。
Ø 拓扑 FDR 在峰值上应用 FDR(因此解释了数据/结果具有空间结构的事实)--
> 在峰值 = do p= 0.001 上得到跨集群的峰值并校正。
Cluster Analyses
l Assumptions
¡假设I:真正的功能磁共振成像活动区域通常会延伸到多
个体素
¡假设二:可以计算观察到给定体素范围激活的概率
l 确定给定特定“阈值”体素“cluster”的可能性
¡更高的阈值(例如,P < .0001)需要更小的cluster
l Unlikely to get large cluster of highly active voxels
¡更低的阈值(例如,P < .01)需要更大的cluster
How large should clusters be?
l 假阳性结果的可能性随着cluster大小的增加而降低
l For instance, a slice of 4096 voxels
If C=2, 16000 clusters
If C=3, 55000 clusters
Suppose voxel-wise alpha=0.001
For C=1, 4096*0.001=4.096
For C=2, 16000*0.001*0.001=0.016
For C=3, 55000*0.001*0.001*0.001=0.000055
l将统计数据的检验限制在较小的(较)区
域
l需要更少的“相关”
l基于解剖学的ROI不会引入偏差
l用功能像ROI时候会有一些潜在问题
ROI analysis
lROIs 的解释
¡在复杂设计(例如具有多个水平的因子设计)中
,通常很难从整体map中识别跨条件的激活模式.
¡如果ROI的选择基于相同的contrast,则无法对
结果数据进行测试的显著性做出任何结论
ROI analysis
lROIs 统计控制
¡通过将统计测试的数量限制为几个ROI来控制I型
误差
¡将voxel-based的分析限制为一组 ROI,然后仅
在这些体素中控制多重比较
¡预先指定一组解剖上的ROI,然后跨这些区域执
行统计分析
ROI analysis
l功能特异性的ROIs
¡将检验限制在根据其他一些信息(例如单独的
“localizer”scan或条件)的功能定义区域
¡这种方法在视觉加工的fMRI中最为普遍,其中
localizer用于识别功能特定的区域,例如V1中
的视网膜局部组织区域,或MT中的运动敏感体
素
Defining ROIs
lROI可以根据结构或功能特征来定义.
¡结构ROI通常根据宏观解剖结构定义,例如脑回
解剖.
Defining ROIs
lROI可以根据结构或功能特征来定义.
¡功能ROI通常基于对来自同一个人的数据分析.
l一种常见的方法是使用单独的“localizer”扫
描来识别特定解剖区域中显示特定响应的体素
l可以在因子设计中使用正交contrast创建功能
ROI
l可以基于以前的研究创建ROI.
怎么在被试间比较
SPM(t)
One-sample
t-test @ 2nd level