Internal function. Please refer to run_synthetic_forecast documentation.

prepare_dataset(
  df,
  df_elegible_units,
  col_unit_name,
  col_time,
  unit_of_interest,
  max_time_unit_of_interest
)

Arguments

df

Main DataFrame.

df_elegible_units

output from intern_elegile_units().

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.

unit_of_interest

Value of the col_unit_name that is of interest.

max_time_unit_of_interest

Outout from intern_get_max_time_unit_of_interest().

Value

A dataset to be inputed in the compute_synthetic_control().