print.compare: Print results of Compare

Description Usage Arguments Value Author(s) Examples

View source: R/print_compare.R

Description

Prints the results of compare of composite index.

Usage

1
2
## S3 method for class 'compare'
print(x)

Arguments

x

output of the function compare

Value

It states minimum, maximum and mean average Index Difference. If a bench index is provided, then Absolute Rank Difference vector, timeperiod-average value of AbsRankDifference, timeperiod-average value of correlation between ranks is printed.

Author(s)

David Ardia, Kris Boudt, Valentin Todorov and Keshav Pratap

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  # load data
  data(cip)
  # compute Composite index (eight-indicators linear) for a range of years
  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"))
  out = compare(index_cip)
  #Print and plot compare results
  print(out)
  plot(out)
  # use a benchmark (a given year)
  bench= compind(country~., time="year", for.period = 2004, 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"))
  out = compare(index_cip, bench)
  print(out)

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