generate_t: Generate irregular time axes with controlled properties

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

View source: R/generate_t.R

Description

Generates regular and irregular time axes with defined start, end, and sampling interval distribution.

Usage

1
generate_t(dt = 1, tmin = 0, tmax = 100, method = "gamma", skew = 1)

Arguments

dt

Number giving the average time step

tmin

Number giving the minimum time step

tmax

Number giving the maximum time step

method

Sampling method: "linear" for irregular or "gamma" for regular

skew

Number larger than zero giving the skewness of the gamma-distribution.

Value

Numeric vector containing monotonically increasing sampling times.

Author(s)

Kira Rehfeld

References

Rehfeld, K., Marwan, N., Heitzig, J., and Kurths, J.: Comparison of correlation analysis techniques for irregularly sampled time series, Nonlin. Processes Geophys., 18, 389-404, doi:10.5194/npg-18-389-2011, 2011.

See Also

generate_ar1,generate_powlaw,generate_ar1sins

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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.7,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)
## Estimate the autocorrelation
phi.est=nexcf(x,lag=1,h=0.25)
## Estimate the cross-correlation
couplstr.est=nexcf(x=x,y=y,lag=0,h=0.05)

krehfeld/nest documentation built on May 28, 2019, 12:33 a.m.