Spectral Analysis for Neural Signals

Embed Size (px)

Citation preview

  • 7/29/2019 Spectral Analysis for Neural Signals

    1/11

    2008 Pesaran

    Spectral Analysis for Neural Signals

    Bijan Psaran, PhDCenter for Neural Science, New York University

    New York, New York

  • 7/29/2019 Spectral Analysis for Neural Signals

    2/11

  • 7/29/2019 Spectral Analysis for Neural Signals

    3/11

    3

    NoteS

    Spcral Analysis fr Nural Signals

    2008 Pesaran

    IntroductionThis chapter introduces concepts undamental tospectral analysis and applies spectral analysis to char-acterize neural signals. Spectral analysis is a orm otime series analysis and concerns a series o events

    or measurements that are ordered in time. The goalo such an analysis is to quantitatively characterizethe relationships between events and measurementsin a time series. This quantitative characterizationis needed to derive statistical tests that determinehow time series differ rom one another and howthey are related to one another. Time series analysiscomprises two main branches: time-domain methodsand requency-domain methods. Spectral analysis isa requency-domain method or which we will usethe multitaper ramework (Thomson, 1982; Percivaland Walden, 1993). The treatment here also drawson other sources (Brillinger, 1978; Jarvis and Mitra,

    2001; Mitra and Bokil, 2007).

    In this chapter, we will ocus on relationshipswithin and between one and two time series, knownas univariate and bivariate time series. Throughoutthis discussion, we will illustrate the concepts withexperimental recordings o spiking activity andlocal eld potential (LFP) activity. The chapter onMultivariate Neural Data Sets will extend the treat-ment to consider several simultaneously acquiredtime series that orm a multivariate time series, suchas in imaging experiments. The chapter on Appli-cation o Spectral Methods to Representative Data

    Sets in Electrophysiology and Functional Neuro-imaging will review some o this material andpresent additional examples.

    First we begin by motivating a particular problemin neural signal analysis that rames the examples inthis chapter. Second, we introduce signal processingand the Fourier transorm and discuss practical issuesrelated to signal sampling and the problem o alias-ing. Third, we present stochastic processes and theircharacterization through the method o moments.The moments o a stochastic process can be char-acterized in both the time domains and requencydomains, and we will discuss the relation betweenthese characterizations. Subsequently, we present theproblem o scientic inerence, or hypothesis test-ing, in spectral analysis through the consideration oerror bars. We nish by considering an application ospectral analysis involving regression.

    MotivationWhen a microelectrode is inserted into the brain,the main eatures that are visible in the extracellularpotential it measures are the spikes and the rhythmsthey ride on. The extracellular potential results rom

    currents fowing in the extracellular space, which inturn are produced by transmembrane potentials inlocal populations o neurons. These cellular eventscan be ast, around 1 ms or the action potentialsthat appear as spikes, and slow, up to 100 ms, or thesynaptic potentials that predominantly give rise tothe LFP. How spiking and LFP activity encode thesensory, motor, and cognitive processes that guidebehavior, and how these signals are related, are un-damental, open questions in neuroscience (Steriade,2001; Buzsaki, 2006). In this chapter, we will illus-trate these analysis techniques using recordings ospiking and LFP activity in macaque parietal cortexduring the perormance o a delayed look-and-reachmovement to a peripheral target (Pesaran et al.,2002). This example should not be taken to limit thescope o potential applications, and other presenta-tions will motivate other examples.

    The Basics of Signal ProcessingSpiking and LFP activity are two dierent kinds otime series, and all neural signals all into one othese two classes. LFP activity is a continuous processand consists o a series o continuously varying volt-ages in time, x

    t. Spiking activity is a point process,

    and, assuming that all the spike events are identical,consists o a sequence o spike times. The countingprocess,N

    t, is the total number o events that occur

    in the process up to a time, t. The mean rate o theprocess, , is given by the number o spike eventsdivided by the duration o the interval. I we consider

    a suciently short time interval, t = 1 ms, either aspike event occurs or it does not. Thereore, we canrepresent a point process as the time derivative othe counting process, dN

    t, which gives a sequence o

    delta unctions at the precise time o each spike, tn. We

    can also represent the process as a sequence o timesbetween spikes,

    n= t

    n+1- t

    n, which is called an inter-

    val process. These representations are equivalent butcapture dierent aspects o the spiking process. Wewill ocus on the counting process, dN

    t. dN

    t= 1t

    when there is a spike and dNt=t elsewhere. Note

    that these expressions correct or the mean ring rateo the process. As we will see, despite the dierencesbetween point and continuous processes, spectralanalysis treats them in a unied way. The ollowingsections present some basic notions that underliestatistical signal processing and time series analysis.

    Fourier transformsTime series can be represented by decomposing theminto a sum o elementary signals. One domain orsignals, which we call the time domain, is simplyeach point in time. The time series is represented byits amplitude at each time point. Another domainis the requency domain and consists o sinusoidal

  • 7/29/2019 Spectral Analysis for Neural Signals

    4/11

    4

    NoteS

    2008 Pesaran

    unctions, one or each requency. The process is rep-resented by its amplitude and phase at each requency.The time and requency domains are equivalent,and we can transorm signals between them usingthe Fourier transorm. Fourier transorming a signalthat is in the time domain, x

    t

    , will give the values othe signal in the requency domain, ~x(f). The tildedenotes a complex number with amplitude and phase.

    x(f) =exp(2iftn)N

    t = 1

    ~

    Inverse Fourier transorming ~x(f) transorms it tothe time domain. To preserve all the eatures in theprocess, these transorms need to be carried out overan innite time interval. However, this is neverrealized in practice. Perorming Fourier transormson nite duration data segments distorts eatures inthe signal and, as we explain below, spectral estima-tion employs data tapers to limit these distortions.

    Nyquist frequency, samplingtheorem, and aliasingBoth point and continuous processes can be repre-sented in the requency domain. When we sample aprocess, by considering a suciently short interval intime, t, and measuring the voltage or the presenceor absence o a spike event, we are making anassumption about the highest requency in the pro-cess. For continuous processes, the sampling theorem

    states that when we sample an analog signal that isband-limited, so that it contains no requenciesgreater than the Nyquist rate (B Hz), we canperectly reconstruct the original signal i we sample

    at a sampling rate, Fs= 1

    t, o at least 2B Hz. The

    original signal is said to be band-limited because itcontains no energy outside the requency band givenby the Nyquist rate. Similarly, once we sample asignal at a certain sampling rate, F

    s, the maximum

    requency we can reconstruct rom the sampled

    signal is called the Nyquist requency,

    Fs12

    .

    The Nyquist requency is a central property o allsampled, continuous processes. It is possible to sam-ple the signal more requently than the bandwidth othe original signal, with a sampling rate greater thantwice the Nyquist rate, without any problems. This iscalled oversampling. However, i we sample the sig-nal at less than twice the Nyquist rate, we cannotreconstruct the original signal without errors. Errorsarise because components o the signal that exist at ahigher requency than F

    s1

    2become aliased into

    lower requencies by the process o sampling the sig-nal. Importantly, once the signal has been sampled atF

    s, we can no longer distinguish between continuous

    processes that have requency components greater

    than the Nyquist requency o Fs

    1

    2

    . To avoid the

    problem o aliasing signals rom high requencies intolower requencies by digital sampling, an anti-aliasing lter is oten applied to continuous analogsignals beore sampling. Anti-aliasing lters act tolow-pass the signal at a requency less than the

    Nyquist requency o the sampling.

    Sampling point processes does not lead to the sameproblems as sampling continuous processes. Themain consideration or point processes is that thesampled point process be orderly. Orderliness isachieved by choosing a suciently short time inter-val so that each sampling interval has no more thanone event. Since this means that there are only twopossible outcomes to consider at each time step, 0and 1, analyzing an orderly point process is simplerthan analyzing a process that has multiple possibleoutcomes, such as 0, 1, and 2, at each time step.

    Method of moments for stochasticprocesses

    Neural signals are variable and stochastic owing tonoise and the intrinsic properties o neural ring.Stochastic processes (also called random process-es) can be contrasted with deterministic processes,which are perectly predictable. Deterministicprocesses evolve in exactly the same way rom a par-ticular point. In contrast, stochastic processes aredescribed by probability distributions that governhow they evolve in time. Stochastic processes evolveto give a dierent outcome, even i all the sampleso the process originally started rom the same point.This is akin to rolling dice on each trial to deter-mine the neural activity. Each roll o the dice is arealization rom a particular probability distribution,and it is this distribution that determines the proper-

    ties o the signal. When we measure neural signals torepeated trials in an experiment, we assume that thesignals we record on each trial are dierent realizations

    or outcomes o the same underlying stochastic process.

    Another powerul simplication is to assume thatthe properties o the stochastic process generatingthe neural signals within each trial are stationaryand that their statistical properties dont change withtimeeven within a trial. This is clearly not strictlytrue or neural signals because o the nonstationaritiesin behavior. However, under many circumstances, areasonable procedure is to weaken the stationarity

  • 7/29/2019 Spectral Analysis for Neural Signals

    5/11

    5

    NoteS

    Spcral Analysis fr Nural Signals

    2008 Pesaran

    assumption to short-time stationarity. Short-timestationarity assumes that the properties o thestochastic process have stationarity or short timeintervals, say 300-400 ms, but change on longer timescales. In general, the window or spectral analysis ischosen to be as short as possible to remain consistent

    with the spectral structure o the data; this windowis then translated in time. Fundamental to time-requency representations is the uncertainty prin-ciple, which sets the bounds or simultaneousresolution in time and requency. I the time-requency plane is tiled so as to provide timeand requency resolutions t = N by f = W, then

    NW 1. We can then estimate the statistical prop-erties o the stochastic process by analyzing shortsegments o data and, i necessary and reasonable,averaging the results across many repetitions ortrials. Examples o time-requency characterizationsare given below. Note that this presentation uses

    normalized units. This means that we assume thesampling rate to be 1 and the Nyquist requencyinterval to range rom to . The chapter Appli-cation o Spectral Methods to Representative DataSets in Electrophysiology and Functional Neuro-imaging presents the relationships below in units otime and requency.

    Spectral analysis depends on another assumption:that the stochastic process which generates the neu-ral signals has a spectral representation.

    xt = x(f)exp(2ift)df

    ~

    Remarkably, the same spectral representation canbe assumed or both continuous processes (like LFPactivity) and point processes (like spiking activity),so the Fourier transorm o the spike train, t

    n, is

    as ollows:

    dN(f) =exp(2iftn)N

    n = 1

    ~

    The spectral representation assumes that underlyingstochastic processes generating the data exist in therequency domain, but that we observe their real-izations as neural signals, in the time domain. As aresult, we need to characterize the statistical proper-ties o these signals in the requency domain: This isthe goal o spectral analysis.

    The method o moments characterizes the statisti-cal properties o a stochastic process by estimatingthe moments o the probability distribution. The rstmoment is the mean; the second moments are the

    variance and covariance (or more than one timeseries), and so on. I a stochastic process is a Gaussianprocess, the mean and variance or covariances com-pletely speciy it. For the spectral representation, weare interested in the second moments. The spectrumis the variance o the ollowing process:

    SX(f)(f f) = E[x*(f)x(f)]~ ~

    SdN(f)(f f) = E[dN*(f)dN(f)]

    ~ ~

    The delta unction indicates that the process isstationary in time. The asterisk denotes complexconjugation. The cross-spectrum is the covariance otwo processes:

    SXY(f)(f f) = E[x*(f)y(f)]~ ~

    The coherence is the correlation coecient betweeneach process at each requency and is simply thecovariance o the processes normalized bytheir variances.

    CXY(f) =SXY(f)

    Sx(f)Sy(f)

    This ormula represents the cross-spectrum betweenthe two processes, divided by the square root o

    the spectrum o each process. We have written thisexpression or two continuous processes; analo-gous expressions can be written or pairs o point-continuous processes or point-point processes bysubstituting the appropriate spectral representation.Also, we should note that the assumption o station-arity applies only to the time interval during whichwe carry out the expectation.

    Multitaper spectral estimationThe simplest estimate o the spectrum, called the

    periodogram, is proportional to the square o the datasequence, |~x

    tr

    (f )|2. This spectral estimate suersrom two problems. The rst is the problem o bias.This estimate does not equal the true value o thespectrum unless the data length is innite. Bias arisesbecause signals at dierent requencies are mixedtogether and blurred. This bias comes in two orms:narrow-band bias and broad-band bias.Narrow-bandbias reers to bias in the estimate due to mixing sig-nals at dierent nearby requencies. Broad-band biasreers to mixing signals at dierent requencies atdistant requencies. The second problem is theproblem o variance. Even i the data length were

  • 7/29/2019 Spectral Analysis for Neural Signals

    6/11

    6

    NoteS

    2008 Pesaran

    innite, the periodogram spectral estimate wouldsimply square the data without averaging. As aresult, it would never converge to the correct valueand would remain inconsistent.

    Recordings o neural signals are oten sucientlylimited so that bias and variance can presentmajor limitations in the analysis. Bias can bereduced, however, by multiplying the data by a datataper, w

    t, beore transorming to the requency-

    domain, as ollows:

    x(f) = wtxtexp(2ift)N

    t = 1

    ~

    Using data tapers reduces the infuence o distantrequencies at the expense o blurring the spectrumover nearby requencies. The result is an increase innarrow-band bias and a reduction in broad-band bias.This practice is justied under the assumption thatthe true spectrum is locally constant and approxi-mately the same or nearby requencies. Variance isusually addressed by averaging overlapping segmentso the time series. Repetitions o the experiment alsogive rise to an ensemble over which the expectationcan be taken, but this precludes the assessment osingle-trial estimates.

    An elegant approach toward the solution o boththe above problems has been oered by the multi-

    taper spectral estimation method, in which the dataare multiplied by not one, but several, orthogonaltapers and Fourier-transormed in order to obtainthe basic quantity or urther spectral analysis. Thesimplest example o the method is given by thedirect multitaper estimate, S

    MT(f), dened as the

    average o individual tapered spectral estimates,

    xk(f) =

    wt(k)x texp(2ift)

    N

    t = 1

    ~

    SMT(f) = |xk(f)|2

    K

    k = 1

    ~1K

    The wt(k) (k = 1, 2, , K) constitute Korthogo-

    nal taper unctions with appropriate properties.A particular choice or these taper unctions, withoptimal spectral concentration properties, is given bythe discrete prolate spheroidal sequences, which wewill call Slepian unctions (Slepian and Pollack,1961). Let w

    t(k, W, N) be the kth Slepian unction

    o lengthN and requency bandwidth parameter W.The Slepians would then orm an orthogonal basisset or sequences o length,N, and be characterized

    by a bandwidth parameter W. The important eatureo these sequences is that, or a given bandwidthparameter W and taper length N, K = 2NW 1sequences, out o a total oN, each having theirenergy eectively concentrated within a range[W, W] o requency space.

    Consider a sequence wt

    o length N whose Fouriertransorm is given by the ormula

    U(f) = wtexp(2ift).N

    t = 1

    Then we can consider

    the problem o nding sequences wtso that the spec-

    tral amplitude U(f) is maximally concentrated in theinterval [W, W]. Maximizing this concentration pa-rameter, subject to constraints, yields a matrix eigen-value equation or w

    t(k, W, N). The eigen-

    vectors o this equation are the Slepians. Theremarkable act is that the rst 2NW eigenvalues

    k(N,W) (sorted in descending order) are each

    approximately equal to 1, while the remainderapproximate zero. The Slepians can be shited inconcentration rom [W, W] centered around zerorequency to any nonzero center requency interval[f

    0 W,f

    0+ W]

    by simply multiplying by the appro-

    priate phase actor exp(2if0t)an operation known

    as demodulation.

    The usual strategy is to select the desired analy-sis hal-bandwidth W to be a small multiple o

    the Raleigh requency 1/N, and then to take theleading 2NW 1 Slepian unctions as data tapersin the multitaper analysis. The remaining unctionshave progressively worsening spectral concentra-tion properties. For illustration, in the let column oFigure 1, we show the rst our Slepian unctionsor W = 5/N. In the right column, we show thetime series example rom the earlier subsectionmultiplied by each o the successive data tapers. Inthe let column o Figure 2, we show the spectra othe data tapers themselves, displaying the spectralconcentration property. The vertical marker denotesthe bandwidth parameter W. Figure 2 also shows the

    magnitude-squared Fourier transorms o the taperedtime series presented in Figure 1. The arithmeticaverage o these spectra or k = 1, 2, . . . , 9 (note thatonly 4 o 9 are shown in Figs. 1 and 2) gives a directmultitaper estimate o the underlying process.

    Figure 3A shows the periodogram estimate o thespectrum based on a single trial o LFP activity dur-ing the delayed look-and-reach task. The variabilityin the estimate is signicant. Figure 3B presents themultitaper estimate o the spectrum on the samedata with W= 10 Hz, averaged across 9 tapers. This

  • 7/29/2019 Spectral Analysis for Neural Signals

    7/11

    7

    NoteS

    Spcral Analysis fr Nural Signals

    2008 Pesaran

    estimate is much smoother and reveals the presenceo two broad peaks in the spectrum, at 20 Hz and60 Hz. Figure 3C shows the multitaper spectrumestimate on the same data with W = 20 Hz. Thisestimate is even smoother than the 10 Hz, whichrefects the increased number o tapers available to

    average across (19 tapers instead o 9). However,the assumption that the spectrum is constant withthe 20 Hz bandwidth is clearly wrong and leads tonoticeable distortion in the spectrum, in the orm oa narrow-band bias. Figure 3D shows the multitaper

    estimate with bandwidth W= 10 Hz averaged across9 trials. Compared with Figure 3B, this estimate isnoticeably smoother and contains the same requency

    resolution. This series illustrates the advantages omultitaper estimates and how they can be used toimprove spectral resolution.

    Bandwidth selectionThe choice o the time window length N and thebandwidth parameter W is critical or applications.

    No simple procedure can be given or these choices,which in act depend on the data set at hand, and

    are best made iteratively using visual inspection andsome degree o trial and error. 2NWgives the num-ber o Raleigh requencies over which the spectralestimate is eectively smoothed, so that the vari-ance in the estimate is typically reduced by 2NWThus, the choice oW is a choice o how much tosmooth. In qualitative terms, the bandwidth param-eter should be chosen to reduce variance while notoverly distorting the spectrum by increasing narrow-band bias. This can be done ormally by trading o anappropriate weighted sum o the estimated varianceand bias. However, as a rule, we nd xing the timebandwidth productNWat a small number (typically

    Figur 1. Slepian unctions in the time domain. Let panels: Firstour Slepian unctions or NW = 5. Right panels: Data sequence

    multiplied by each Slepian data taper on let.

    Figur 2. Slepian unctions in the requency domain. Let panel:

    spectra o Slepian unctions rom let panels o Figure 1. Right panel:

    spectra o data rom right panels o Figure 1.

    Figur 3. Spectrum o LFP activity in macaque lateral intra-

    parietal area (LIP) during delay period beore a saccade-and-reach

    to preerred direction. A, Single trial, 500 ms periodogram

    spectrum estimate. B, Single trial, 500 ms, 10 Hz multitaper spec-

    trum estimate. C, Single trial, 500 ms, 20 Hz multitaper spectrum

    estimate. D, Nine-trial average, 500 ms, 10 Hz multitaper spec-

    trum estimate. a.u. = arbitrary units.

    A

    C

    B

    D

  • 7/29/2019 Spectral Analysis for Neural Signals

    8/11

    8

    NoteS

    2008 Pesaran

    3 or 4), and then varying the window length in timeuntil sucient spectral resolution is obtained, to be areasonable strategy. It presupposes that the data areexamined in the time-requency plane so thatN maybe signicantly smaller than the total data length.

    Figure 4 illustrates these issues using two spectrogramestimates o the example LFP activity averaged across9 trials. Each trial lasts approximately 3 s and consistso a 1 s baseline period, ollowed by a 11.5 s delayperiod, during which a movement is being planned.The look-reach movement is then executed. Eachspectrogram is shown with time on the horizontalaxis, requency on the vertical axis, and power color-coded on a log base-10 scale. Figure 4A shows thespectrogram estimated using a 0.5 s duration analysiswindow and a 10 Hz bandwidth. The time-requencytile this represents is shown in the white rectangle.

    This estimate clearly shows the sustained activityollowing the presentation o the spatial cue at 0 sthat extends through the movements execution.Figure 4B shows a spectrogram o the same dataestimated using a 0.2 s duration analysis windowand a 25 Hz bandwidth. The time-requency tile orthis estimate has the same area as Figure 4A, so eachestimate has the same number o degrees o ree-dom. However, there is great variation in the time-requency resolution trade-o between theseestimates: Figure 4B better captures the transients inthe signal, at the loss o signicant requency resolu-tion that distorts the nal estimate. Ultimately, the

    best choice o time-requency resolution will dependon the requency band o interest, the temporaldynamics in the signal, and the number o trialsavailable or increasing the degrees o reedom o agiven estimate.

    Calculating error barsThe multitaper method coners one importantadvantage: It oers a natural way o estimatingerror bars corresponding to most quantities obtainedin time series analysis, even i one is dealing with an

    individual instance within a time series. Error barscan be constructed using a number o procedures, butbroadly speaking, there are two types. The unda-mental notion common to both types o error barsis the local requency ensemble. That is, i the spec-trum o the process is locally fat over a bandwidth2W, then the tapered Fourier transorms ~x

    k(f) con-

    stitute a statistical ensemble or the Fourier transormo the process at the requency, f

    o. This locally fat

    assumption and the orthogonality o the data tapersmean that the ~x

    k(f) are uncorrelated random vari-

    ables having the same variance. This provides oneway o thinking about the direct multitaper estimate

    presented in the previous sections: The estimate con-sists o an average over the local requency ensemble.

    The rst type o error bar is the asymptotic error bar.For largeN, ~x

    k(f) may be assumed to be asymptoti-

    cally, normally distributed under some generalcircumstances. As a result, the estimate o the spec-trum is asymptotically distributed according to a 2

    dof

    distribution scaled by

    S(f)

    dof . The number o degreeso reedom (dof) is given by the total number o datatapers averaged to estimate the spectrum. This wouldequal the number o trials multiplied by the number

    o tapers.

    For the second type o error bar, we can use thelocal requency ensemble to estimate jackknie errorbars or the spectra and all other spectral quantities(Thomson and Chave, 1991; Wasserman, 2007). Theidea o the jackknie is to create dierent estimatesby, in turn, leaving out a data taper. This creates aset o spectral estimates that orms an empirical dis-tribution. A variety o error bars can be constructedbased on such a distribution. I we use a variance-stabilizing transormation, the empirical distribution

    can be well approximated using a Gaussian distribu-tion. We can then calculate error bars according tothe normal interval by estimating the variance othe distribution and determining critical values thatset the error bars. Inverting the variance-stabilizingtransormation gives us the error bars or the originalspectral estimate. This is a standard tool in statisticsand provides a more conservative error bar than theasymptotic error bar. Note that the degree to whichthe two error bars agree constitutes a test o how wellthe empirical distribution ollows the asymptoticdistribution. The variance-stabilizing transorma-

    Figur 4. Spectrogram o LFP activity in macaque LIP averaged

    across 9 trials o a delayed saccade-and-reach task. Each trial is

    aligned to cue presentation, which occurs at 0 s. Saccade and reach

    are made at around 1.2 s. A, Multitaper estimate with duration o

    500 ms and bandwidth o 10 Hz. B, Multitaper estimate with dura-

    tion o 200 ms and bandwidth 25 Hz. White rectangle shows then

    time-requency resolution o each spectrogram. The color bar shows

    the spectral power on a log scale in arbitrary units.

    A B

  • 7/29/2019 Spectral Analysis for Neural Signals

    9/11

    9

    NoteS

    Spcral Analysis fr Nural Signals

    2008 Pesaran

    tion or the spectrum is the logarithm. The variance-stabilizing transormation or the coherence, themagnitude o the coherency, is the arc-tanh.

    As an example, Figure 5A shows asymptotic andFigure 5B empirical jackknie estimates o the spec-tral estimate illustrated in Figure 3D. These are95% condence intervals and are largely the samebetween the two estimates. This similarity indicatesthat, or these data, the sampling distribution o thespectral estimate ollows the asymptotic distributionacross trials and data tapers. I we were to reduce theestimates number o degrees o reedom by reducingthe number o trials or data tapers, we might expectto see more deviations between the two estimates,with the empirical error bars being larger than theasymptotic error bars.

    Correlation functionsNeural signals are oten characterized in terms ocorrelation unctions. Correlation unctions areequivalent to computing spectral quantities but withimportant statistical dierences. For stationary pro-cesses, local error bars can be imposed or spectralestimates in the requency domain. This is not trueor correlation unctions, even assuming stationarity,because error bars or temporal correlation unctionsare nonlocal. Nonlocality in the error bars means thatuncertainty about the correlation unction at one lagis infuenced by the value o the correlation unctionacross other lags. The precise nature o the nonlocality

    relies on the temporal dependence within theunderlying process. Consequently, correlation unc-tion error bars must be constructed by assuming thereare no dependencies between dierent time bins.This is a ar more restrictive assumption than theone holding that neighboring requencies are locallyfat and rarely achieved in practice. Other problemsassociated with the use o correlation unctions are

    that i the data contain oscillatory components, theyare compactly represented in requency space andlead to nonlocal eects in the correlation unction.Similar arguments apply to the computation o corre-lation unctions or point and continuous processes.One exception is or spiking examples in which thereare sharp eatures in the time-domain correlationunctions, e.g., owing to monosynaptic connections.Figure 6 illustrates the dierence between using spec-tral estimates and correlation unctions. Figure 6Ashows the spectrum o spiking activity recordedin macaque parietal cortex during a delay periodbeore a coordinated look-and-reach. The durationo the spectral estimate is 500 ms, the bandwidth is30 Hz, and the activity is averaged over nine trials.Thin lines show the empirical 95% confdence inter-vals. Figure 6B shows the auto-correlation unction

    or the same data, revealing some structure aroundshort lags and inhibition at longer lags. There is ahint o some ripples, but the variability in the esti-mate is too large to see them clearly. This is not toosurprising, because the correlation unction estimateis analogous to the periodogram spectral estimate,which also suers rom excess statistical variability.In contrast, the spectrum estimate clearly revealsthe presence o signifcant spectral suppression and abroad spectral peak at 80 Hz. The dotted line showsthe expected spectrum rom a Poisson process havingthe same rate.

    CoherenceThe idea o a local requency ensemble motivatesmultitaper estimates o the coherence between two-point or continuous processes. Given two time series

    Figur 5. 95% confdence error bars or LFP spectrum shownin Figure 3D. A, Asymptotic error bars assuming chi-squared

    distribution. B, Empirical error bars using leave-one-out jack-

    knie procedure.

    A B

    Figur 6. Spike spectrum and correlation unction o spikingactivity in macaque LIP during delay period beore a saccade-and-

    reach to the preerred direction. A, Multitaper spectrum estimateduration o 500 ms; bandwidth 15 Hz averaged across 9 trials. Thin

    lines show 95% confdence empirical error bars using leave-one-out

    procedure. Dotted horizontal line shows fring rate. B, Correlation

    unction estimate rom which shit predictor has been subtracted.

    a.u. = arbitrary units.

    A B

  • 7/29/2019 Spectral Analysis for Neural Signals

    10/11

    10

    NoteS

    2008 Pesaran

    and the corresponding multiple tapered Fourier trans-orms ~x

    k(f ), ~y

    k(f ), the ollowing direct estimates can

    be dened or the coherence unction:

    xk(f)yk(f)k

    ~

    CXY(f) =

    ~1

    K

    *

    Sx(f)Sy(f)

    This denition allows us to estimate the coherencerom a single trial. Estimating the coherence presentsmany o the same issues as estimating the spectrum,except that more degrees o reedom are neededto ensure a reasonable estimate. In common withspectrum estimates, the duration and bandwidth othe estimator need to be chosen to allow sucientdegrees o reedom in the estimator. Increasing the

    number o trials will increase the eective resolutiono the estimate.

    Figure 7 shows the coherence and correlationsbetween two simultaneously recorded spiketrains rom macaque parietal cortex averagedover nine trials. Figure 7A shows the coherenceestimated with 16 Hz bandwidth. The horizontaldotted line represents expected coherence or thisestimator when there is no coherence between thespike trains. The coherence signicantly exceeds thisthreshold, as shown by the 95% condence inter-vals, in a broad requency band. Figure 7B illustratesthe coherence estimated with a 30 Hz bandwidth.The variability in the estimate is reduced, as is thenoise foor o the estimator, as shown by the lowerhorizontal dotted line. Figure 7C shows the cross-correlation unction or these data. Here, too, there

    is structure in the estimate, but the degree o vari-ability lowers the power o the analysis.

    Regression using spectral featurevectors

    Detection o period signals is an important problemthat occurs requently in the analysis o neural data.Such signals can arise as a result o periodic stimu-lation and can maniest as 50/60 Hz line noise. Wepursue the eects o periodic stimulation in the mul-tivariate case in the next chapter Multivariate NeuralData Sets: Image Time Series, Allen Brain Atlas. Asdiscussed therein, certain experiments that have noinnate periodicity may also be cast into a orm thatmakes them amenable to analysis as periodic stimuli.We now discuss how such components may be de-tected and modeled in the univariate time series byperorming a regression on the spectral coefcients.

    Periodic components are visible in preliminaryestimates as sharp peaks in the spectrum, which, ormultitaper estimation with Slepians, appear with fattops owing to narrow-band bias. Consider one suchsinusoid embedded in colored noise:

    x(t) =A cos(2f t + ) + (t)

    It is customary to apply a least-squares procedure toobtain A and , by minimizing the sum o squares

    |x(t) A cos(2f0t + )|2

    t

    . However, this is anonlinear procedure that must be perormed numeri-cally; moreover, it eectively assumes a white-noisespectrum. Thomsons F-test oers an attractivealternative within the multitaper ramework byreducing the line-tting procedure to a simplelinear regression.

    Starting with a data sequence containingN samples,multiplying both sides o the equation by a Slepiantaper w

    k(t) with bandwidth parameter 2W, and Fou-

    rier transorming, one obtains this result:

    xk(f) = Uk(f f0)+ *Uk(f f0) + Nk(f)

    Here = A exp(i) and Uk(f) and N

    k(f) are the

    Fourier transorms owk(f) and (t), respectively. Ifo

    is larger than the bandwidth W, thenf-fo

    andf+fo

    are separated by more than 2W, and Uk(f-f

    o) and

    Uk(f+f

    o) have minimal overlap. In that case, one

    can setf=foand neglect the U

    k(f+f

    o) term to obtain

    the ollowing linear regression equation atf=fo:

    xk(f) = Uk(0) + Nk(f0)

    Figur 7. Spike coherence and cross-correlation unction or

    spiking activity o two simultaneously recorded neurons in macaque

    LIP during delay period beore a saccade-and-reach to the preerred

    direction or both cells. A, Multitaper coherence estimate duration

    o 500 ms; bandwidth 16 Hz averaged across 9 trials. Thin lines

    show 95% confdence empirical error bars using leave-one-out

    procedure. Dotted horizontal line shows expected coherence under

    the null hypothesis that coherence is zero. B, Multitaper coherence

    estimate duration o 500 ms; bandwidth 30 Hz averaged across 9

    trials. Conventions as or A. C, Cross-correlation unction estimate

    rom which shit predictor has been subtracted.

    A CB

  • 7/29/2019 Spectral Analysis for Neural Signals

    11/11

    11

    NoteS

    Spcral Analysis fr Nural Signals

    2008 Pesaran

    The solution is given by

    (f0) =

    Uk(0)xk(f0)k = 1

    ~K

    |Uk(0)|2k = 1

    K

    The goodness o t o this model may be testedusing an F-ratio statistic with (2, 2K 2) degreeso reedom, which is usually plotted as a unction orequency to determine the position o the signicantsinusoidal peaks in the spectrum,

    F(f) =

    |Uk(0)|2

    k = 1

    K

    (K 1)|(f)|2

    k = 1|xk(f) (f)Uk(0)|

    2~K

    Once an F-ratio has been calculated, peaks deemedsignicant by the F-test, and which exceed the signi-icance level 11/N, may be removed rom the origi-nal process in order to obtain a reshaped estimate othe smooth part o the spectrum:

    Sreshaped(f) =k = 1 i

    |xk(f) iUk(f fi)|2~K

    1K

    This reshaped estimate may be augmented with thepreviously determined line components, to obtaina so-called mixed spectral estimate. This providesone o the more powerul applications o the multi-taper methodology, since, in general, estimating suchmixed spectra is dicult.

    ReferencesBrillinger DR (1978) Comparative aspects o the

    study o ordinary time series and o point processes.In: Developments in statistics vol. 11. Orlando,

    FL: Academic Press.Buzsaki G (2006) Rhythms o the Brain. New York:

    Oxord UP.

    Jarvis MR, Mitra PP (2001) Sampling properties othe spectrum and coherency o sequences o actionpotentials. Neural Comput 13:717-749.

    Mitra PP, Bokil H (2007) Observed Brain Dynamics.New York: Oxord UP.

    Percival DB, Walden AT (1993) Spectral analysis or

    physical applications. Cambridge, UK: Cambridge UP.

    Pesaran B, Pezaris JS, Sahani M, Mitra PP,Andersen RA (2002) Temporal structure inneuronal activity during working memory inmacaque parietal cortex. Nat Neurosci 5:805-811.

    Slepian D, Pollack HO (1961) Prolate spheroidal

    waveunctions: Fourier analysis and uncertaintyI. Bell System Tech Journal 40:43-63.

    Steriade M (2001) The intact and sliced brain.Cambridge, MA: MIT Press.

    Thomson DJ (1982) Spectrum estimation andharmonic analysis. Proc IEEE 70:1055-1996.

    Thomson DJ, Chave AD (1991) Jackknied errorestimates or spectra, coherences, and transerunctions. In: Advances in spectrum analysis andarray processing, pp 58-113. Englewood Clis, NJ:Prentice Hall.

    Wasserman L (2007) All o nonparametric statistics.New York: Springer-Verlag.