- Credit Risk Modelling - Case Studies
- Classification vs. Regression Models
- Case Study - German Credit - Steps to Build a Predictive Model
- Import Credit Data Set in R
- German Credit Data : Data Preprocessing and Feature Selection in R
- Credit Modelling: Training and Test Data Sets
- Build the Predictive Model
- Logistic Regression Model in R
- Measure Model Performance in R Using ROCR Package
- Create a Confusion Matrix in R
- Credit Risk Modelling - Case Study- Lending Club Data
- Explore Loan Data in R - Loan Grade and Interest Rate
- Credit Risk Modelling - Required R Packages
- Loan Data - Training and Test Data Sets
- Data Cleaning in R - Part 1
- Data Cleaning in R - Part 2
- Data Cleaning in R - Part 3
- Data Cleaning in R - Part 5
- Remove Dimensions By Fitting Logistic Regression
- Create a Function and Prepare Test Data in R
- Building Credit Risk Model
- Credit Risk - Logistic Regression Model in R
- Support Vector Machine (SVM) Model in R
- Random Forest Model in R
- Extreme Gradient Boosting in R
- Predictive Modelling: Averaging Results from Multiple Models
- Predictive Modelling: Comparing Model Results
- How Insurance Companies Calculate Risk
Credit Risk Modelling - Required R Packages
During our analysis, we will make use of various R packages. So, let’s look at what these packages are and let’s install and load them in R.
Dplyr
‘Dplyr’ provides a set of tools for efficiently manipulating datasets in R. The problem in most data analyses is the time it takes for you to figure out what to do with your data, and dplyr makes this easier by having individual functions that correspond to the most common operations (group_by, summarise, mutate, filter, select and arrange). Each function does one only thing, but does it well.
Install and Load dplyr
> install.packages('dplyr’)
library(dplyr)
Stringr
There are four main families of functions in stringr:
- Character manipulation: these functions allow you to manipulate individual characters within the strings in character vectors.
- Whitespace tools to add, remove, and manipulate whitespace.
- Locale sensitive operations whose operations will vary from locale to locale.
- Pattern matching functions. These recognise four engines of pattern description. The most common is regular expressions, but there are three other tools.
> install.packages('stringr')
library('stringr')
ggplot2
Data visualization library
> install.packages(‘ggplot2’)
library('ggplot2’)
Caret
Classification and Regression Training
install.packages(‘caret') library(caret)
lubridate
This package makes dealing with dates a little easier.
install.packages("lubridate") library(lubridate)
corrplot
Visualization of a correlation matrix
install.packages("corrplot") library(corrplot)
rms
Regression Modelling Strategies
install.packages("rms") library(rms)
doMC
install.packages("doMC") library(doMC)
pROC
install.packages("pROC") library(pROC)
e1071
> install.packages(“e1071")
library(e1071)
Kernlab
> install.packages(“kernlab") library(kernlab)
xgboost
install.packages(“xgboost") library(xgboost)
You may find these interesting
Related Downloads
Free Guides - Getting Started with R and Python
Enter your name and email address below and we will email you the guides for R programming and Python.