Displaying 20 results from an estimated 6000 matches similar to: "squared coherency and cross-spectrum"
2008 Apr 30
3
Cross Spectrum Analysis
I am reading some documentation about Cross Spectrum Analysis as a technique
to compare spectra.
My understanding is that it estimates the correlation strength between
quasi-periodic structures embedded in two signals. I believe it may be
useful for my signals analysis.
I was referred to the R functions that implement this type of analysis. I
tried all the examples which generated a series of
2011 Jul 11
1
Spectral Coherence
Greetings,
I would like to estimate a spectral coherence between
two timeseries. The stats : spectrum() returns a coh matrix
which estimates coherence (squared).
A basic test which from which i expect near-zero coherence:
x = rnorm(500)
y = rnorm(500)
xts = ts(x, frequency = 10)
yts = ts(y, frequency = 10)
gxy = spectrum( cbind( xts, yts ) )
plot( gxy $ freq, gxy $
2000 Feb 01
1
plotting spectrum of time series etc
Hi, everyone, I tried to use "spectrum()" or "spec.pgram()" to get a
periodogram of a time series but they didn't work.
Even the examples given in the help file didn't work (all with the same
error message, below). And the 'ts'ibrary was
loaded with "library(ts)" or "library("ts"). I also tried
library(tseries) but got the same problem.
2006 Jan 31
1
How do I "normalise" a power spectral density
I have done a fair bit of spectral analysis, and hadn't finished collecting my thoughts for a reply, so hadn't replied yet.
What exactly do you mean by normalize?
I have not used the functons periodogram or spectrum, however from the description for periodogram it appears that it returns the spectral density, which is already normalized by frequency, so you don't have to worry about
2007 Jul 09
1
When is the periodogram is consistent with white noise?
Hello everyone,
This is my first time posting to the list, thanks in advance.
I am calculating the smoothed periodogram for the residuals of an AR model
that I fit to EEG data. The autocorrelation plot of the residuals shows the
series is now approximately white (i.e. ACF = 1 at lag 0, and close to 0 for
all other lags). I would like to show that the spectrum of the series is
also
2024 Jul 10
1
Implementation for selecting lag of a lag window spectral estimator using generalized cross validation (using deviance)
Dear All,
I am looking for:
A software to select the lag length for a lag window spectral estimator.
Also, I have a small query in the reprex given below.
Background for the above, from the book by Percival and Walden:
1. We are given X_1,...,X_n which is one realization of a stochastic process.
2. We may compute the periodogram using FFT, for example by the
function spectrum in R.
3. The
2007 Jan 08
2
Simple spectral analysis
Hello world,
I am actually trying to transfer a lecture from Statistica to
R and I ran into problems with spectral analysis, I think I
just don't get it 8-(
(The posting from "FFT, frequs, magnitudes, phases" from 2005
did not enlighten me)
As a starter for the students I have a 10year data set of air
temperature with daily values and I try to
get a periodogram where the annual
2010 Nov 22
1
cpgram: access data, confidence bands
Dear R experts, beginners and everyone else,
I'm calculating "cumulative periodogram" using the command "cpgram"
[1] from the MASS library. Here is a short example with the "lh"
(hormone level) dataset:
library(MASS)
plot(lh,type="l",ylab="value",xlab="time", main="Hormone Levels (lh)")
spectrum(lh,
2008 Jan 29
1
coherency and phase plots
I am having a hard time interpreting the phase and coherency plots.
x is two timeseries that occur at the same time i.e.
a b
1 11.2 12.3
16 11.3 12.4
31 11.4 12.5
46 11.5 12.6
...etc
even though my example is does not show this they are oscillating at
more or less the same frequency just shifted by t=x (imagine two sine
waves offset with the 2nd sine
1999 Jul 19
9
time series in R
Time Series functions in R
==========================
I think a good basic S-like functionality for library(ts) in base R
would include
ts class, tsp, is.ts, as.ts
plot methods
start end window frequency cycle deltat
lag diff aggregate
filter
spectrum, spec.pgram, spec.taper, cumulative periodogram, spec.ar?
ar -- at least univariate by Yule-Walker
arima -- sim, filter, mle, diag, forecast
2007 Apr 10
1
Computing fundamental harmonics from a periodogram
Dear all,
I'm trying to finding the fundamental harmonics (ie. peaks in a
periodogram) from a time series (extracted from an mp3). For example,
if I look at
spectrum(fdeaths, spans = c(3,3))
I'd say the fundamental harmonics are about 1, 2, 3.5 and 4.5 - but
how can I extract these automatically? (preferably with some
heuristic for choosing the smoothing spans too)
I'm aware of
2009 Mar 31
1
Lomb periodograms
Hi,
I have recently used the CTS package in order to use the Lomb-Scargle periodogram (spec.ls) function. I have noticed an issue that I hoped you may be able to explain. If a regularly spaced time series has two points removed, one at either side of a single data point (thus making an irregularly spaced time series), a spectrum with a very large peak at the highest frequencies is produced. An
2008 Jun 09
2
using spec.pgram
Hi everyone,
first of all, I would like to say that I am a newbie in R, so I apologize in
advance if my questions seem to be too easy for you.
Well, I'm looking for periodicity in histograms. I have histograms of
certain phenomenons and I'm asking whether a periodicity exists in these
data. So, I make a periodogram with the function spec.pgram. For instance,
if I have a histogram h, I
2019 Feb 14
0
Proposed speedup of spec.pgram from spectrum.R
Hello,
I propose two small changes to spec.pgram to get modest speedup when
dealing with input (x) having multiple columns. With plot = FALSE, I
commonly see ~10-20% speedup, for a two column input matrix and the speedup
increases for more columns with a maximum close to 45%. In the function as
it currently exists, only the upper right triangle of pgram is necessary
and pgram is not returned by
2009 Nov 18
1
Spectrum confidence interval
Dear useRs,
I'd like to plot a confidence interval on a periodogram. My problem is
that spec.pgram(sunspots,ci=0.95,log="yes") gives me a blue error bar on
the plot, but spec.pgram(sunspots,ci=0.95,log="no") does not. My
questions are:
1. how should I plot the confidence interval with log="no"?
2. how should I get the min and max values of the confidence
2004 Oct 15
1
power in a specific frequency band
Dear R users
I have a really simple question (hoping for a really simple answer :-):
Having estimated the spectral density of a time series "x" (heart rate
data) with:
x.pgram <- spectrum(x,method="pgram")
I would like to compute the power in a specific energy band.
Assuming that frequency(x)=4 (Hz), and that I am interested in the band
between f1 and f2, is the
2007 Dec 12
2
discrepancy between periodogram implementations ? per and spec.pgram
hello,
I have been using the per function in package longmemo to obtain a
simple raw periodogram.
I am considering to switch to the function spec.pgram since I want to be
able to do tapering.
To compare both I used spec.pgram with the options as suggested in the
documentation of per {longmemo} to make them correspond.
Now I have found on a variety of examples that there is a shift between
2006 Feb 02
0
How do I normalize a PSD?
Dear Tom,
Short answer, if your using spec.pgram(), use the smoothing kernel to get a
better estimate at the frequency centered in the bandwidth. If your
frequency bin of interest is wider than the bandwidth of the kernel, average
across frequencies (I think). The estimate appears to be normalized already.
If you are calculating your PSD independently, then oversample (e.g. 2,
perhaps 4 or more
1999 Jul 08
1
new time series package available
Fritz just put the first version of a new time series package to the
contrib section at CRAN.
The package is called "tseries.tgz" and provides a library for time
series analysis. It contains
acf Autocorrelation Function
adf.test Augmented Dickey-Fuller Test
amif Auto Mutual Information Function
bds.test BDS Test
1999 Jul 08
1
new time series package available
Fritz just put the first version of a new time series package to the
contrib section at CRAN.
The package is called "tseries.tgz" and provides a library for time
series analysis. It contains
acf Autocorrelation Function
adf.test Augmented Dickey-Fuller Test
amif Auto Mutual Information Function
bds.test BDS Test