Learn R Programming

unbalhaar (version 2.1)

inner.prod.max.p: Unbalanced Haar wavelet which maximises the inner product

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

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.

See Also

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

Examples

Run this code
# NOT RUN {
inner.prod.max.p(c(rep(0, 100), rep(1, 200)), .55)
# }

Run the code above in your browser using DataLab