ProcessControl: Process Control for compind

Description Usage Arguments Value Author(s) See Also Examples

View source: R/ProcessControl.R

Description

Process Control for calculating composite index using compind

Usage

1
ProcessControl(aggregation = c('geometric' , 'linear'),                       normalization = c('min-max', 'none', 'z-score', 'robust-z-score'),                       weights = c( 'equal', 'random', 'fixed'),missingindicator = c('last','none','reweight', 'linear'), cleaning = c('none', 'hampel_twosided', 'hampel_onesided'), setmax = NULL, setmin = NULL)

Arguments

aggregation

type of aggregation used, among 'linear' and 'geometric'. Default: aggregation = 'geometric'.

normalization

type of normalization, among 'min-max', 'z-score', 'none'and 'robust-z-score'. Default: normalization = 'min-max'.

weights

weighting scheme, among 'equal', 'random', and 'fixed'. Default: weights = 'equal'. When using fixed as method, the user can input fixed weights input using weights=c(fixed, w1, w2,...). Please note the lenght of the vector weight in this case must be equal to number of indicators plus one.

missingindicator

action in case of missing value, among 'last', 'none','reweight' and 'linear'. Default: missingindicator = 'last'.

cleaning

winsorization of outliers, among 'random', 'none', 'hampel_twosided' and 'hampel_onesided'. Default: cleaning = 'none'.

setmax

caps the value of an indicator to a fixed number in min-max normalisation. Input should be as setmax <- c(NA, NA, x1, NA,..) if third indicator is to be capped at x1.See example for more detail. Please note the length of vector setmax should be equal to number of indicators.

setmin

Fixes the minmum value of an indicator to a fixed number in min-max normalisation. Input should be as setmin <- c(NA, NA, x1, NA,..) if third indicator is to be fixed at minimum value x1.See example for more detail. Please note the length of vector setmin should be equal to number of indicators.

Value

A list containing final methods for aggregation, normalization, weights, missingindicators, cleaning, setmax, setmin computation of index.

Author(s)

David Ardia, Kris Boudt, Valentin Todorov and Keshav Pratap

See Also

compind

Examples

1
2
3
4
5
6
 #set controlds
  ctr=ProcessControl(aggregation='linear', setmax=c(994,272.6,232.4,80.8,2.9547,3.84317, 12,27.4), setmin=c(0,0,0,0,0,1.3424,0.8,0.1))
 # load data
  data(tai)
  indx_tai= compind(country~., data=tai, ctr=ctr)
  print(indx_tai)

CItools documentation built on May 2, 2019, 4:48 p.m.