Displaying 20 results from an estimated 1300 matches similar to: "corrupted smoothing kernel ?"
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)
2009 May 17
0
Some questions about package "pastecs" and "stats"
My goal is to remove signals trend without any a-priori knowledge of the trend type, if any. Some signals are very noisy and non-stationary (example attached).
I have experimented with a number of techniques. Staring at the results, I can hardly tell which method is best.
I am attaching the result of function "local.trend" as I cannot understand it. Nor I can make a sense of the returned
2024 Sep 14
1
Dirichlet kernel requires r to be defined, which is not in the help
Code to reproduce
> kernel("dirichlet")
Error in kernel("dirichlet") : argument "r" is missing, with no default
The help says
r??? the kernel order for a Fejer kernel.
Thanks to update the help.
Best,
Samuel
2007 Mar 12
1
How to avoid a for-loop?
Hi all,
as I am trying to move slowly from just "working" to "good" code, I'd
like to ask if there's a smarter way than using a for-loop in tasks like
the example below.
I need to obtain the extrema of the cumulated sum of a detrended time
series. The following code is currently used, please have a look at the
comments for my questions and remarks:
system.time({
X
2006 Feb 01
1
Off topic: nonparametric regression
Hi All,
What do you consider to be the best book(reference) on nonparametric regression?
I am currently reading the book of Kunio Takezawa(2006): "Introduction to nonparametric regression".
Is the book of Hardle(1990): "Applied nonparametric regression" better? or maybe another book?
This is off topic, but most of the books is using R or S-plus.
Thanks
Hennie
2012 Feb 29
2
How are the coefficients for the ur.ers, type DF-GLS calculated?
I need some real help on this, really stuck
how are the coefficients for
ur.ers(y, type = c("DF-GLS", "P-test"), model = c("constant", "trend"),
lag.max = 0)
The max lag is set at zero, so the regression should simply be
Diff(zt) = a*z(t-1)
where a is the value i'm trying to find and z(t)'s are the detrended values.
but through performing
2009 Mar 03
1
periodogram smoothing question
Hello -
I am currently simulating bivariate AR(1) time series data and have the
following line in my code:
Px=spec.pgram(ts.union(X,XX),spans=c(?,?))
The spans option is where I enter in the vector containing the Daniell
smoother numbers, but I don't know what a Daniell smoother is (hence the
question marks). Can somebody please tell me?
Is there another option where I can simply enter in
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 =
2004 Jan 22
1
spectrum
Dear R users
I have two questions about estimating the spectral power of a
time series:
1) I came across a funny thing with the following code:
data(co2)
par(mfrow=c(2,1))
co2.sp1<-spectrum(co2,detrend=T,demean=T,span=3)
co2.sp2<-spectrum(co2[1:468],detrend=T,demean=T,span=3)
The first plot displays the frequencies ranging from 0 to 6
whearas the second plot displays the same curve but
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] -
2008 Aug 05
4
LIDAR Problem in R (THANKS for HELP)
Hi All,
I am a PhD student in forestry science and I am working with LiDAR data set
(huge data set). I am a brand-new in R and geostatistic (SORRY, my
background it?s in forestry) but I wish improve my skill for improve myself.
I wish to develop a methodology to processing a large data-set of points
(typical in LiDAR) but there is a problem with memory. I had created a
subsample data-base but
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 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)
2018 Feb 08
2
Information
I have a time series of 1095 data corresponding to a daily data of three years.
I want to know how to use ma(timeserie, order=??, centre=??) to detect the trend:
which order is suitable and what is the difference between centre= true or false.
How to avoid these errors:
1-Error in timeserie - trend :
? argument non num?rique pour un op?rateur binaire="non-numeric argument for a binary
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
2007 Dec 14
1
Help! - boxcox transformations
Hi,
Hope this does not sound too ignorant .
I am trying to detrend and transform variables to achieve normality and
stationarity (for time series use, namely spectral analysis). I am using the
boxcox transformations.
As my dataset contains zeros, I found I need to add a constant to it in
order to run "boxcox". I have ran tests adding several types of constants,
from .0001
2003 Jun 03
1
tseries "adf.test"
I have a question regarding the adf.test command in the tseries library.
I have a vector of time series observations (2265 daily log prices for the
OEX to be exact). I also have this same data in first-differenced form. I
want to test both vectors individually for staionarity with an Augmented
Dickey-Fuller test. I noticed when I use the adf.test command from the
tseries library, the general
1999 Jul 27
3
Preliminary version of ts package
There is now a preliminary version of a time series package in the R-devel
snapshots, and we would welcome feedback on it. It is based in part on the
packages bats (Martyn Plummer) and tseries (Adrian Trapletti) and in part
on code I had or have written. (Thanks for the contributions, Martyn and
Adrian!) Some of the existing ts code has been changed, for example to plot
multiple time series, so
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)
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