compind: Computation of Composite Index

Description Usage Arguments Details Value Author(s) References Examples

Description

Function which computes indices

Usage

1
2
3
4
5
compind(x, ...)
## S3 method for class 'formula'
compind(formula, data = NULL, subset, na.action, ...)
## Default S3 method:
compind(x, cs=NULL, time=NULL, for.period=NULL, ctr=ProcessControl(), ...)

Arguments

formula

formula needs to be written in form formula="entity ~ indicator 1+ indicator 2 + indicator 3+.." where entity is the name of the column containg entity names.

data

dataset for which index is to be computed

time

name of the coloumn containing time period. Defualt time=NULL which assumes all data is for single time period.

for.period

In case time column contains multiple time period and index is to be calculated only for a particular period. See example.

ctr

Different types of controls to be taken input as ctr=ProcessControl(). See examples and details of the controls below.

Details

The argument ctr is a input via function ProcessControl() that can supply any of the following components. Please see ProcessControl for details.

Value

An object of class compind.

The object contains a list with the following components:

index:

matrix of size (nentity x ntime) containing the index scores. NA indicates no country observation available.

ranking:

matrix of size (nentity x ntime) containing the index ranking. NA indicates no country observation available.

changeinranking:

matrix of size (nentity x ntime-1) containing the index ranking changes. NA indicates no country observation available. Negative value indicate a drop in the ranking (bad performance) while a positive value indicates a gain the ranking (good performance).

time.list

list of size ntime, containing for each time period, a list of ranking, score, indicator, normindicators amd weights for that time period.

ctr

returns values of all the controls used for computing the index

Author(s)

David Ardia, Kris Boudt, Valentin Todorov and Keshav Pratap

References

Meghnad Desai et.al.(2002),'Measuring the Technology Achievement of Nations and the Capacity to Participate in the Network Age'Journal of Human Development, Vol. 3, No. 1, 2002 (URL: http://unpan1.un.org/intradoc/groups/public/documents/apcity/unpan014340.pdf)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  # Calculation TAI index, see reference paper 
  # load data
  data(tai)
  # setmax and setmin values are according to reference paper
  # see use of controls in this example
  indx_tai= compind(country~., data=tai, 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)))
  print(indx_tai)
  
  
    data(cip)
    head(cip)
    
    index_cip = compind(country~., time="year", for.period = 2005:2010, data=cip,
        ctr=ProcessControl(weights=c("fixed",1/6,1/6,1/12,1/12,1/12,1/12,1/6,1/6),
            aggregation="linear"))
    class(index_cip)
    names(index_cip)


  
 ## Not run: 

## This will not work - issues in the formula interface, do it with the default interface.

  # Following is an example of calculation of mixed-eight cip index, 
  ##    the index calculation is done using hierarchical aggregation
  ##
  ## Load data
  
  data(cip)
  ## Create new sub-indicator Industrial intensity (INDint), and Manufactured Exports Quality (MXQual)
  INDint <- compind(country ~ MHVAsh + MVAsh, time="year", for.period=2010, data=cip, ctr=ProcessControl(aggregation='linear'))
  MXQual <- compind(country ~ MHXsh + MXsh, time="year", for.period=2010, data=cip, ctr=ProcessControl(aggregation='linear'))

  # Calculation index using rest of the sub-indicators 
  indicators <- compind(country~MVApc + MXpc + ImWMVA + ImWMT, time= "year", data=cip, for.period=2010, ctr= ProcessControl(weights=c("fixed", 1/6, 1/6, 1/6, 1/6)))
  colnames(indicators$index) = "indicators"
  # Binding results of the subindicators
  cip8 <- cbind(indicators$index, INDint$index, MXQual$index)
  # Calculating mixed eight CIP index
  index_cip_2010 <- compind(data=cip8, ctr=ProcessControl(weights=c("fixed", 1, 1/6,1/6),normalization="none"))
  # Print index
  print(index_cip_2010)

## End(Not run)

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