Sum_p {pvar} | R Documentation |
p-variation summation function
Description
It is the sum of absolute differences in the power of p.
Usage
Sum_p(x, p, lag = 1)
Arguments
x |
a numeric vector of data values. |
p |
a number indicating the power in summing function. |
lag |
a number, indicating the lag of differences. |
Details
This is a function that must be maximized by taking a proper subset of x
, i.e. if prt
is a
p-variation partition of sample x
, then Sum_p(x[prt], p) == pvar(x, p)$value
.
Value
The number equal to sum((abs(diff(x, lag)))^p)
See Also
Examples
x = rbridge(1000)
pv = pvar(x, 2); pv
# Sum_p in supreme partition and the value form pvar must match
Sum_p(x[pv$partition], 2)
pv
[Package pvar version 2.2.7 Index]