Description Usage Arguments Value Author(s) Examples
View source: R/print_compare.R
Prints the results of compare
of composite index.
1 2 | ## S3 method for class 'compare'
print(x)
|
x |
output of the function |
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.
David Ardia, Kris Boudt, Valentin Todorov and Keshav Pratap
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.