Stats in SPM12

Stats in SPM12

September 7, 2023
SPM12 statistical analysis

Specify the stats

All steps could be completed in BATCH.

Sepecify 1st level Model (to images) #

[生成一个 SPM.mat file]

Directory:SPM.mat file containing the specified design matrix will be written. (写入结果 SPM.mat 的地方) (Individual-level 可以放在单个subject的子文件夹内;group-level 可以放在与subject并列的文件夹内)

Time parameters:

  • Units for design: Scans or seconds, 根据实验需要(我的实验使用seconds)

  • Interscan interval: TR

  • Microtime resolution: Default

  • Microtime onset: Default

Data & Design:

  • Subjects/Session: Day1 和 Day2 各有一个条件
  • Scans: Smoothing之后的EPI (swu)
  • Durations: block的持续时间(Event-related response):0
  • Time Modulation: Default
  • Parametric Modulations: Default
  • Orthogonal Modulations: Default

  • Multiple conditions: You will need to create a *.mat file containing the relevant information. This .mat file must include the following cell arrays: names, onsets and durations eg. names{2}=’SSent-DSpeak’,onsets{2}=[3 5 19 222], durations{2}=[0 0 0 0] contain the required details of the second condition. These cell arrays may be made available by your stimulus delivery program eg. CO- GENT. The duration vectors can contain a single entry if the durations are identical for all events.

  • High-pass filter: 最长的两个相同的刺激之间的时间的两倍 (设立一个跨越很长时间的regressor)Default

Time domain regressor中:ß 是高度


-Factorial design: Default -Basis Functions: Canonical HRF -Model Interactions (Volterra): Do not model Interactions -Global normalisation: None -Masking threshold: 0.8 -Explicit mask: Default -Serial correlations: AR(1)

Estimate stats Model #

只需要选择 SPM.mat

和 Model Specification相比,Estimate的 matrix 有一些变白的部分:

Y(データ時系列)=X(計画行列/デザインマトリックス)*β(パラメータ推定値) + ε(誤差)


结果的表示 #

选择 Estimate 产生的 SPM.mat

make contrast

选择想要查看的contrast,点击done:

  • apply masking:Default [None]
  • P value adjustment to control
  • threshold {T or p value}: 0.001
  • & extent threshold {voxels}: Default [None]

Peak level:特定区域中是否存在最显著的数据点(peak)

Cluster level:整个图像中或特定区域内是否形成的显著聚类(cluster)


之前产生的文件:

beta_000*.nii: beta images that betas best fit the regressors. 数量和所有regressor的数量相同(包括constant) The size of the best fit

mask.nii: parts of the image that were actually included in the analysis.

Contrast Manager Introduction #

点击 Result ➡️ Navigate SPM.mat ➡️ 打开 SPM Contrast Manager 窗口

Define a new contrast: t-contrast (subtracting one set of betas from another

Input Name, Type, Contrast:

当一个contrast制作完成,点击Done:

Apply Masking:mask off 不感兴趣的区域

  • None: 没有mask off,whole brain analysis
  • Contrast: 用一个新 contrast 来 mask off
  • Images, Altas

p value adjustment to control:

  • FWE: 进行校正的原因有两个:脑中的各个voxel是相互关联的,不是独立的;尽管p<0.05是一个比较小的值,但是检验每个voxel需要成千上万次t-test,因此用FWE进行校正

Extend threshold: 只选择那些处于 large clusters of significant voxels 的 voxels。(e.g.如果设为10,就只选择附近至少10个 voxels 都 significant 的voxel). (0代表显示全部significant voxel)。

Glass brain view: