I have a time series point process representing neuron spikes. I have computed and plotted autocovariance using
acf but now I need to plot the Power Spectral Density.
Power Spectral Density is defined as the Fourier Transform of the autocovariance, so I have calculated this from my data, but I do not understand how to turn it into a frequency vs amplitude plot.
I have used the following code
# X is some set of Wait times between spikes, below is just an example X <- c(56, 3, 4, 119, 3, 4, 121, 3, 3, 121, 3, 4, 120, 3, 4, 4, 115) acf <- acf(X,type="covariance") psd <- fft(acf$acf)
psd is a complex valued array across the default 24 lags from the
How do I turn this array into a PSD plot?