ReplaceTreatmentSplit: Replace Treatment locations to be able to use them for...

View source: R/pre_processing_data.R

ReplaceTreatmentSplitR Documentation

Replace Treatment locations to be able to use them for continuous GeoLift studies.

Description

[Experimental]

ReplaceTreatmentSplit chooses the best treatment location to replace with their control, given the L2 imbalance that each individual treatment has. Then re-estimates the remaining treatment locations using the replaced treatment as part of the control donor pool.

Usage

ReplaceTreatmentSplit(
  treatment_locations,
  data,
  treatment_start_time,
  treatment_end_time,
  model,
  verbose = FALSE,
  Y_id = "Y",
  time_id = "time",
  location_id = "location",
  X = c(),
  fixed_effects = TRUE
)

Arguments

treatment_locations

Vector of locations where the treatment was applied.

data

DataFrame that GeoLfit will use to determine a result. Should be the output of GeoDataRead.

treatment_start_time

Time index of the start of the treatment.

treatment_end_time

Time index of the end of the treatment.

model

A string indicating the outcome model used to augment the Augmented Synthetic Control Method. Augmentation through a prognostic function can improve fit and reduce L2 imbalance metrics.

  • "None": ASCM is not augmented by a prognostic function. Defualt.

  • "Ridge": Augments with a Ridge regression. Recommended to improve fit for smaller panels (less than 40 locations and 100 time-stamps.))

  • "GSYN": Augments with a Generalized Synthetic Control Method. Recommended to improve fit for larger panels (more than 40 locations and 100 time-stamps.

verbose

boolean that determines if processing messages will be shown.

Y_id

Name of the outcome variable (String).

time_id

Name of the time variable (String).

location_id

Name of the location variable (String).

X

Vector with covariates names.

fixed_effects

A logic flag indicating whether to include unit fixed effects in the model. Set to TRUE by default.

Value

list that contains:

  • "data": Data with replaced values for treatment locations during treatment period.

  • "l2_imbalance_df": Ranking of treatment locations based on L2 imbalance for each iteration.


facebookincubator/GeoLift documentation built on May 31, 2024, 10:09 a.m.