This course covers the design, acquisition, and analysis of Functional Magnetic Resonance Imaging (fMRI) data. A book related to the class can be found here: https://leanpub.com/principlesoffmri

Loading...

From the course by Johns Hopkins University

Principles of fMRI 1

329 ratings

This course covers the design, acquisition, and analysis of Functional Magnetic Resonance Imaging (fMRI) data. A book related to the class can be found here: https://leanpub.com/principlesoffmri

From the lesson

Week 3

This week we will discuss the General Linear Model (GLM).

- Martin Lindquist, PhD, MScProfessor, Biostatistics

Bloomberg School of Public Health | Johns Hopkins University - Tor WagerPhD

Department of Psychology and Neuroscience, The Institute of Cognitive Science | University of Colorado at Boulder

Hi.

Â In this module we're going to be talking about noise models that can be included

Â in the GLM.

Â So, again to recap, a standard GLM is written in the following format.

Â We have Y, which is the fMRI data, X, which is the design matrix, beta,

Â which is the regression coefficients, and epsilon, which is the noise.

Â So far in the past couple of modules, we've been talking about model building

Â and how to get the best possible design matrix X.

Â So now what we're going to do is we're going to focus more

Â on the variance-covariance matrix V.

Â So in the last module, we kind of assumed that V was an identity matrix,

Â and that we had IID noise, but in practice in fMRI data analyses,

Â that's typically not true, and we have a sort of autocorrelation between

Â adjacent time points, and so we have to take that into consideration.

Â And so, again, this autocorrelation is typically caused by physiological

Â noise and low frequency drift which hasn't been appropriately modeled.

Â And so typically an fMRI, we use either an autoregressive model,

Â a process of order P, or an ARMA(1,1),

Â autoregressive moving average model of order (1,1), to model the noise.

Â And so single-subject statistics are not going to be valid without

Â an accurate model of the noise, so it's quite important.

Â So let's focus on one particular type of noise model and

Â how it's included in the GLM analysis.

Â We're focusing here mainly on the AR(1) model, so autoregressive model of order 1.

Â So serial correlation is often modeled using such a first-order autoregressive

Â model, and here we have epsilon t is equal to phi times epsilon t-1 plus u of t,

Â while u of t is simply a normal with mean 0 and variance sigma squared.

Â So here, the error term epsilon t depends on the previous error term epsilon t-1 and

Â a new disturbance term, which is given by this u of t.

Â So this kind of looks like a regression model,

Â and that's kind of where it comes from, autoregressive, it's self regressing.

Â So basically it's regressing on its lagged value here.

Â So basically, if we look at the autocorrelation function for

Â an AR(1) process, we see that the autocorrelation between adjacent time

Â points depends on how close different time points are to one another.

Â So basically, the autocorrelation is equal to 1 if the lag is 0.

Â So it's of course perfectly correlated with itself.

Â However, if we have a lag of one time point,

Â the auto-correlation is now equal to phi, which is a constant of the model.

Â And then it decays according to phi to the power of h.

Â So what we see here is phi is equal to 0.7, we'll see that adjacent time points,

Â directly adjacent time points, will have an autocorrelation of 0.7.

Â If the time points are removed, are two points away from each other,

Â the autocorrelation will be 0.7 squared, so 0.49, and

Â the autocorrelation decays as we move farther and farther away from each other.

Â So again, the format of V which we include and which is important in the estimation

Â of the GLM model, it will depend on the noise model that we use.

Â So in the IID case, V is just equal to identity and

Â everything is nice and simple.

Â However, in the AR(1) case we have to incorporate this autocorrelation between,

Â depending on how close time points are to each other.

Â So here V will look like the following case, so it will look a little bit more

Â complicated and it will also be a bit more complicated to estimate because

Â now we also have to estimate phi, which is this autocorrelation component.

Â So, how does this fit into the GLM estimation that we

Â talked about in the last module?

Â Well, again, so this is the GLM model.

Â And this is the estimate.

Â So, basically we need to incorporate V, this autocorrelation,

Â this variance-covariance matrix of this format, into the estimate here.

Â And then using that, we can get the residuals, and

Â use the residuals to estimate things about the variance-covariance matrix.

Â So this is a tricky thing.

Â So this is what we would do if we knew the form.

Â If we knew what V was exactly, if we knew what all the components of V were,

Â we could just estimate beta as in the previous slide.

Â But in general, the form of the variance-covariance matrix is unknown,

Â which means that it has to be estimated.

Â This creates sort of a chicken and egg problem,

Â because estimating V depends on the betas, and estimating the betas depends on V.

Â So in order to kind of solve this chicken and egg problem,

Â we need an iterative procedure.

Â So we begin by assuming a value of V, estimating beta,

Â and then updating our estimate of V, and then iterating between the two.

Â So, we need, therefore, methods for estimating the variance components,

Â and there are many such methods that we can use in practice.

Â These include methods of moments, maximum likelihood methods, and

Â restricted maximum likelihood methods.

Â So here's how one such iterative procedure might work.

Â So, we begin by assuming that V, the variance-covariance matrix,

Â is just equal to identity.

Â So, we assume that the data are uncorrelated with each other.

Â And we just simply calculate the ordinary least-squares solution.

Â Doing that, we can now estimate the parameters of V

Â using the residuals that we got from the OLS.

Â And then we can re-estimate the beta value using the estimated covariance matrix

Â V hat, which we obtained in step 2.

Â Finally, we would iterate this procedure, estimating V hat and

Â beta hat and alternating between the two until we find some sort of convergence.

Â So that's sort of a standard way of doing this type of thing.

Â So incorporating the autocorrelation makes things a little bit more

Â complicated when we assume the data was IID, like we did in the previous module.

Â So how do we estimate in an AR model?

Â Well in the AR model, there's a very simple method of moment style estimator,

Â which are called the Yule-Walker estimates.

Â So basically if we have this AR(1) model,

Â there is a simple closed-form solution for estimating phi and sigma squared,

Â and they're given by the following which was based on the autocovariance function.

Â So we just simply have to calculate the autocovariance function at lag 0 and

Â 1 and plug this in in order to estimate the components of the AR model.

Â So this is a sort of simple way to do it.

Â It's fast and it's very useful in fMRI data analysis.

Â The maximum likelihood type methods are a little bit more

Â computationally cumbersome.

Â And they are obtained by maximizing the log-likelihood, and

Â this is an example of the log-likelihood.

Â And so we just simply have to estimate the parameters associated with V by maximizing

Â this function, and there's many different types of maximization methods you can

Â use to estimate this.

Â Restricted maximum likelihood is similar to maximum likelihood,

Â it's just that we simply have an addition ReML term, or

Â restricted maximum likelihood of variance term.

Â So basically, it's the same sort of procedure, we need to maximize this.

Â We need to find the value of V that make this term as big as possible.

Â So what's the difference between maximum likelihood and

Â restricted maximum likelihood?

Â Well, maximum likelihood maximizes the likelihood of the data, Y, and

Â is typically used to estimate mean parameters, such as beta.

Â However, it can produce biased estimates of the variance.

Â So in the ANOVA setting the estimate

Â would be 1 over n times the sum of squared differences between the mean.

Â Restricted maximum likelihood, on the other hand, maximizes the likelihood

Â of the residuals, so, this can be used to estimate variance parameters.

Â And they're very useful because they provide unbiased

Â estimate of the various parameters.

Â So, if you see, for example, in the ANOVA case, what we would have is we would have,

Â instead of dividing by n, we would divide by 1 over n-1.

Â And this provides an unbiased estimate of the variance components.

Â So, that's one of the benefits of restricted maximum likelihood.

Â So, many people tend to like to use restricted maximum likelihood because

Â they tend to give unbiased estimates of the variance components.

Â So further, if we were to fit such an AR model across then whole brain,

Â in this case I'm fitting an AR(2) model, so I have two phis.

Â Phi 1 is for the point that's one lag removed and phi 2 is for two lags removed.

Â But otherwise it's similar to the AR(1) model that we talked about.

Â But the reason I'm showing this slide is I'm showing the parameters of the model,

Â phi 1 and phi 2 and sigma, actually vary across the brain.

Â So this implies that the same autocorrelation model is not going to

Â hold true across the entire brain.

Â So for example, you'll see that the autocorrelation seems to vary

Â depending on, say, tissue type and where in the brain you're located.

Â So that therefore we have to kind of fit a separate autocorrelation function for

Â every voxel of the brain,

Â and this can become quite computationally cumbersome in the long run.

Â And it also complicates analysis somewhat.

Â Okay, so this is the end of this module.

Â We've talked about different noise models and

Â how they can be incorporated into our GLM estimate.

Â Okay, in the next module we'll talk a little bit about performing inference

Â with the GLM model.

Â I'll see you then, bye.

Â Coursera provides universal access to the worldâ€™s best education,
partnering with top universities and organizations to offer courses online.