Unbalanced Haar wavelet which maximises the inner product

Share:

Description

The function finds the Unbalanced Haar vector which yields the largest (in absolute value) inner product with the input vector, amongst those Unbalanced Haar vectors whose breakpoint is located between 100(1-p)% and 100p% of their support.

Usage

1
inner.prod.max.p(x, p = 0.8)

Arguments

x

a vector

p

a scalar in (0.5, 1]

Value

The index where abs(inner.prod.iter(x)) is maximised on the subinterval (1+floor((1-p)*n)):ceiling(p*n), where n is the length of x. If two or more maxima are found, the med of their locations is returned.

Author(s)

Piotr Fryzlewicz

See Also

inner.prod.iter, med, inner.prod.max

Examples

1
inner.prod.max.p(c(rep(0, 100), rep(1, 200)), .55)