Open Weiren-Wang opened 3 years ago
Hi,
In SatScan, are you using the prospective space-time model? Because as far as I understand, the scan_pb_possion
function implemented in this package is only for prospective analysis, as he referenced Kulldorff 2001.
Hi Benjamin, I used the scan_pb_poisson to conduct space-time analysis with my dataset and I found that the results given by scan_pb_poisson and the result given by the software SatScan were quite different. My dataset is a day-frequency disease counts data, range from 2020/12/31 to 2021/4/14.It contains 10 locations with latitude and longitude. For SatScan,here is the settings: [Input] Time precision : Day Coordinates : Lat/Long [Analysis] Type of Analysis : Space-Time Probability Model : Poissson Scan For Area With : High rates And for scan_pb_possion,here is my code : `counts = SZ_counts %>% df_to_matrix(time_col = "time", location_col = "region", value_col = "count") population = SZ_counts %>% df_to_matrix(time_col = "time", location_col = "region", value_col = "population") zones = SZ_geo %>% select(long, lat) %>% as.matrix %>% spDists(x = ., y = ., longlat = TRUE) %>% dist_to_knn(k = 4) %>% knn_zones regions = as.character(SZ_geo$region) result = data.frame() newcounts = counts newpopulation = population poisson_result = scan_pb_poisson(counts = newcounts, zones = zones, population = newpopulation, n_mcsim = 999) topclusters = top_clusters(poisson_result, zones, k = 10, overlapping = FALSE)