Download presentation
Presentation is loading. Please wait.
1
fMRI: Biological Basis and Experiment Design Lecture 22: GLM 101 Which linear equations? Design matrix Solution assuming HIRF, single voxel +==+
2
Linear algebra A 1 x 1 + A 2 x 2 + A 3 x 3 + A 4 x 4 = y Ax = y is the same as where A =x = A 1 A 2 A 3 A 4 x1x2x3x4x1x2x3x4
3
Linear algebra A 1,1 x 1 + A 2,1 x 2 + A 3,1 x 3 + A 4,1 x 4 = y 1 A 1,2 x 1 + A 2,2 x 2 + A 3,2 x 3 + A 4,2 x 4 = y 2 A 1,3 x 1 + A 2,3 x 2 + A 3,3 x 3 + A 4,3 x 4 = y 3 A 1,m x 1 + A 2,m x 2 + A 3,m x 3 + A 4,m x 4 = y m A 1,1 A 2,1 A 3,1 A 4,1 A 1,2 A 2,2 A 3,2 A 4,2 A 1,3 A 2,3 A 3,3 A 4,3 A 1,m A 2,m A 3,m A 4,m A = x = x1x2x3x4x1x2x3x4 y = y1y2y3ymy1y2y3ym stimulus 1 at t=2 response to stimulus 2 time stimulus type
4
A 1,1 A 2,1 A 3,1 A 4,1 A 1,2 A 2,2 A 3,2 A 4,2 A 1,3 A 2,3 A 3,3 A 4,3 A 1,m A 2,m A 3,m A 4,m Linear model for BOLD in a voxel A = x = x1x2x3x4x1x2x3x4 y = y1y2y3ymy1y2y3ym Ax = y Design matrix, [m x n] - m time-points - n stimulus types Data [m x 1] - response through time Responses [n x 1] - for each stimulus, a scalar (single number) representing how well that voxel responds to that stimulus
5
Design matrix stim 1stim 2stim 3 stim 1 stim 2 stim 3 Matrix form for GLM
6
Design matrix: assuming shape of HIRF stim 1stim 2stim 3stim 1stim 2stim 3 = time
7
Design matrix: modeling data A x = stim 1 stim 2 stim 3 BOLD
8
Solving linear model for BOLD in a voxel Ax = y A 1,1 A 2,1 A 3,1 A 4,1 A 1,2 A 2,2 A 3,2 A 4,2 A 1,3 A 2,3 A 3,3 A 4,3 A 1,m A 2,m A 3,m A 4,m A = x = x1x2x3x4x1x2x3x4 y = y1y2y3ymy1y2y3ym Design matrix, [m x n] - m time-points - n stimulus types Data [m x 1] - response through time Responses [n x 1] - for each stimulus, a scalar (single number) representing how well that voxel responds to that stimulus measured known... the answer
9
Solving linear model for BOLD in a voxel Ax = y A T Ax = A T y (A T A) -1 (A T A)x = (A T A) -1 A T y x = (A T A) -1 A T y
10
Solving linear model for BOLD in a voxel x = (A T A) -1 A T y x = (A T A) -1 A T y = 1 0 0.5
11
Linear model for BOLD in a voxel, with noise A(x + ) = y + where A = design matrix [nTimepoints x nStimTypes ], x = concatenated responses [nStimTypes x 1], y = true response [nTimepoints x 1] = noise in data [nTimepoints x 1] = error in estimating response [nStimTypes x 1] Solution: x est = x + = (A T A) -1 A T (y + ), so = (A T A) -1 A T
12
A(x + ) = y + x est = x + = (A T A) -1 A T (y + ) A*x est y + x est = x = 1 0 0.5 0.96 -0.18 0.49
13
Example: block design with linear trend Design matrix:Solution: x = [ 1 ; 0.2]; x est = [ 1.01 ; 0.24 ]
14
Example: block design with linear trend Design matrix:Solution: x = [ -0.5 ; 0.2]; x est = [ -0.46 ; 0.25 ]
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.