loan file from panel each row is a loan with unique start month, end month, and lender type.
Source:R/data.R
tstm_loans_pn_nd.Rd
non-duplicate loan as unit of observation file with loan term, dates, categorization, summarized from tstm_loans_panel
, including aggregated loan principal and interest information from individual loans with identical dates and lender type.
Format
loan dataframe with various loan attributes
- hhid_num
household id
- hh_loan_id
loan id, individual-hh-specific loan id
- hh_loan_id_nd
non-duplicate loan id, sequential for all loans
- loan_start
loan start month
- loan_end
loan end month
- number_indi_loan
number of individual loans combined to generate this non-duplicate loan
- forinfm4
name of categorical variable defining loan group types
- loan_principal_interest
loan principal and interests aggregating over individual loans with the same dates and lender type
- loan_principal
loan_principal_interest
but without interests- loan_interest_monthly
monthly interest rate given aggregated interests and principals
Details
this is a subst of the non-duplicate rows from tstm_loans_pn
. we use this non-duplicate file as the basis for hook and bridge analysis.
Examples
data(tstm_loans_pn_nd)
summary(tstm_loans_pn_nd)
#> hhid_Num hh_loan_id_nd loan_start loan_end
#> Min. : 70203 Min. : 1 Min. : 0.0 Min. : 0.00
#> 1st Qu.:271027 1st Qu.: 4898 1st Qu.: 46.0 1st Qu.: 59.00
#> Median :490301 Median : 9794 Median : 77.0 Median : 90.00
#> Mean :376038 Mean : 9794 Mean : 78.3 Mean : 91.44
#> 3rd Qu.:490646 3rd Qu.:14690 3rd Qu.:113.0 3rd Qu.:127.00
#> Max. :531026 Max. :19587 Max. :160.0 Max. :160.00
#>
#> number_indi_loan forinfm4 loan_principal_interest loan_principal
#> Min. : 1.000 Length:19587 Min. : 0 Min. : 0
#> 1st Qu.: 1.000 Class :character 1st Qu.: 3350 1st Qu.: 3000
#> Median : 1.000 Mode :character Median : 11279 Median : 10048
#> Mean : 1.069 Mean : 24376 Mean : 22996
#> 3rd Qu.: 1.000 3rd Qu.: 21600 3rd Qu.: 20000
#> Max. :11.000 Max. :2309000 Max. :2000000
#> NA's :1634 NA's :1794
#> loan_interest_monthly
#> Min. :0.0000
#> 1st Qu.:0.0016
#> Median :0.0045
#> Mean : Inf
#> 3rd Qu.:0.0074
#> Max. : Inf
#> NA's :1808
print(tstm_loans_pn_nd)
#> # A tibble: 19,587 × 9
#> hhid_Num hh_loan_id_nd loan_start loan_end number_indi_loan forinfm4
#> <dbl> <int> <dbl> <dbl> <int> <chr>
#> 1 70203 1 12 14 1 Informal
#> 2 70203 2 15 15 1 Informal
#> 3 70203 3 39 51 1 Village-Fund
#> 4 70203 4 51 65 1 Village-Fund
#> 5 70203 5 64 65 1 Informal
#> 6 70203 6 64 67 1 Informal
#> 7 70203 7 65 74 1 Village-Fund
#> 8 70203 8 74 78 1 Informal
#> 9 70203 9 74 86 1 Village-Fund
#> 10 70203 10 77 125 1 Quasi-formal
#> # ℹ 19,577 more rows
#> # ℹ 3 more variables: loan_principal_interest <dbl>, loan_principal <dbl>,
#> # loan_interest_monthly <dbl>