ConvergenceClubs

CRAN_Status_Badge DOI:10.1007/978-3-319-76207-4_15 R badge

Description

ConvergenceClubs provides functions for clustering regions that form convergence clubs, according to the definition by Phillips and Sul (2009).

The main functions are:

For class convergence.clubs, the following methods are available:

Installation

To install the package from CRAN, simply run the following code in R:

install.packages("ConvergenceClubs")

Or, if you want to install the development version from GitHub:

# if not present, install 'devtools' package
install.packages("devtools")
devtools::install_github("rhobis/ConvergenceClubs")

Usage

library(ConvergenceClubs)

data("filteredGDP")

# Cluster Countries using GDP from year 1970 to year 2003
clubs <- findClubs(filteredGDP, dataCols=2:35, unit_names = 1, refCol=35,
                   time_trim = 1/3, cstar = 0, HACmethod = "FQSB")
summary(clubs)

# Merge clusters
mclubs <- mergeClubs(clubs, mergeMethod='PS', mergeDivergent=FALSE)
summary(mclubs)

mclubs <- mergeClubs(clubs, mergeMethod='vLT', mergeDivergent=FALSE)
summary(mclubs)


# Plot Transition Paths for all regions in each club and average Transition Path
# for all clubs
plot(mclubs)

# Plot Only average Transition Paths
plot(mclubs, clubs=NULL)
plot(mclubs, clubs=NULL, legend=TRUE)

More


Buy Me A Coffee