Dear spm:
I want to estimate the effective degrees of freedom of a time series, but
in this case I've applied my own low pass filtering so I can't get spm to
figure out the degrees of freedom for me. bummer. Also there isn't a design
matrix per se.
In the Analysis of fMRI time series-revisited paper Karl gives an
expression for estimating the degrees of freedom based on the spectral
density of a time series.
v = sum(g(w))*sum(g(w)) / sum(g(w)^2)
I'm trying to understand how to implement this equation. My own simplistic
understanding is that the matlab function psd should return the power
spectral density of a vector. Would I then do this with each column of the
time series (which I'm deriving from an XA.mat that I've filtered) and then
calculate the square of the sums / sum of the squares? I should note that
there are no extrinsic autocorrelations applied to the data and the data
are unsmoothed per se except that Lo pass filtering itself does smooth the
time series.
I'm using the default setting for psd.
psd(XA(:,i),nfft,fs,window)
nfft = length(x)/2 + 1
fs = 2 (sampling frequency, only used to scale plots)
window = hanning(nfft)
This gives an answer that's greater than the number of scans in the series
(approx 1.15 x 10^4), where the number of scans is 200. What am I doing
wrong?
thanks for any advice.
Darren
----------------------------------------------------------------------
Darren R. Gitelman, M.D. E-mail: [log in to unmask]
Cognitive Neurology and Voice: (312) 908-9023
the Alzheimer's Disease Center Fax: (312) 908-8789
http://www.brain.nwu.edu
Northwestern Univ., 320 E. Superior St., Searle 11-470, Chicago, IL 60611
----------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|