Internal function. Please refer to run_synthetic_forecast documentation.

intern_elegile_units(
  df,
  col_unit_name,
  col_time,
  max_time_unit_of_interest,
  periods_to_forecast
)

Arguments

df

Main DataFrame.

col_unit_name

String with column name of the column with the units names.

col_time

String with the column name of the time column.

max_time_unit_of_interest

Outout from intern_get_max_time_unit_of_interest().

periods_to_forecast

(Integer) Number of periods to forecast.

Value

DataFrame with the columns: (i) col_unit_name and (ii) manter (bool)

Details

Selects the elegible units to build the synthetic control: Rule the elegible units are the units that have at least max_time_unit_of_interest + periods_to_forecast time periods.