tsc_dep_var: Timescale-dependent variance estimation

Description Usage Arguments Value Author(s) See Also Examples

View source: R/tsc_dep_var.R

Description

Estimate the timescale-dependent variance of a time series.

Usage

1
2
3
4
tsc_dep_var(timser, tsc.in, min.res =
                 min(mean(diff(index(timser))), floor(tsc.in[1]/2) -
                 1), start.val = start(timser), end.val = end(timser),
                 pval = 0.1, detrend = FALSE)

Arguments

timser

Input time series. Can be a zoo, ts or vector object.

tsc.in

Vector of two timescales, c(tsc1,tsc2).

min.res

Minimal resolution of the time series (if this is not met, NAs are returned).

start.val

Starting value of the time series window.

end.val

End value of the time series window.

pval

pval gives the p-value for the confidence intervals of the variance estimate.

detrend

logical argument, if set to TRUE the timesereis is linearly detrended prior to spectral analysis

Value

A list of

std

Standard deviation

var.tsc

timescale-dependent variance estimated

var.tot

total variance of the time series in the window

dof

estimated degrees of freedom of the variance estimate

ts.used

used time series

var.ci

list of lo and up, lower and upper confidence level for the variance estimate

spec.win

spectrum object

Author(s)

Kira Rehfeld, with contributions from Thom Laepple

See Also

var_ci

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(scales)
## Generate one gamma-distributed and one regular time axis
tx<-generate_t(dt=1,tmin=0,tmax=250,method="gamma")
ty<-generate_t(dt=1,tmin=0,tmax=250,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)


tsc_dep_var(y,tsc.in=c(30,100)) 

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