I've been trying out the package today and I am encountering an error when running the GeoLiftPowerFinder
function
resultsNum <- NumberLocations(data = GeoTestData_PreTest,
Y_id = "Y",
location_id = "location",
time_id = "time",
n_sim = 500,
treatment_periods = 6, #6 weeks
plot = TRUE,
power = 0.8,
alpha = 0.1,
fixed_effects = TRUE,
ProgressBar = TRUE)
#Zipcode test Selection
resultsSearch <- GeoLiftPower.search(data = GeoTestData_PreTest,
treatment_periods = c(6),
N = c(2),
horizon = -50, #six weeks
Y_id = "Y",
location_id = "location",
time_id = "time",
top_results = 2,
alpha = 0.1,
type = "pValue",
fixed_effects = TRUE,
ProgressBar = TRUE)
head(resultsSearch,5)
#MDE
resultsFind <- GeoLiftPowerFinder(data = GeoTestData_PreTest,
treatment_periods = c(6),
N = c(2),
Y_id = "Y",
location_id = "location",
time_id = "time",
effect_size = seq(0.1),
top_results = 1,
alpha = 0.1,
model = "Ridge",
fixed_effects = TRUE,
ProgressBar = TRUE,
plot_best = TRUE)