0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0

Download Report

Transcript 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0

Statistical Inference
Guillaume Flandin
Wellcome Trust Centre for Neuroimaging
University College London
SPM Course
Zurich, February 2013
Image time-series
Realignment
Spatial filter
Design matrix
Smoothing
General Linear Model
Statistical Parametric Map
Statistical
Inference
Normalisation
Anatomical
reference Parameter estimates
RFT
p <0.05
A mass-univariate approach
Estimation of the parameters
i.i.d. assumptions:
OLS estimates:
๐œ€~๐‘(0, ๐œŽ 2 ๐ผ)
๐›ฝ = (๐‘‹ ๐‘‡ ๐‘‹)โˆ’1 ๐‘‹ ๐‘‡ ๐‘ฆ
๐›ฝ1 = 3.9831
๐›ฝ2โˆ’7 = {0.6871, 1.9598, 1.3902, 166.1007, 76.4770, โˆ’64.8189}
๐›ฝ
๐‘ฆ =
+๐œ€
๐›ฝ8 = 131.0040
๐œ€=
๐›ฝ~๐‘
๐›ฝ, ๐œŽ 2 (๐‘‹ ๐‘‡ ๐‘‹)โˆ’1
๐œŽ2
=
๐œ€๐‘‡ ๐œ€
๐‘โˆ’๐‘
Contrasts
๏ฑ A contrast selects a specific effect of interest.
๏ƒฐ A contrast ๐‘ is a vector of length ๐‘.
[1 10 -1
0 00 00 00 00 00 00 00 00 00 00 0]
[0
0]
๏ƒฐ ๐‘ ๐‘‡ ๐›ฝ is a linear combination of regression
coefficients ๐›ฝ.
๐‘ = [1 0 0 0 โ€ฆ ]๐‘‡
๐‘ ๐‘‡ ๐›ฝ = ๐Ÿ × ๐›ฝ1 + ๐ŸŽ × ๐›ฝ2 + ๐ŸŽ × ๐›ฝ3 + ๐ŸŽ × ๐›ฝ4 + โ‹ฏ
= ๐œท๐Ÿ
๐‘ = [0 1 โˆ’ 1 0 โ€ฆ ]๐‘‡
๐‘ ๐‘‡ ๐›ฝ = ๐ŸŽ × ๐›ฝ1 + ๐Ÿ × ๐›ฝ2 + โˆ’๐Ÿ × ๐›ฝ3 + ๐ŸŽ × ๐›ฝ4 + โ‹ฏ
= ๐œท๐Ÿ โˆ’ ๐œท๐Ÿ‘
๐‘ ๐‘‡ ๐›ฝ~๐‘ ๐‘ ๐‘‡ ๐›ฝ, ๐œŽ 2 ๐‘ ๐‘‡ (๐‘‹ ๐‘‡ ๐‘‹)โˆ’1 ๐‘
Hypothesis Testing
To test an hypothesis, we construct โ€œtest statisticsโ€.
๏ฑ Null Hypothesis H0
Typically what we want to disprove (no effect).
๏ƒฐ The Alternative Hypothesis HA expresses outcome of interest.
๏ฑ Test Statistic T
The test statistic summarises evidence
about H0.
Typically, test statistic is small in
magnitude when the hypothesis H0 is true
and large when false.
๏ƒฐ We need to know the distribution of T
under the null hypothesis.
Null Distribution of T
Hypothesis Testing
u๏ก
๏ฑ Significance level ฮฑ:
Acceptable false positive rate ฮฑ.
๏ƒฐ threshold uฮฑ
Threshold uฮฑ controls the false positive rate
๏ก
๏ก ๏€ฝ p(T ๏€พ u๏ก | H0 )
Null Distribution of T
๏ฑ Conclusion about the hypothesis:
We reject the null hypothesis in favour of the
alternative hypothesis if t > uฮฑ
๏ฑ p-value:
A p-value summarises evidence against H0.
This is the chance of observing value more
extreme than t under the null hypothesis.
๐‘ ๐‘‡ > ๐‘ก|๐ป0
t
p-value
Null Distribution of T
T-test - one dimensional contrasts โ€“ SPM{t}
cT
=10000000
b1 b2 b3 b4 b5 ...
Question:
box-car amplitude > 0 ?
=
b1 = c T b> 0 ?
H0: cTb=0
Null hypothesis:
contrast of
estimated
parameters
T=
Test statistic:
T๏€ฝ
cT bห†
var(cT bห† )
๏€ฝ
variance
estimate
cT bห†
๏ณห† 2cT ๏€จX T X ๏€ฉ c
๏€ญ1
~ tN ๏€ญ p
T-contrast in SPM
๏ฑ For a given contrast c:
ResMS image
beta_???? images
bห† ๏€ฝ ( X T X ) ๏€ญ1 X T y
con_???? image
c T bห†
T
ห†
๏ฅ
๏ฅห†
2
๏ณห† ๏€ฝ
N๏€ญp
spmT_???? image
SPM{t}
T-test: a simple example
๏ฑ Passive word listening versus rest
Q: activation during
listening ?
1
cT = [ 1 0 0 0 0 0 0 0]
Null hypothesis: b1
๐‘ก=
๐‘๐‘‡ ๐›ฝ
var ๐‘ ๐‘‡ ๐›ฝ
๏€ฝ0
SPMresults:
Height threshold T = 3.2057 {p<0.001}
voxel-level
mm mm mm
( Z๏‚บ)
T
p uncorrected
13.94
12.04
11.82
13.72
12.29
9.89
7.39
6.84
6.36
6.19
5.96
5.84
5.44
5.32
Inf
Inf
Inf
Inf
Inf
7.83
6.36
5.99
5.65
5.53
5.36
5.27
4.97
4.87
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
0.000
-63
-48
-66
57
63
57
36
51
-63
-30
36
-45
48
36
-27 15
-33 12
-21
6
-21 12
-12 -3
-39
6
-30 -15
0 48
-54 -3
-33 -18
-27
9
42
9
27 24
-27 42
T-test: summary
๏ฑ T-test is a signal-to-noise measure (ratio of estimate to
standard deviation of estimate).
๏ฑ Alternative hypothesis:
H0: cT b ๏€ฝ 0
vs
HA: cT b ๏€พ 0
๏ฑ T-contrasts are simple combinations of the betas; the Tstatistic does not depend on the scaling of the regressors
or the scaling of the contrast.
Scaling issue
[1
1
1
1
]/ 4
T๏€ฝ
cT bห†
var(c bห† )
Subject 1
T
๏€ฝ
cT bห†
๏ณห† c ๏€จX X ๏€ฉ c
2 T
T
๏€ญ1
๏ฑ The T-statistic does not depend on
the scaling of the regressors.
๏ฑ The T-statistic does not depend on
the scaling of the contrast.
Subject 5
[1
1
1
]/ 3
๏ฑ Contrast
cT bห† depends on scaling.
๏ƒ˜ Be careful of the interpretation of the
contrasts cT bห† themselves (eg, for a
second level analysis):
sum โ‰  average
F-test - the extra-sum-of-squares principle
๏ฑ Model comparison:
Null Hypothesis H0: True model is X0 (reduced model)
X0
X0
X1
RSS
2
ห†
๏ฅ
๏ƒฅ full
Full model ?
Test statistic: ratio of
explained variability and
unexplained variability (error)
RSS0
2
ห†
๏ฅ
๏ƒฅ reduced
or Reduced model?
๏ฎ1 = rank(X) โ€“ rank(X0)
๏ฎ2 = N โ€“ rank(X)
F-test - multidimensional contrasts โ€“ SPM{F}
๏ฑ Tests multiple linear hypotheses:
H0: True model is X0
X0
X1 (b4-9)
H0: b4 = b5 = ... = b9 = 0
X0
cT =
test H0 : cTb = 0 ?
000100000
000010000
000001000
000000100
000000010
000000001
SPM{F6,322}
Full model?
Reduced model?
F-contrast in SPM
ResMS image
beta_???? images
bห† ๏€ฝ ( X T X ) ๏€ญ1 X T y
T
ห†
๏ฅ
๏ฅห†
2
๏ณห† ๏€ฝ
N๏€ญp
ess_???? images
spmF_???? images
( RSS0 - RSS )
SPM{F}
F-test example: movement related effects
contrast(s)
contrast(s)
10
20
30
40
50
60
70
80
10
20
2
30
40
50
60
70
80
2
4
Design matrix
6
8
4
6
8
Design matrix
F-test: summary
๏ฑ F-tests can be viewed as testing for the additional variance
explained by a larger model wrt a simpler (nested) model ๏ƒฐ
model comparison.
๏ฑ F tests a weighted sum of squares of one or several
combinations of the regression coefficients b.
๏ฑ In practice, we donโ€™t have to explicitly separate X into [X1X2]
thanks to multidimensional contrasts.
๏ฑ Hypotheses:
๏ƒฉ1
๏ƒช0
๏ƒช
๏ƒช0
๏ƒช
๏ƒซ0
0
1
0
0
0
0
1
0
0๏ƒน
0๏ƒบ๏ƒบ
0๏ƒบ
๏ƒบ
0๏ƒป
Null HypothesisH0 : b1 ๏€ฝ b2 ๏€ฝ b3 ๏€ฝ 0
Alternative HypothesisH A : at least one bk ๏‚น 0
๏ฑ In testing uni-dimensional contrast with an F-test, for example
b1 โ€“ b2, the result will be the same as testing b2 โ€“ b1. It will be
exactly the square of the t-test, testing for both positive and
negative effects.
Orthogonal regressors
Variability described by ๐‘‹1
Testing for ๐‘‹1
Variability described by ๐‘‹2
Testing for ๐‘‹2
Variability in Y
Correlated regressors
Variability described by
Variability described by
Shared variance
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for ๐‘‹1
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for ๐‘‹2
Variability in Y
Variability described by
Variability described by
Correlated regressors
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for ๐‘‹1
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for ๐‘‹2
Variability in Y
Correlated regressors
Variability described by
Variability described by
Testing for ๐‘‹1 and/or ๐‘‹2
Variability in Y
Design orthogonality
๏ฑ For each pair of columns of the
design matrix, the orthogonality
matrix depicts the magnitude of the
cosine of the angle between them,
with the range 0 to 1 mapped from
white to black.
๏ฑ If both vectors have zero mean then
the cosine of the angle between the
vectors is the same as the correlation
between the two variates.
Correlated regressors: summary
๏ฑ We implicitly test for an additional effect only. When testing for the
first regressor, we are effectively removing the part of the signal that
can be accounted for by the second regressor:
๏ƒฐ implicit orthogonalisation.
x^2
x2
x2
x1
x1
x^
1
x2
x^2 = x2 โ€“ x1.x2 x1
x1
๏ฑ Orthogonalisation = decorrelation. Parameters and test on the non
modified regressor change.
Rarely solves the problem as it requires assumptions about which
regressor to uniquely attribute the common variance.
๏ƒฐ change regressors (i.e. design) instead, e.g. factorial designs.
๏ƒฐ use F-tests to assess overall significance.
๏ฑ Original regressors may not matter: itโ€™s the contrast you are testing
which should be as decorrelated as possible from the rest of the
design matrix
Design efficiency
๏ฑ The aim is to minimize the standard error of a t-contrast
T๏€ฝ
(i.e. the denominator of a t-statistic).
var(cT bห† ) ๏€ฝ ๏ณห† 2cT ( X T X )๏€ญ1 c
cT bห†
var(cT bห† )
๏ฑ This is equivalent to maximizing the efficiency e:
e(๏ณห† 2 , c, X ) ๏€ฝ (๏ณห† 2cT ( X T X )๏€ญ1 c)๏€ญ1
Noise variance
Design variance
๏ฑ If we assume that the noise variance is independent of the specific
design:
๏€ญ1
e(c, X ) ๏€ฝ (c ( X X ) c)
T
T
๏€ญ1
๏ฑ This is a relative measure: all we can really say is that one design is
more efficient than another (for a given contrast).
Design efficiency
A
B
๐‘‹๐‘‡๐‘‹ =
1
โˆ’0.9
โˆ’0.9
1
๐‘ = [1 0]๐‘‡ :
๐‘’ ๐‘, ๐‘‹ = 18.1
๐‘‡
๐‘ = [0.5 0.5] : ๐‘’ ๐‘, ๐‘‹ = 19.0
๐‘ = [1 โˆ’ 1]๐‘‡ : ๐‘’ ๐‘, ๐‘‹ = 95.2
A+B
A-B
๏ฑ High correlation between regressors leads to
low sensitivity to each regressor alone.
๏ฑ We can still estimate efficiently the difference
between them.
Bibliography:
๏ฑ Statistical Parametric Mapping: The Analysis of Functional
Brain Images. Elsevier, 2007.
๏ฑ Plane Answers to Complex Questions: The Theory of Linear Models. R.
Christensen, Springer, 1996.
๏ฑ Statistical parametric maps in functional imaging: a general linear approach.
K.J. Friston et al, Human Brain Mapping, 1995.
๏ฑ Ambiguous results in functional neuroimaging data analysis due to covariate
correlation. A. Andrade et al., NeuroImage, 1999.
๏ฑ Estimating efficiency a priori: a comparison of blocked and randomized
designs. A. Mechelli et al., NeuroImage, 2003.
๏ฑ Example:
Mean
Factor 2
One-way ANOVA
(unpaired two-sample t-test)
images
๏ฑ If X is not of full rank then we can
have Xb1 = Xb2 with b1โ‰  b2 (different
parameters).
๏ฑ The parameters are not therefore
โ€˜uniqueโ€™, โ€˜identifiableโ€™ or โ€˜estimableโ€™.
๏ฑ For such models, XTX is not
invertible so we must resort to
generalised inverses (SPM uses the
pseudo-inverse).
Factor 1
Estimability of a contrast
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1parameters
Rank(X)=2
parameter estimability
๏‚ฎ
(gray b not uniquely specified)
[1 0 0], [0 1 0], [0 0 1] are not estimable.
[1 0 1], [0 1 1], [1 -1 0], [0.5 0.5 1] are estimable.
Three models for the two-samples t-test
1
1
1
1
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
ฮฒ1=y1
ฮฒ2=y2
1
1
1
1
1
1
1
1
[1 1].ฮฒ = y1
ฮฒ1+ฮฒ2=y1 [0 1].ฮฒ = y2
ฮฒ2=y2
[1 0].ฮฒ = y1-y2
[.5 1].ฮฒ = mean(y1,y2)
[1 0].ฮฒ = y1
[0 1].ฮฒ = y2
[0 -1].ฮฒ = y1-y2
[.5 .5].ฮฒ = mean(y1,y2)
1
1
1
1
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
ฮฒ1+ฮฒ3=y1
ฮฒ2+ฮฒ3=y2
[1 0 1].ฮฒ = y1
[0 1 1].ฮฒ = y2
[1 -1 0].ฮฒ = y1-y2
[.5 0.5 1].ฮฒ = mean(y1,y2)
Multidimensional contrasts
Think of it as constructing 3 regressors from the 3 differences and
complement this new design matrix such that data can be fitted in the
same exact way (same error, same fitted data).
Example: working memory
A
Stimulus
B
Stimulus
Response
Stimulus
Response
Response
Time (s)
Time (s)
Time (s)
Correlation = -.65
Efficiency ([1 0]) = 29
C
Correlation = +.33
Efficiency ([1 0]) = 40
Correlation = -.24
Efficiency ([1 0]) = 47
๏ฑ B: Jittering time between stimuli and response.
๏ฑ C: Requiring a response on a randomly half of trials.