• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Finance Train

Finance Train

High Quality tutorials for finance, risk, data science

  • Home
  • Data Science
  • CFA® Exam
  • PRM Exam
  • Tutorials
  • Careers
  • Products
  • Login

Import Credit Data Set in R

Data Science, Risk Management

This lesson is part 4 of 28 in the course Credit Risk Modelling in R

We are using the German Credit Scoring Data Set in numeric format which contains information about 21 attributes of 1000 loans.

german_creditDownload

First, setup a working directory and place this data file in that directory. Then, import the data into your R session using the following command:

Attribute Details

20 attributes are used in judging a loan applicant. The goal is the classify the applicant into one of two categories, good or bad, which is the first attribute, Creditability. This represents whether the credit applicant is creditable or not (Credit Worthiness).

Some more notes about the data:

  • Creditability
    • 0: Bad credit
    • 1: Good credit
  • Account Balance
    • 1: < 0 DM
    • 2: < 200 DM
    • 3: >= 200 DM
    • 4: No existing Account
  • Duration of Credit Month – Loan Duration in Months
  • Payment Status of Previous Credit – Credit History
    • 0: No credits taken so far
    • 1: All credit in this Bank paid back duly
    • 2: Existing credits paid back dully till now
    • 3: Delay in paying off in the past,
    • 4: Credits existing in other banks
  • Purpose – Loan Purpose
    • 0:new car purchase
    • 1: used car purchase
    • 2: furniture or equipment purchase
    • 3: radio or television purchase
    • 4: domestic appliances purchase
    • 5: repairs
    • 6: education
    • 7: vacation
    • 8: retraining
    • 9: Business
    • 10: others
  • Credit Amount (In DM – Deutsche Mark)
  • Value of Savings/Stocks
    • 1: < 100 DM
    • 2: >= 100 and < 500 DM
    • 3: >= 500 DM and 1000 DM
    • 4: >= 1000 DM
    • 5: no savings / bonds
  • Length of Current Employment
    • 1: unemployed
    • 2: < 1 year
    • 3: >= 1 and < 4 years
    • 4: >= 4 and < 7 years
    • 5: >= 7 years
  • Instalment Percent: Instalment rate in percentage of disposable income
  • Sex & Marital Status
    • 1: Divorced Male
    • 2: Divorced/Married Female
    • 3: Male Single
    • 4: Married Male
    • 5: Female Single
  • Guarantors
    • 1: None
    • 2: Co-applicant
    • 3: Guarantor
  • Duration in Current Address (In Years)
  • Most Valuable Available Asset
    • 1: Real Estate
    • 2: Life Insurance
    • 3: Car or others
    • 4: No property
  • Age in Years
  • Concurrent Credits
  • Type of Apartment
    • 1: Rented
    • 2: Owned
    • 3: For Free
  • No. of existing credits at this bank
  • Occupation (Job Status)
    • 1: Unemployed non-resident
    • 2: Unemployed resident
    • 3: Skilled Employee
    • 4: Self-Employed
  • No. of dependents
  • Telephone: German phone rates are very high, so fewer people own telephones
    • 1: Available
    • 2: Not Available
  • Foreign worker: There are millions of foreign worker working in Germany
    • 1: No
    • 2: Yes

This dataset is typical of data used in data mining: we have 1000 records.

Previous Lesson

‹ Case Study – German Credit – Steps to Build a Predictive Model

Next Lesson

German Credit Data : Data Preprocessing and Feature Selection in R ›

Join Our Facebook Group - Finance, Risk and Data Science

Posts You May Like

How to Improve your Financial Health

CFA® Exam Overview and Guidelines (Updated for 2021)

Changing Themes (Look and Feel) in ggplot2 in R

Coordinates in ggplot2 in R

Facets for ggplot2 Charts in R (Faceting Layer)

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Primary Sidebar

In this Course

  • 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

Latest Tutorials

    • Data Visualization with R
    • Derivatives with R
    • Machine Learning in Finance Using Python
    • Credit Risk Modelling in R
    • Quantitative Trading Strategies in R
    • Financial Time Series Analysis in R
    • VaR Mapping
    • Option Valuation
    • Financial Reporting Standards
    • Fraud
Facebook Group

Membership

Unlock full access to Finance Train and see the entire library of member-only content and resources.

Subscribe

Footer

Recent Posts

  • How to Improve your Financial Health
  • CFA® Exam Overview and Guidelines (Updated for 2021)
  • Changing Themes (Look and Feel) in ggplot2 in R
  • Coordinates in ggplot2 in R
  • Facets for ggplot2 Charts in R (Faceting Layer)

Products

  • Level I Authority for CFA® Exam
  • CFA Level I Practice Questions
  • CFA Level I Mock Exam
  • Level II Question Bank for CFA® Exam
  • PRM Exam 1 Practice Question Bank
  • All Products

Quick Links

  • Privacy Policy
  • Contact Us

CFA Institute does not endorse, promote or warrant the accuracy or quality of Finance Train. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.

Copyright © 2021 Finance Train. All rights reserved.

  • About Us
  • Privacy Policy
  • Contact Us