Questions tagged [biwavelet]

`biwavelet` is an `R` package used to perform univariate and bivariate wavelet analyses. Wavelet analyses are resolved in the time and frequency domains, and thus ideal for identifying changes over time in the contribution of each frequency (or period) of a time series.

The biwavelet R package is a port of the WTC MATLAB program written by Aslak Grinsted and the wavelet program written by Christopher Torrence and Gibert P. Compo. This package can be used to perform univariate and bivariate wavelet analyses. Wavelet analyses are resolved in the time and frequency domains, and thus ideal for identifying changes over time in the contribution of each frequency (or period) of a time series.

22 questions
81
votes
5 answers

Combine base and ggplot graphics in R figure window

I would like to generate a figure that has a combination of base and ggplot graphics. The following code shows my figure using the base plotting functions of R: t <- c(1:(24*14)) P <- 24 A <- 10 y <-…
KatyB
  • 3,920
  • 7
  • 42
  • 72
3
votes
2 answers

On using the biwavelet package in R

Could anyone suggest why the following example code does not work: require(biwavelet) t <- seq(1/24, 365, 1/24) A <- 2 fs <- 1/24 y <- A + sin(2*pi*fs*t) d = cbind(t,y) wt.t1 <- wt(d) plot(wt.t1) It generates an error stating: Error in…
KatyB
  • 3,920
  • 7
  • 42
  • 72
3
votes
2 answers

continuous wavelet transform

This question is rather vague but has anyone used the biwavelet package in R and been successful? I have the following code: require(biwavelet) t1 <- cbind(DecTime,Temp) ## continuous wavelet transform wt1 <- wt(t1) plot(wt1) and it returns the…
KatyB
  • 3,920
  • 7
  • 42
  • 72
2
votes
1 answer

Where is wt() function in R

I cannot seem to find the wt() function in R used on this page: Combine base and ggplot graphics in R figure window wt.t1=wt(t1) I could not find it in ??wt and on searching on google. It must be in some package. There is no library statement on…
rnso
  • 23,686
  • 25
  • 112
  • 234
2
votes
2 answers

Wavelet analysis in R using biwavelet and data with NA values

I have a daily time series with 30 years of data for a number of stations. I am using the biwavelet package in R to test for periodicity in data using the following code di <- data.frame(d1$date, d1$t_min) wt.t1 = wt(di) par(oma = c(0, 0, 0, 1), mar…
Lam
  • 23
  • 6
1
vote
1 answer

Difference between wt.t1 and wt in R - Biwavelet package

What is the difference between wt.t1 and wt in R - Biwavelet package I am confused between the following two codes plot(wt.t1()) plot(wt()) Is it related to lags? like the lag 1 and lag 2 in time series?
1
vote
1 answer

biwavelet package: "axis" is not working

I am using biwavelet package to conduct wavelet coherence analysis. When I want to set my own x ticklabel, I find axisis not working. The following gives a reproducible example. Thanks. require(biwavelet) t1 <- cbind(1:100, rnorm(100)) t2 <-…
Yang Yang
  • 858
  • 3
  • 26
  • 49
1
vote
1 answer

Increase the max.contour.segments in R

I am using the plot function for biwavelet package and i keep getting this message contour(): circular/long seglist -- set options("max.contour.segments") > 25000? I tried the following code in R but it do not work options(max.contour.segments >…
Joan
  • 88
  • 1
  • 8
1
vote
2 answers

calculate lag from phase arrows with biwavelet in r

I'm trying to understand the cross wavelet function in R, but can't figure out how to convert the phase lag arrows to a time lag with the biwavelet package. For example: require(gamair) data(cairo) data_1 <- within(cairo, Date <- as.Date(paste(year,…
Emma Tebbs
  • 1,457
  • 2
  • 17
  • 29
0
votes
0 answers

How to obtain generalizations in R package Biwavelet?

I’m preparing a coursework devoted to diversification strategies for stock market. To measure interdependence of national stock markets I use R with Biwavelet package. While graphs are really good for noticing connections in various periods,…
Alik Kin
  • 1
  • 1
0
votes
0 answers

biwavelet package: Convert x-axis from sequence to date

I have conducted a wavelet analysis on an hourly time series and am trying to plot the output. To conduct the analysis, I had to convert the POSIXct date & time stamp (e.g., 2020-06-20 14:00) to a continuous sequence of 1,2,3... I know how to make…
tassones
  • 891
  • 5
  • 18
0
votes
1 answer

Monthly Date on X-Axis in Wavelet Analysis

I am performing Wavelet Analysis using biwavelet package in R. The date variable does not have continuous dates but with gaps. The data is monthly data. I tried two formats of data, the monthly date format from stata, and the normal date function…
Ahmed Arif
  • 189
  • 1
  • 2
  • 10
0
votes
0 answers

biwavelet - Error when plotting the graph

plot(wtc.AB, plot.cb = TRUE, plot.phase = TRUE) Warning message: In contour.default(x$t, yvals, t(tmp), level = tol, col = col.sig, : all z values are NA Does anyone know why this error happens?
0
votes
1 answer

Date on X-Axis in wavelets

I am using daily time series data of 492 observations and three variables, (date, d, r). I want to print dates as 01/2020, 06/2020, 01/2021, 06/2021, 01/2022, 06/2022, on X-axis in partial and cross wavelet coherence plots. I am using this code. I…
0
votes
0 answers

Error while running WTC (Wavelet Coherence) Codes in R

I am doing Wavelet Analysis in R using Biwavelet. However, I receive the error message: Error in check.datum(y) : The step size must be constant (see approx function to interpolate) When I run the following code: wtc.AB = wtc(t1, t2, nrands =…
1
2