CompositeIndex: CompositeIndex: return composite economic index

Description Usage Arguments Details Value Author(s) Examples

View source: R/CompositeIndex.R

Description

CompositeIndex: return composite economic index

composite consistent index from consistent indicators, composite leading index from leading indicators, composite lagging index from lagging indicators. The consistent / leading / lagging indicators were determined by corresponding expert or algorithms like KL, crosscor ... Generally, these are economic indicators, whose value is itself, or cycle part from seasonal-adjusted (C), or its year-on-year growth rate of trend and cycle part (TC) from seasonal-adjusted.

Usage

1
2
3
4
5
6
CompositeIndex(consistent, leading = NULL, lagging = NULL, co_wgt = NULL,
  le_wgt = NULL, la_wgt = NULL, rate_method = c("division", "difference",
  "auto"), start = numeric(), end = numeric(), frequency = 12,
  baseyear = start[1], trend_adjust = TRUE, neighbour = 5,
  mincycle = 15, phase = 5, extr_limit = 3.5, end_num = 6,
  mcd_gap = 8)

Arguments

consistent, leading, lagging

data frame, including consistent indicators, leading indicators, lagging indicators respectively .

co_wgt, le_wgt, la_wgt

data frame, including weights respectively for consistent, leading, lagging.

rate_method

calculating method for symmetry rate. auto means progress selects division or difference automatically .

start, end

start and end of time series, it's usage like start=c(2007,2), end=c(2017,12).

frequency

12 for monthly data , 4 for seasonal data . In addition , start, end, and frequency will determine a number of observation,which the actually number of data will be equal to . Thus data you input will not be permitted to lack some moth or quarter, otherwise , result will be not correct .

baseyear

final index will base on a certain year(whose indices' mean will be regarded as 100) to adjust relative size of index .

trend_adjust

logical, whether to adjust trend of index base on compounded average growth, TRUE : yes ; FALSE : no.

neighbour...mcd_gap

refer to bbturns, see https://github.com/Nisus-Liu/bbturns.

Details

This package depend on package named bbturns from GitHub, you can get it like : install.packages("devtools") >> library(devtools) >> install_github("Nisus-Liu/bbturns").

Value

A data frame including :

\ consistentconsistent index \ leadingleading index \ lagginglagging index

Author(s)

Hejun Liu (Nisus-Liu), e-mail: liuhejunlj@163.com

Examples

1
CI <- CompositeIndex(consistent , leading , co_wgt = consistent_wgt, start = c(2006,1), end = c(2016,7), baseyear = 2006)

Nisus-Liu/CompositeIndex documentation built on May 7, 2019, 6:18 p.m.