calc_win function

Automatically calculate rolling window

Automatically calculate rolling window

The calculated value is used to determine the rolling window for rolling regressions.

calc_win(dt, width, by, msg)

Arguments

  • dt: data.frame object.
  • width: numeric.
  • by: string.
  • msg: string. Attach function name for message (usually auto_rate)

Returns

a numeric