Learn R Programming

robcp (version 0.2.5)

h_cumsum: Cumulative sum of transformed vectors

Description

Computes the cumulative sum of a transformed numeric vector or matrix. Default transformation is psi.

Usage

h_cumsum(y, fun = "HLm", k, constant)

Arguments

y

numeric vector containing a single time series or a numeric matrix containing multiple time series (column-wise).

fun

character string specifiyng the transformation function \(\psi\).

k

numeric bound used in psi.

constant

scale factor of the MAD. Default is 1.4826.

Value

Numeric vector or matrix containing the cumulative sums of the transformed values. In case of a matrix, cumulative sums are being computed for each time series (column) independentely.

Details

Prior to computing the sums, y is being transformed by the function fun.

See Also

psi.

Examples

Run this code
# NOT RUN {
h_cumsum(rnorm(100))
# }

Run the code above in your browser using DataLab