Skip to contents

Unique loans, hooks of loans, and bridges across loans

ffp_hfid_loan_non_duplicate()
ffp_hfid_loan_non_duplicate
ffp_hfid_hook_pairs()
Function to generate paired loan start and end dates within households
ffp_hfid_bridge_from_hook()
Function to bridge loans from hook data
ffp_hfid_bridge_type()
ffp_hfid_bridge_type

Identify investments

Identify jumps in assets and build investment as unit of observation file with change in asset

ffp_hfid_invest_jump()
Function to calculate investment thresholds and identify large deviation jumps
ffp_hfid_invest_unique_dura()
Function to calculate unique investment durations
ffp_hfid_invest_combine()
Combine investment data from jump and dura files, final investment file
ffp_hfid_invest_gateway()
ffp_hfid_invest_gateway function

Generate windowed stats around investments

Generate windowed stats around investments

ff_hfid_invest_window()
Generate forward and backward investment windows around unique invest dates.
ff_hfid_invest_winstats()
Generate forward and backward investment asset stats by window.

Investment linked to sequences of loans

Link investments to loans and bridges

ffp_hfid_invest_loan_bridge_roster()
Stack investment, loan, and loan bridge files, with shared dates variables
ffp_hfid_invest_loan_or_bridge_linker()
Merge investments with loans by dates, merge investment with bridges by date.
ffp_hfid_invest_loan_linked()
Fully merge investment with loans and all bridges or loans with all investments, with attributes.

Categorize investment, loans and bridge linkages

Categorize investment, loans and bridge linkages

ffp_hfid_invest_loan_linked_abc_distinct()
Drop loans in loan-bridge B, C set of each investment if already in A, B.
ffp_hfid_invest_loan_linked_abc_bridge_char()
Calculate characteristics of triply linked bridge, per bridge.
ffp_hfid_invest_loan_linked_abc_investloan_char()
Calculate characteristics of investment to loan, hooks, and bridge characteristics, per investment.
ffp_hfid_invest_loan_linked_abc_investloan_char_gateway()
Wrapper function for investment-loan-bridge gateway workflow

Data files

Loan data files

Input data and benchmark analysis data

tstm_loans
Loan file
tstm_loans_panel
Loan repayment panel
tstm_loans_pn_nd
loan file from panel each row is a loan with unique start month, end month, and lender type.

Loans, hooks, and bridges data files

Input data and benchmark analysis data

tstm_loans_hooks
Hooked loan pairs
tstm_loans_bridges_type
Triply linked loan bridges

Investment data files

Input data and benchmark analysis data

tstm_invdates_uniq
Benchmark household unique investment dates
tstm_invest
Benchmark household investment file

Investment linked to loans and bridges data files

Investment, loans, and bridges

tstm_roster_invest2loan2bridge
Invest-loan roster with hooks and bridges, distinct bridges
tstm_roster_invest_loan_linked
Invest-loan roster with hooks and bridges
tstm_invest2loan2bridge_chars
Investment, loan/bridge characteristics file
tstm_invest_stats_bridgechar
Investment window stats with bridge-character labels

Auxillary data files

Auxillary data files

tstm_hh_mthspan
Household in survey months
tstm_asset_loan
Household monthly assets and loans
tstm_loans_amount
Household-month loan flow aggregates

Support files

Support files

ffs_hfid_path()
Local development path support
ffp_preview_dataset()
Preview a data frame for dataset documentation examples
ffp_save_res_table()
Save a table (LaTeX + optional CSV) to a res/ folder
ffp_save_res_figure()
Save a figure (PNG + EPS) to a res/ folder