Lab 3.1: Make a Plot

Jose Gabriel Rodriguez Murillo

Data Overview

Data Structure

   Age Gender Housing Saving accounts Checking account Credit amount Duration
1   67   male     own            <NA>           little          1169        6
2   22 female     own          little         moderate          5951       48
3   49   male     own          little             <NA>          2096       12
4   45   male    free          little           little          7882       42
5   53   male    free          little           little          4870       24
6   35   male    free            <NA>             <NA>          9055       36
7   53   male     own      quite rich             <NA>          2835       24
8   35   male    rent          little         moderate          6948       36
9   61   male     own            rich             <NA>          3059       12
10  28   male     own          little         moderate          5234       30
               Purpose Class Risk
1             radio/TV          1
2             radio/TV          2
3            education          1
4  furniture/equipment          1
5                  car          2
6            education          1
7  furniture/equipment          1
8                  car          1
9             radio/TV          1
10                 car          2
     Age Gender Housing Saving accounts Checking account Credit amount Duration
991   37   male     own            <NA>             <NA>          3565       12
992   34   male     own        moderate             <NA>          1569       15
993   23   male    rent            <NA>           little          1936       18
994   30   male     own          little           little          3959       36
995   50   male     own            <NA>             <NA>          2390       12
996   31 female     own          little             <NA>          1736       12
997   40   male     own          little           little          3857       30
998   38   male     own          little             <NA>           804       12
999   23   male    free          little           little          1845       45
1000  27   male     own        moderate         moderate          4576       45
                 Purpose Class Risk
991            education          1
992             radio/TV          1
993             radio/TV          1
994  furniture/equipment          1
995                  car          1
996  furniture/equipment          1
997                  car          1
998             radio/TV          1
999             radio/TV          2
1000                 car          1
'data.frame':   1000 obs. of  9 variables:
 $ Age             : num  67 22 49 45 53 35 53 35 61 28 ...
 $ Gender          : chr  "male" "female" "male" "male" ...
 $ Housing         : chr  "own" "own" "own" "free" ...
 $ Saving accounts : chr  NA "little" "little" "little" ...
 $ Checking account: chr  "little" "moderate" NA "little" ...
 $ Credit amount   : num  1169 5951 2096 7882 4870 ...
 $ Duration        : num  6 48 12 42 24 36 24 36 12 30 ...
 $ Purpose         : chr  "radio/TV" "radio/TV" "education" "furniture/equipment" ...
 $ Class Risk      : num  1 2 1 1 2 1 1 1 1 2 ...

Summary Statistics

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    250    1366    2320    3271    3972   18424 
   vars    n    mean      sd median trimmed     mad min   max range skew
X1    1 1000 3271.26 2822.74 2319.5 2754.57 1627.15 250 18424 18174 1.94
   kurtosis    se
X1     4.25 89.26
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
    4.0    12.0    18.0    20.9    24.0    72.0 
   vars    n mean    sd median trimmed mad min max range skew kurtosis   se
X1    1 1000 20.9 12.06     18   19.47 8.9   4  72    68 1.09      0.9 0.38

free  own rent 
 108  713  179 

Plot

Insights

The chart was created based on the “german” dataset from the package “datasetsICR”. This visual uses ‘Credit Amount’ as the x-axis, ‘Credit Duration’ in the y-axis and ‘Housing Type’ as the dots and lines colors. Regarding to the findings, the general conclusion drawn from the visual is the positive relationship between ‘Credit Amount’ and ‘Credit Duration’, where the higher is the credit duration, the higher is the credit amount.

The ‘Housing Type’ variable shows a very diverse range of credit amounts and credit duration, and it is hard to see if there is a relationship between the housing type with the length or amount of the loan.