wt: Computes the wavelet transform of a timeseries. Also the...

Description Usage Arguments Value Note Author(s) See Also Examples

View source: R/wt.R

Description

Computes the wavelet transform of a timeseries. Also the creator function for the wt class. The wt class inherits from the tts class, which inherits from the list class.

Usage

1
2
3
4
5
6
7
8
wt(
  t.series,
  times,
  scale.min = 2,
  scale.max.input = NULL,
  sigma = 1.05,
  f0 = 1
)

Arguments

t.series

A timeseries of real values

times

A vector of time step values (e.g., years), spacing 1

scale.min

The smallest scale of fluctuation that will be examined. At least 2.

scale.max.input

The largest scale of fluctuation that is guaranteed to be examined

sigma

The ratio of each time scale examined relative to the next timescale. Should be greater than 1.

f0

The ratio of the period of fluctuation to the width of the envelope. Defaults to 1.

Value

wt returns an object of class wt. Slots are:

values

A matrix of complex numbers, of dimensions length(t.series) by the number of timescales. Entries not considered reliable (longer timescales, near the edges of the time span) are set to NA.

times

The time steps specified (e.g. years)

wtopt

The inputted wavelet transform options scale.min, scale.max.input, sigma, f0 in a list

timescales

The timescales (1/frequency) computed for the wavelet transform

dat

The data vector from which the transform was computed

Note

Important for interpreting the phase: the phases grow through time, i.e., they turn anti-clockwise.

Author(s)

Lawrence Sheppard lwsheppard@ku.edu, Jonathan Walter jaw3es@virginia.edu, Daniel Reuman reuman@ku.edu

See Also

wt_methods, tts, plotmag, plotphase, browseVignettes("wsyn")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
time1<-1:100
time2<-101:200
ts1p1<-sin(2*pi*time1/15)
ts1p2<-0*time1
ts2p1<-0*time2
ts2p2<-sin(2*pi*time2/8)
ts1<-ts1p1+ts1p2
ts2<-ts2p1+ts2p2
ts<-c(ts1,ts2)
ra<-rnorm(200,mean=0,sd=0.5)
t.series<-ts+ra
t.series<-t.series-mean(t.series)
times<-c(time1,time2)
res<-wt(t.series, times)

wsyn documentation built on Jan. 15, 2021, 3:37 p.m.