similar to: spec.pgram returns different spectra when fast=TRUE and the number of samples is odd

Displaying 20 results from an estimated 300 matches similar to: "spec.pgram returns different spectra when fast=TRUE and the number of samples is odd"

2007 Nov 25
1
spec.pgram() - circularity of kernel
Hi, I am far from experienced in both R and time series hence the question. The code for spec.pgram() seems to involve a circularity of the kernel (see below) yielding new power estimates to all frequencies computed by FFT. " if (!is.null(kernel)) { for (i in 1:ncol(x)) for (j in 1:ncol(x)) pgram[, i, j] <- kernapply(pgram[, i, j], kernel, circular = TRUE)
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
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
2008 Oct 02
0
spec.pgram help?
Hopefully this will not seem too ignorant of a question. I am having a hard time picking out the sources of the differences between: abs(fft(x))^2/length(x) and spec.pgram(x, taper=0, log="no", plot=FALSE) Also from the limited testing that I have done since the DC "frequency" is not returned from spec.pgram how can I tell what has happened to the series when I specify
2009 Jul 08
0
typo in ts detrending implementation in spec.pgram?
Hello! I wonder if there is a typo in detrending code of spec.pgram in spectrum.R from stats package. One can see in the code https://svn.r-project.org/R/trunk/src/library/stats/R/spectrum.R . I am afraid there is a typo and the code should look like if (detrend) { t <- 1L:N - (N + 1)/2 sumt2 <- N * (N^2 - 1)/12 for (i in 1L:ncol(x)) x[, i] <- x[, i] -
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
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
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))
2007 Nov 21
1
Different freq returned by spec.ar() and spec.pgram()
Dear list, I've recently become interested in comparing the spectral estimates using the different methods ("pgram" and "ar") in the spectrum() function in the stats package. With many thanks to the authors of these complicated functions, I would like to point out what looks to me like a bit of an inconsistency -- but I would not be surprised if there is good reasoning
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
2003 Nov 14
4
Setting up Samba
Hi to you all, I'm setting up a network to where I have Linux and W2k Active Directory.I have Redhat 8.0 and i want it to see and access file between the two OS'S. I downloaded the latest samba binaries 3.0.2 and edit the smb.conf.How do i know if my linux will act as a samba server? Should i select "everything" when i load redhat again or should i just continue what i have
2008 Jun 04
2
estimate phase shift between two signals
Hi, Are there any functions in R that could be used to estimate the phase-shift between two semi-sinusoidal vectors? Here is what I have tried so far, using the spectrum() function -- possibly incorrectly: # generate some fake data, normalized to unit circle x <- jitter(seq(-2*pi, 2*pi, by=0.1), amount=pi/8) # functions defining two out-of-phase phenomena f1 <- function(x)
2008 Jan 15
1
ggplot and spec.pgram
Any Ideas to get an interactive periodogram? -- Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis
2008 Apr 19
1
Inverse transform after applying function in frequency domain?
Dear R-Help, I wish to simulate a process so that it has certain properties in the frequency domain. What I attempted was to generate a random time-series signal, use spec-pgram(), apply a function in the frequency domain, and then inverse transform back to the time-domain. This idea does not seem as straight forward in practice as I anticipated. e.g. x<-ts(rnorm(1000, 0,1), frequency=256)
2001 Nov 20
2
quiver plot help
Hello everybody I'm trying to write a simple version of matlab's "quiver". The idea is that I have fluid with velocity defined on a grid. I have a matrix of x-components of velocity and a matrix of y-components and I want to see the overall flow pattern. (I work with 2D fluid mechanics problems). My first-stab function is below: quiver <- function(u,v,scale=1) # first
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
2006 May 17
1
Documentation for taper in spec.taper (PR#8871)
Full_Name: Michael Stein Version: Version 2.1.1 OS: linux Submission from: (NULL) (128.135.149.112) The documentation for spec.taper says p: The total proportion to be tapered, either a scalar or a vector of the length of the number of series. Details: The cosine-bell taper is applied to the first and last 'p[i]/2' observations of time series 'x[,
2002 Apr 10
1
Layout of Fourier frequencies
I'm doing convolutions in the frequency domain and need to know the layout of the Fourier modes returned by fft. (This is leading up to a more involved question about moment generating functions, but I need to know if I've got this part correct first.) I think in 1D the pattern is: 0 1 2 3 -2 1 (even) 0 1 2 3 -3 2 1 (odd) In 2D is it simply (for a square matrix): 0 1 2 -1 (horizontal)
2006 Jan 24
0
Relating Spectral Density to Chi-Square distribution
Dear list, I had some confusion regarding what function too use in order too relate results from spec.pgram() too a chi-square distribution. The documentation indicates that the PSD estimate can be approximated by a chi-square distribution with 2 degrees of freedom, but I am having trouble figuring out how to do it in R, and figuring out what specifically that statement in the documentation