Skip to contents

[Stable]

Calculate the Aggregate ATT Confidence Intervals

Usage

ConfIntervals(
  augsynth,
  treatment_start_time,
  treatment_end_time,
  alpha,
  stat_func,
  method,
  grid_size,
  conformal_type,
  ns
)

Arguments

augsynth

Augsynth object.

treatment_start_time

Time index of the start of the treatment.

treatment_end_time

Time index of the end of the treatment.

alpha

Significance level. Set to 0.1 by default.

stat_func

Function to compute the test statistic.

method

A string indicating the method used to calculate the aggregate ATT Confidence Intervals.

"conformal":

Conformal Inference.

"jackknife+":

Jackknife+.

grid_size

Number of grid points to use when inverting the hypothesis test for Conformal Inference.

conformal_type

Type of conformal inference used. Can be either "iid" for Independent and identically distributed or "block" for moving block permutations. Set to "iid" by default.

ns

Number of resamples for "iid" permutations if conformal_type = "iid. Set to 1000 by default.

Value

List the Confidence Interval for the specified alpha.

Examples

# \donttest{
geo_test <- GeoDataRead(GeoLift_Test, date_id = "date", location_id = "location",
  Y_id = "Y", format = "yyyy-mm-dd")
fit <- ASCMExecution(data = geo_test, treatment_locations = c("chicago", "portland"),
  treatment_start_time = 91, treatment_end_time = 105)
ConfIntervals(fit$augsynth_model, treatment_start_time = 91, treatment_end_time = 105,
  alpha = 0.1, stat_func = type_of_test("two_sided"), method = "conformal",
  grid_size = 20, conformal_type = "iid", ns = 100)
#> Conformal method of Confidence Interval calculation unsuccessful. Changing Confidence Interval calculation method to jackknife+.
#> [1] -81.69127 378.33090
# }