Learn R Programming

pvar (version 2.2.7)

BridgeT: Bridge transformation

Description

Transforms data by Bridge transformation.

Usage

BridgeT(x, normalize = TRUE)

Value

A numeric vector.

Arguments

x

x a numeric vector of data values.

normalize

logical, indicating whether the vector should be normalized.

Details

Let n denotes the length ox x. For each \(m \in [1,n]\) bridge transformations BridgeT is defined as

$$ BridgeT(m, x) = \left\{ \sum_{i=1}^m x_i - \frac{m}{n} \sum_{i=1}^n x_i \right\} . $$

Meanwhile, the transformation with normalization is

$$ BridgeT(m, x) = \frac{1}{\sqrt{n var(x)}} \left\{ \sum_{i=1}^m x_i - \frac{m}{n} \sum_{i=1}^n x_i \right\} . $$

See Also

PvarBreakTest, rbridge

Examples

Run this code
x <- rnorm(1000)
Bx <- BridgeT(x, FALSE)

op <- par(mfrow=c(2,1),mar=c(4,4,2,1))
plot(cumsum(x), type="l")
plot(Bx, type="l")
par(op)

Run the code above in your browser using DataLab