Displaying 20 results from an estimated 1300 matches similar to: "plotting spectrum of time series etc"
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
2009 Jan 20
1
Problem with FAME
Dear All,
I wonder whether anyone has an experience with FAME package written by Jeff Hallman. All my attempts to send him the following problem report did not succeed (the mail system says that my e-mail could not be delivered), so I turn for help to this list.
I tried to use your FAME package written for R, but somehow I cannot get it working. I am using Windows XP and the newest R
2008 Apr 02
1
How to best read in this data / Switching rows and colums
Hi,
I have to read in data which looks like this:
SeriesA, 5, 5, 5, 5
SeriesB, 8, 5, 8, 8, 7, 10, 2, 7, 3
SeriesC, 5, 5, 8, 4, 7, 7, 4, 5
SeriesD, 5, 9, 5, 4, 2, 3, 10, 1
SeriesE, 7, 10, 9, 5, 8, 6, 10, 9, 5, 10, 4, 3, 2, 10, 8, 8, 10, 10, 10
SeriesF, 1, 2, 1, 5, 1, 7, 5, 7, 7, 3
There are actually much more data points in the data, each line contains
between 300 and 500 values.
If I use
2005 Dec 01
1
squared coherency and cross-spectrum
Hi All,
I have two time series, each has length 354. I tried to calculate the
coherency^2 between them, but the value I got is always 1. On a website,
it says: " Note that if the ensemble averaging were to be omitted, the
coherency (squared) would be 1, independent of the data". Does any of
you know how to specify properly in R in order to get more useful
coherency? The examples in
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 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
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 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
2006 Jan 24
1
spec.pgram() normalized too what?
Dear list,
What on earth is spec.pgram() normalized too? If you would like to skip my
proof as to why it's not normed too the mean squared or sum squared
amplitude of the discrete function a[], feel free too skip the rest of the
message. If it is, but you know why it's not exact in spec.pgram() when it
should be, skip the rest of this message. The issue I refer herein refers
only too a
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
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
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
2008 Mar 27
6
help! - spectral analysis - spec.pgram
Can someone explain me this spec.pgram effect?
Code:
period.6<-c(0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10
,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10,0,0,0,0,0,10)
period.5<-c(0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10
,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,0,0,10,0,0,0,0,10,0)
par(mfrow=c(2,1))
2014 Sep 05
0
'mv: preserving permissions for `all.R': Operation not supported' when installing R 3.1.0 via compiling source code in CentOS
I compile R3.1.0 to install it in centOS without root. The disk partition format is NFS (network file system). After configure it ($/home/XX/download/R3.1.0/configure --prefix=/home/zj/local/R --enable-R-shlib --with-x?) successfully, I make it ($make). But there always is an error when make the base package. As bellow:
mkdir -p -- ../../../library/translations
make[4]: Entering directory
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
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
2008 Sep 09
4
Help with 'spectrum'
For the command 'spectrum' I read:
The spectrum here is defined with scaling 1/frequency(x), following S-PLUS. This makes the spectral density a density over the range (-frequency(x)/2, +frequency(x)/2], whereas a more common scaling is 2? and range (-0.5, 0.5] (e.g., Bloomfield) or 1 and range (-?, ?].
Forgive my ignorance but I am having a hard time interpreting this. Does this mean
2009 Jun 19
1
typo in Lomb-Scargle periodogram implementation in spec.ls() from cts package?
Hello!
I tried to contact author of the package, but I got no reply. That is why I write it here. This might be useful for those who were using cts for spectral analysis of non-uniformly spaced data.
In file spec.ls.R from cts_1.0-1.tar.gz lines 59-60 are written as
pgram[k, i, j] <- 0.5 * ((sum(x[1:length(ti)]* cos(2 * pi * freq.temp[k] * (ti - tao))))^2/sum((cos(2 *
pi * freq.temp[k] *
2006 Jan 24
3
R-help Digest, Vol 35, Issue 24
Dear Prof Ripley,
First of all, unless you are an english professor, then I do not think you have
any business policing language. I'm still very much a student, both in R, and
regarding signal analysis. My competence on the subject as compared too your
own level of expertise, or my spelling for that matter, may be a contension for
you, but it would have been better had you kept that opinion