search for: detrending

Displaying 20 results from an estimated 51 matches for "detrending".

Did you mean: depending
2007 Mar 12
1
How to avoid a for-loop?
...system.time({ X <- rnorm(10000) X.length <- length(X) X.cum.sum <- cumsum(X) X.cum.mean <- cummean(X) # initializing the "output" vectors X.min.detrended <- rep(NA,X.length) X.max.detrended <- rep(NA,X.length) for (i in 1:X.length) { # Detrending of the time series from index 1 to i # I think that's the time consuming part, are there any # suggestions how to do this faster? X.cum.sum.detrended <- X.cum.sum[1:i]-seq(1:i)*X.cum.mean[i] # Calculating the min and max. Would a "range" be smarter here? X.min.detre...
2009 Jan 21
1
Multifractal detrended fluctuation analysis
Dear R-users, Has anyone written a function for multifractal detrended fluctuation analysis? The "fractal" package does mono-fractal DFA, but not multifractal as far as I can tell. The MF-DFA approach is presented in: J. W. Kantelhardt, S. Zschiegner, E. Koscielny-Bunde, S. Havlin, A. Bunde, and H. E. Stanley, "Multifractal Detrended Fluctuation Analysis of
2009 May 14
1
corrupted smoothing kernel ?
...6) : unused argument(s) (100, r = 6) > kernel("daniell", c(11,7,3) ) Error in kernel("daniell", c(11, 7, 3)) : unused argument(s) (c(11, 7, 3)) My goal is to detrend a time series affected by non-linear trend. I do not have clear ideas about the difference betweeen "detrending" and "smoothing". I would appreciate some suggestions and/or literature references by people experienced about detrending and smoothing. I was told the there are two best methods about detrending: polynomial fit on a sliding window and kernel smoothing. I keep being confused . I go...
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...
2012 Sep 11
0
Detrended Fluctuation Analysis (fractal pkg) troubleshooting
I'm working with the DFA (detrended fluctuation analysis) function in the package fractal on postural sway data, and for the life of me can't get the results to turn out as they should given what my data looks like. The data resemble a random walk, but the Hurst exponent estimates that I'm getting at ~0.9 instead of ~1.4, which is the value a researcher I've been working with
2012 Feb 29
2
How are the coefficients for the ur.ers, type DF-GLS calculated?
...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 my own regression on the two time series I get different values. This could only mean 1) Its not just a simple regression or 2) I'm detrending my data incorrectly. However, i've followed the instructions I've seen in research papers and it doesn't seem to be right. Basically I take Y*t = Yt-(1-(1-7/T)*Y(t-1) and regress that on 1-(1-7/T) for all t>1 and leave the values at T=1 unchanged. Then I take Yt and subtract the co...
2007 Feb 07
0
Detrended Fluctuation Analysis
Good afternoon, my name is Gorka Merino and i am a scientist working in the Marine Science Institune in Barcelone. I'm interested in the application of "Detrended Fluctuation Analysis" (DFA) with the R packages. I've tried to obtain some information related to DFA from the 'Help' options but failed. Could somebody inform me about the use of these techniques in R
2008 Apr 18
2
Correspondence and detrended correspondence analysis
Hi, I hope someone knows the answer to this or has a real good reference about it (I am using Legendre & Legendre, Numerical Ecology, 1998).... My data is a data.frame with locations as rows and vegetation assemblages / species as columns. I've done a PCA, a correspondance analysis (CA) using ca in ca package and a detrended correspondance analysis (DCA) using decorana from vegan package.
2011 Jan 24
0
Detrended fluctuation analysis
Hi All I was using the DFA() in the fractal package to examine a set of time series data. And I was not sure what the H estimate meant from the summary table. is it the alpha of the power law equation?
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
2005 Jan 04
2
(no subject)
Hi I'd like to know if the R can do the DCCA? Because I can't find the package about the DCCA in R. If it can not, please introduce a free software to me, which you think can easily do the work , thanks! jeff
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)
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
2003 Jan 29
2
Curve Fitting Question - Newbie
Hello, I have what should be an easy question. I'm a new r user and making the transition from menus to the command line so as to do batch processing of tons of data. One of my data streams needs to be detrended. It's a vector of numbers that follows a negative exponential decay. I need to fit a curve to it and use the residuals as an object. The data looks something like this: foo.dat
2011 Dec 20
2
any DCCA function in R?
Dear members, I am performing multivariate analysis on marine benthic populations using R. At first glance I found ca and VEGANO packages to be the suitable for the task, but neither has incorporated Detrended Canonical Correspondence Analysis (DCCA), which is just the method I want to apply on my data. I've looked for alternative packages containing the method, but my suspicion is that
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