Closed Spatial-R closed 4 years ago
This looks like a problem with the starting values of the samplers. Which example are you trying to run?
The running codes are as followed:
data(EuropeCovid)
# Collect args for epim
args <- EuropeCovid
args$algorithm <- "sampling"
args$group_subset <- c("Germany", "United_Kingdom")
args$sampling_args <- list(iter=1e3,seed=12345)
# model for reproduction number
args$rt <- epirt(
formula = R(country, date) ~ schools_universities + self_isolating_if_ill +
public_events + lockdown + social_distancing_encouraged,
prior = shifted_gamma(shape = 1/6, scale = 1, shift = log(1.05)/6)
)
# model for daily death observations
deaths <- epiobs(
formula = deaths(country, date) ~ 1,
prior_intercept = rstanarm::normal(0.01, 0.0001),
i2o = EuropeCovid$obs$deaths$i2o,
prior_aux = rstanarm::normal(location=10, scale=2)
)
args$obs <- list(deaths = deaths)
fit <- do.call(epim, args)
R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Catalina 10.15.4
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] epidemia_0.6.0 data.table_1.12.8 EpiNow2_1.1.0 readr_1.3.1 stringi_1.4.6
[6] spatPomp_0.1.2 cowplot_1.0.0 ggsci_2.9 gtable_0.3.0 reshape2_1.4.3
[11] ggplot2_3.3.0 gdata_2.18.0 pomp_2.7 tidyr_1.0.2 lubridate_1.7.4
[16] dplyr_0.8.5
"[1] "Error in sampler$call_sampler(args_list[[i]]) : "
[2] " empty_nested() must be true before calling recover_memory()"
"
This seems to be a problem with stan/rstanarm and your system;
See https://cran.r-project.org/web/checks/check_results_rstanarm.html for another occurrence of this.
Unfortunately we will not be able to help you with this error. Maybe try things on a different system?
@Spatial-R seems like you may have not specified the correct exponential family and link for your model
Hello, thanks for your nice package. When running the example, we got the following errors:
Is there any solution to this problem?