Investment window stats with bridge-character labels
Source:R/data-res.R
tstm_invest_stats_bridgechar.RdHousehold x investment spell x balance-sheet outcome x asset ivars, with
forward/backward window means and investloan_type_m8 bridge categories.
Used for regressions of win_diff on capital_invest (see
stata/invest_rev_diff_250519.do and
R-script/ffv_invest_return_bridge/fs_invest_return.R).
Format
A data frame with one row per spell x ivars x blnc_vars x
blnc_agg_stats (analysis filter: finite windows, non-missing
investloan_type_m8).
- id
Anonymized household ID (
tmid_hh); join totm_key_id_hhfor village- hh_inv_ctr
Household investment span counter
- blnc_vars
Balance-sheet outcome (e.g.
IS_1111,IS_1011)- blnc_agg_stats
Aggregation (
mean,sum)- win_backward
Backward-window mean of
blnc_vars- win_forward
Forward-window mean of
blnc_vars- win_diff
win_forward - win_backward- win_ratio
Ratio of forward to backward window means
- ivars
Capital-asset variable (
agg_BS_1021,agg_BS_1012,agg_BS_1011,agg_BS_3022; seestata/invest_rev_diff_250519.do)- hh_inv_asset_ctr
Spell counter within household x
ivars- mth_inv_start, mth_inv_end
Investment span months
- capital_prior, capital_end, capital_invest
Capital levels and investment size
- investloan_type_m8
Eight-category bridge / loan linkage type
- investloan_type_m8_cat2
Collapsed bridge-type dummy (2-category)
- investloan_type_m8_cat2v2
Collapsed bridge-type dummy (2-category, variant)
- investloan_type_m8_cat3
Collapsed bridge-type dummy (3-category)
- investloan_type_m8_cat4
Collapsed bridge-type dummy (4-category)
- thres_inv_mgap
Month gap allowed to merge investment jumps into one spell
- thres_inv_dfsd
Standard-deviation threshold for counting an investment jump
- bl_meets_size, bl_meets_start, bl_has_investloan_type_m8
Filter flags from vignette
- id_prov
Anonymized province ID (
tmid_prov) fromtm_key_id_hh- id_village
Anonymized village ID (
tmid_vil) fromtm_key_id_hh- bl_id_ne
1 if
region_name == "Northeast"intm_key_id_hh; else 0- N_households
Village household count from
census_vil_hh_structure_count- mth_gap_mbf
mth_inv_start - 37(months relative to MBF start)- mth_gap_mbf_cat
Year bin label (
-2yr,-1yr,yr1, ...,yr9)- mth_gap_mbf_cat_int
Integer year bin (-2, -1, 1, ..., 9)
Source
Built by
vignettes/ffv_invest_return_bridge.qmd
(12-month forward/backward windows). Set bl_replace_data_output <- TRUE to
overwrite data/tstm_invest_stats_bridgechar.rda.
Examples
if (FALSE) { # \dontrun{
data(tstm_invest_stats_bridgechar)
ffp_preview_dataset(tstm_invest_stats_bridgechar)
} # }