Skip to contents

Implements step 1 of https://github.com/FanWangEcon/PrjThaiHFID/issues/22 _notes/issues/issues_20240217_roster_invest_bridge.md

Usage

ffp_hfid_invest_loan_bridge_roster(
  df_invdates_uniq,
  df_loans_bridges_type,
  df_loans_pn_nd,
  verbose = FALSE,
  verbose_detail = FALSE,
  it_verbose_detail_nrow = 100
)

Arguments

df_invdates_uniq

A data frame containing unique investment dates.

df_loans_bridges_type

A data frame containing bridge loan information.

df_loans_pn_nd

A data frame containing distinct timing and lender type loan information.

verbose

A logical value indicating whether to print verbose output. Default is FALSE.

verbose_detail

A logical value indicating whether to print verbose detail output. Default is FALSE.

it_verbose_detail_nrow

An integer specifying the number of rows to print for verbose detail output. Default is 100.

Value

A list containing the roster of investments, loans, and bridges.

See also

Used by vignette(s) ffv_invest_loan_bridge. Related issue(s): PrjThaiHFID-#32.

Author

Fan Wang, http://fanwangecon.github.io

Examples

df_invdates_uniq <- PrjThaiHFID::tstm_invdates_uniq
df_loans_bridges_type <- PrjThaiHFID::tstm_loans_bridges_type
df_loans_pn_nd <- PrjThaiHFID::tstm_loans_pn_nd
ls_return <- ffp_hfid_invest_loan_bridge_roster(
  df_invdates_uniq, df_loans_bridges_type, df_loans_pn_nd
)
#> Adding missing grouping variables: `br_type`, `br_type_id`
print(ls_return)
#> $tstm_roster_invest_loan_bridge
#> # A tibble: 82,593 × 8
#> # Groups:   hhid_Num [773]
#>    hhid_Num roster_type_id mth_start mth_end roster_type br_type br_type_id
#>       <int>          <int>     <dbl>   <dbl> <chr>       <chr>        <int>
#>  1     1003              1         1       1 investment  NA              NA
#>  2     1031              1         9       9 investment  NA              NA
#>  3     1031              2        71      71 investment  NA              NA
#>  4     1031              3        80      80 investment  NA              NA
#>  5     1031              4       154     154 investment  NA              NA
#>  6     1046              1         1       1 investment  NA              NA
#>  7     1046              2       120     120 investment  NA              NA
#>  8     1059              1         5       5 investment  NA              NA
#>  9     1059              2        16      16 investment  NA              NA
#> 10     1059              3        48      48 investment  NA              NA
#> # ℹ 82,583 more rows
#> # ℹ 1 more variable: mth_gap <dbl>
#>