Skip to contents

Generate forward and backward window.

Usage

ff_hfid_invest_window(
  df_invdates_uniq,
  it_window_forward = 3,
  it_window_backward = 3,
  bl_forward_include_imth = FALSE,
  bl_backward_include_imth = FALSE
)

Arguments

df_invdates_uniq

Dataframe with investments unique dates, see Step B of PrjThaiHFID-issue-1.

it_window_forward

Integer forward window period count

it_window_backward

Integer backward window period count

bl_forward_include_imth

Boolean includes start invest border period in forward window, if invest window is start 2, end 4, if bl_forward_include_imth=TRUE, then forward window will be inclusive of invest end period 4.

bl_backward_include_imth

Boolean includes start invest border period in backward window, see bl_forward_include_imth.

Value

A dataset: Household X Investment (with Unique timing) X Window X Month.

References

PrjThaiHFID-issue-2

Author

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