wmtsa (version 2.0-3)

D.statistic: D-statistic

Description

Given a numeric vector x, this function calculates the the maximum departure of x from an expected linear increase in cumulative energy based on a white noise model.

Usage

D.statistic(x)

Arguments

x

a numeric vector.

See Also

wavVar, wavVarTest, D.table, D.table.critical.

Examples

Run this code
# NOT RUN {
## compare the D-statistic for a white noise 
## realization and a random walk. the random 
## walk D-statistic will be relatively large in 
## comparison to that of the white noise 
## realization, signifying a stronger departure 
## from an expected increase in cumulative 
## energy. 
D.statistic(rnorm(1024))
D.statistic(cumsum(rnorm(1024)))
# }

Run the code above in your browser using DataLab