similar to: Different freq returned by spec.ar() and spec.pgram()

Displaying 20 results from an estimated 3000 matches similar to: "Different freq returned by spec.ar() and spec.pgram()"

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)
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 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
2020 Oct 19
1
spec.pgram returns different spectra when fast=TRUE and the number of samples is odd
Dear all, This is potentially a bug in spec.pgram, when the number of samples is odd,spec.pgramreturns a different result withfast = TRUE, the example below contains the two varieties with a reference spectrum calculated manually. the number of returned spectra is also larger (50 compared to 49) whenfast = TRUE x <- rnorm( 99 ) plot(spec.pgram(x, taper = 0 , detrend = FALSE , plot =
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
2007 Nov 23
0
R users in Cyprus
Dear friends, are there enough R users in Cyprus to form a club? jason Dr. Iasonas Lamprianou Department of Education The University of Manchester Oxford Road, Manchester M13 9PL, UK Tel. 0044 161 275 3485 iasonas.lamprianou at manchester.ac.uk ----- Original Message ---- From: "r-help-request at r-project.org" <r-help-request at r-project.org> To: r-help at r-project.org
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))
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
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 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)
2006 Sep 20
3
committing multiple speculations in a single probe
While using DTrace to track down a problem recently, we came across an unexpected restriction: the compiler will not permit different speculations to be committed in the same instance of a probe identifier. For instance, consider the following useless D script: #!/usr/sbin/dtrace -s #pragma D option nspec=2 BEGIN { spec1 = speculation(); spec2 = speculation(); } END {
2007 Mar 29
1
ccf time units
Hi, I am using ccf but I could not figure out how to calculate the actual lag in number of periods from the returned results. The documentation for ccf says:"The lag is returned and plotted in units of time". What does "units of time" mean? For example: > x=ldeaths > x1=lag(ldeaths,1) > results=ccf(x,x1) > results Autocorrelations of series 'X', by lag
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
2005 Feb 02
4
(no subject)
can you recommend a good manual for R that starts with a data set and gives demonstrations on what can be done using R? I downloadedR Langauage definition and An introduction to R but haven't found them overly useful. I'd really like to be able to follow some tutorials using a dataset or many datasets. The datasets I have available on R are Data sets in package 'datasets':
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] *
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] -
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
2017 Dec 15
1
2.1 to 2.2 server migration Qs: sanity check, config ?
On Sat, December 16, 2017 2:34 am, Aki Tuomi wrote: > Please read between the lines =) > at least you should remove autocreate plugin. Aki, thanks. I forgot to write this is meant as a plain vanilla pop/imap multi user/multi domain server, no special requirements or deviations should be needed >> mail_gid = 2000 mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/ >>
2008 Apr 23
1
ccf and covariance
Hi. It's my understanding that a cross-correlation function of vectors x and y at lag zero is equivalent to their correlation (or covariance, depending on how the ccf is defined). If this is true, could somebody please explain why I get an inconsistent result between cov() and ccf(type = "covariance"), but a consistent result between cor() and ccf(type = "correlation")? Or