Household and investment (unique start and end months) as units of observation. This
is a file derived from tstm_invest
, considering only unique investment spans.
Format
Household and investment (unique start and end) file
- id
Household ID
- hh_inv_ctr
Unique household investment span counter
- mth_inv_start
Start time of unique investment span
- mth_inv_end
End time of unique investment span
- thres_inv_mgap
Month gap allowed to merge investment jump together as one investment
- thres_inv_dfds
Standard deviation threshold for counting investment jump
Details
Benchmark file with benchmark investment standard deviation, and investment gap allowance parameters. Multiple alternative investment variables are jointly considered and unique investment windows from across investment variables are found. Within household, investment spans can overlap due to them coming from different investment variable definitions.
Examples
data(tstm_invdates_uniq)
summary(tstm_invdates_uniq)
#> thres_inv_mgap thres_inv_dfsd id hh_inv_ctr
#> Min. :2 Min. :2.326 Min. : 70201 Min. : 1.000
#> 1st Qu.:2 1st Qu.:2.326 1st Qu.:270219 1st Qu.: 2.000
#> Median :2 Median :2.326 Median :490106 Median : 3.000
#> Mean :2 Mean :2.326 Mean :345374 Mean : 3.578
#> 3rd Qu.:2 3rd Qu.:2.326 3rd Qu.:490626 3rd Qu.: 5.000
#> Max. :2 Max. :2.326 Max. :531026 Max. :16.000
#> mth_inv_start mth_inv_end
#> Min. : 1.00 Min. : 1.00
#> 1st Qu.: 38.00 1st Qu.: 38.00
#> Median : 75.00 Median : 75.00
#> Mean : 76.21 Mean : 76.31
#> 3rd Qu.:114.00 3rd Qu.:114.00
#> Max. :160.00 Max. :160.00
print(tstm_invdates_uniq)
#> # A tibble: 3,744 × 6
#> # Groups: id [754]
#> thres_inv_mgap thres_inv_dfsd id hh_inv_ctr mth_inv_start mth_inv_end
#> <dbl> <dbl> <dbl> <int> <dbl> <dbl>
#> 1 2 2.33 70201 1 18 18
#> 2 2 2.33 70202 1 31 31
#> 3 2 2.33 70202 2 63 63
#> 4 2 2.33 70202 3 102 102
#> 5 2 2.33 70202 4 111 111
#> 6 2 2.33 70202 5 123 123
#> 7 2 2.33 70202 6 147 147
#> 8 2 2.33 70202 7 147 148
#> 9 2 2.33 70202 8 148 148
#> 10 2 2.33 70203 1 28 28
#> # ℹ 3,734 more rows