knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.width = 9, fig.height = 6 )
The CamelRatiosIndex package implements the multivariate-weighted indexing method proposed by Ayimah et al. (2023a, 2023b) for bank performance assessment using the CAMEL framework. The package provides:
camel_index(): Computes composite year-on-year indices from CAMEL ratio dataplot_camel_index(): Visualizes percentage differences across banks using ggplot2This composite index is intended to offer regulators and policymakers a standardised, objective for monitoring bank performance over time and across institutions. Its ability to benchmark banks against a common base year enhances early-warning capabilities, enabling supervisory authorities to identify emerging weaknesses individual banks as well as systemic vulnerabilities within the industry.
CAMEL is an internationally recognized framework for evaluating bank performance, comprising five dimensions:
| Dimension | Ratio | Direction | |-----------|-------|-----------| | Capital Adequacy | Ca | Higher = better | | Asset Quality | Aq | Higher = worse (inverted) | | Management Efficiency | Me | Higher = worse (inverted) | | Earnings | Eq | Higher = better | | Liquidity | Lm | Higher = worse (inverted) |
# Install from GitHub (development version) # install.packages("remotes") remotes::install_github("YOUR-USERNAME/CamelRatiosIndex")
library(CamelRatiosIndex) # Load built-in example data data("camel_2015") data("camel_2022") # Compute the index result <- camel_index(camel_2015, camel_2022) # View the main output result$index_table
# Laspeyres-type indices (base year weights) result$mw_lasp # Paasche-type indices (current year weights) result$mw_pash # Communality weights from base year factor analysis result$weights_base # Eigenvalues result$eigenvalues_base
# Basic plot plot_camel_index(result) # Highlight specific banks plot_camel_index(result, highlight_banks = c("Absa", "Ecobank", "GCB")) # Custom styling plot_camel_index( result, title = "Ghanaian Banks: 2015 vs 2022", subtitle = "CAMEL Index Performance", theme_fn = ggplot2::theme_bw )
When using data frames, the first column must be the bank identifier, followed by the five CAMEL ratios:
# Example structure head(camel_2015)
For matrices, supply bank names separately:
base_mat <- as.matrix(camel_2015[, -1]) curr_mat <- as.matrix(camel_2022[, -1]) banks <- camel_2015$Bank result2 <- camel_index(base_mat, curr_mat, bank_names = banks)
The camel_index() function returns a rich object with multiple components:
# Print overview print(result) # Detailed summary summary(result)
The index computation follows these steps:
Ayimah, J. C., Mettle, F. O., Nortey, E. N., & Minkah, R. (2023a). A Robust Multivariate Weighting Technique for Computing a Measure for Inflation. African Journal of Technical Education and Management, 3(1), 1-15. Retrieved from https://ajtem.com/index.php/ajtem/article/view/53.
Ayimah, J.C. (2023b). Computing Multivariate-Weighted Consumer Price Index: An Application Manual in R. B P International. DOI: 10.9734/bpi/mono/978-81-19315-32-1. DOI:http://dx.doi.org/10.9734/bpi/mono/978-81-19315-32-1
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.