Skip to content

Issue in using NumberLocations #201

Description

@GanixGC

Bug description

Using GeoLift for the first time and stumbled upon function NumberLocations(). After GeoDataRead function, I used NumberLocations and getting this error:

image

Session information

Please paste the output after running sessionInfo() in your R session.
sessionInfo()
R version 4.4.0 (2024-04-24 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22631)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8 LC_MONETARY=English_United States.utf8
[4] LC_NUMERIC=C LC_TIME=English_United States.utf8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] gridExtra_2.3 GeoLift_2.7.4 lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4 purrr_1.0.2
[8] readr_2.1.5 tidyr_1.3.1 tibble_3.2.1 ggplot2_3.5.1 tidyverse_2.0.0

loaded via a namespace (and not attached):
[1] gtable_0.3.6 xfun_0.49 lattice_0.22-6 tzdb_0.4.0 quadprog_1.5-8
[6] vctrs_0.6.5 tools_4.4.0 generics_0.1.3 augsynth_0.2.0 parallel_4.4.0
[11] CausalImpact_1.3.0 sandwich_3.1-1 proxy_0.4-27 fansi_1.0.6 xts_0.14.1
[16] pkgconfig_2.0.3 MarketMatching_1.2.1 Matrix_1.7-0 rngtools_1.5.2 assertthat_0.2.1
[21] lifecycle_1.0.4 farver_2.1.2 compiler_4.4.0 progress_1.2.3 munsell_0.5.1
[26] codetools_0.2-20 gsynth_1.2.1 Formula_1.2-5 crayon_1.5.3 pillar_1.9.0
[31] panelView_1.1.18 MASS_7.3-60.2 doRNG_1.8.6 iterators_1.0.14 abind_1.4-8
[36] foreach_1.5.2 parallelly_1.40.1 tidyselect_1.2.1 digest_0.6.37 mvtnorm_1.3-2
[41] stringi_1.8.4 future_1.34.0 reshape2_1.4.4 listenv_0.9.1 labeling_0.4.3
[46] grid_4.4.0 colorspace_2.1-1 cli_3.6.2 lfe_3.1.0 magrittr_2.0.3
[51] utf8_1.2.4 withr_3.0.2 prettyunits_1.2.0 scales_1.3.0 timechange_0.3.0
[56] globals_0.16.3 Boom_0.9.15 zoo_1.8-12 hms_1.1.3 evaluate_1.0.1
[61] knitr_1.49 BoomSpikeSlab_1.2.6 dtw_1.23-1 doParallel_1.0.17 rlang_1.1.4
[66] Rcpp_1.0.13-1 xtable_1.8-4 glue_1.8.0 directlabels_2024.1.21 rstudioapi_0.16.0
[71] plyr_1.8.9 R6_2.5.1 bsts_0.9.10

Reproduction steps

Using the walk-through example data:

GeoTestData_PreTest <- GeoDataRead(data = GeoLift_PreTest,
date_id = "date",
location_id = "location",
Y_id = "Y",
X = c(), #empty list for now, as we have no covariates
format = "yyyy-mm-dd",
summary = T)

head(GeoTestData_PreTest)

resultsNum <- NumberLocations(data = GeoTestData_PreTest,
Y_id = "Y",
location_id = "location",
time_id = "time",
n_sim = 1000, # Number of simulations
treatment_periods = 10, # Length of treatment period in days
plot = TRUE, # Plot results
power = 0.8, # Desired power level (e.g., 80%)
alpha = 0.1, # Significance level (e.g., 0.1)
fixed_effects = TRUE, # Use fixed effects if needed
ProgressBar = TRUE) # Show progress bar during simulation

Expected behavior

Give a clear and concise description of what you expected to happen.

Output goes here

Additional context

Add any other context about the problem here. (like proxy settings, network setup, overall goals, etc.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions