APCP: Absolute Percent Change

Description Usage Arguments Value Examples

View source: R/Functions.R

Description

1
2
Absolute Proportional Change(APC) multiplied by 100.00
Absolute Proportional Change(APC) in percent (APCP)

Usage

1
APCP(x, b = 0, l = 1, ...)

Arguments

x

xts object

b

choose -1 (or less) to look into the future

l

observations backwards

...

dots passed

Value

xts object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 

# APCP(Absolute Proportional Change in Percent) example

xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2))
           [,1] [,2]
1970-01-01    1    8
1970-01-02   -2   16
1970-01-03   -4   32

APCP(xts(matrix(c(1,-2,-4,8,16,32), ncol = 2), zoo::as.Date(0:2)))
           V1apcp.0.1 V2apcp.0.1
1970-01-01         NA         NA
1970-01-02       -300        100
1970-01-03       -100        100

## End(Not run)

AndreMikulec/econModel documentation built on June 30, 2021, 9:48 a.m.