Description Usage Arguments Value Warning Author(s) References See Also Examples
View source: R/gaussbandpass.R
Bandpassing, smoothing and detrending of irregular time series using a gaussian kernel smoother.
1 2 |
X |
Input time series ( |
per1 |
Timescale 1 for lowpass |
per2 |
Timescale 2 for highpass |
prune |
Logical; prune |
tsc.in |
Timescale for detrending in |
A list consisting of
trend |
Trend (used for highpass) |
smoothed |
Smoothed time series, used for lowpass |
filt |
Filtered time series (filtered=smoothed-lowpass |
No elaborate edge-treatment yet
Kira Rehfeld krehfeld@awi.de
Rehfeld, K., Marwan, N., Heitzig, J. and Kurths, J. (2011) Comparison of correlation analysis techniques for irregularly sampled time series, Nonlinear Processes in Geophysics, 18 (3), pp. 389-404. doi:10.5194/npg-18-389-2011
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## Generate one gamma-distributed and one regular time axis
tx<-generate_t(dt=1,tmin=0,tmax=100,method="gamma")
ty<-generate_t(dt=1,tmin=0,tmax=100,method="linear")
## Simulate one coupled AR1 process (see reference for details)
Proc<-car(tx,ty,coupl_strength=0.5,phi=0.5,lag=0,nsur=1)
## Bind the results to zoo time series
x<-zoo(Proc$x,order.by=tx)
y<-zoo(Proc$y,order.by=ty)
plot(x)
lines(gaussbandpass(x,10,50)$trend,lwd=2)
lines(gaussbandpass(x,10,50)$smoothed,lwd=2,col="limegreen")
lines(gaussbandpass(x,10,50)$filt,col="red2",lwd=2)
colrs<-c("black","black","limegreen","red")
legend("bottom",c("original ts","trend","smoothed","filtered"),col=colrs,lty=1,lwd=c(1,2,2,2))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.