error from netsim_hpc() #627
Unanswered
LizFearon
asked this question in
EpidemicMethods
Replies: 2 comments
-
Hi @LizFearon and sorry for the delayed answer, have you tried running your model with |
Beta Was this translation helpful? Give feedback.
0 replies
-
Moving this over to a discussion from an issue. Feel free to continue the discussion there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am getting an error using netsim_hpc() when using EpiModelHIV and EpiModelHPC . I am using a list of 3 saved network models and init, param and control objects using the init_msm(), param_msm() and control_msm() functions. The output and error message I get is:
STARTING Simulation 1
Running new simulation from list object ...Error in UseMethod("as.control.list") :
no applicable method for 'as.control.list' applied to an object of class "control.net"
I am currently trying to run a simple example (in terms of the epidemic dynamics) to just check I can go through the steps to simulate an HIV epidemic over main, casual and one-time sexual partnership networks, but I have not been able to work out what I need to do to correct this. (I am not using ARTnet.) I think the error might be arising from the check.control.class function in the netsim function called by netsim_hpc but haven’t been able to work out how to correct this. Do you have any suggestions? Thank you.
My code is:
act.rate = 0.1345
epistats <- c(acts.scale = 1,
cond.scale = 1)
param <- param_msm(netstats = st,
epistats=epistats,
inf.prob = 0.006,
act.rate = act.rate
)
init <- init_msm(
prev.B = 0.05,
)
control <- control_msm(simno = 1,
nsims = 2,
ncores = 1,
nsteps = 52,
start = 1)
sim1 <- netsim_hpc("nairobi_fit.rda",
param = param,
init = init,
control = control,
cp.save.int = NULL,
verbose = TRUE)
The nairobi_fit.rda contains a list of 3 partnership network models (main formation+dissolution, casual formation+dissolution and one-time).
st is a nwstats object.
R version 4.1.1 (2021-08-10)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Catalina 10.15.7
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] EpiModelHIV_1.5.0 EpiModelHPC_2.1.1 EpiModel_2.1.0 statnet.common_4.5.0-381
[5] tergmLite_2.5.0 tergm_4.0.2 ergm_4.1-6757 networkDynamic_0.11.0
[9] network_1.17.1 deSolve_1.30
loaded via a namespace (and not attached):
[1] pkgload_1.2.3 foreach_1.5.1 robustbase_0.93-9 remotes_2.4.1
[5] sessioninfo_1.1.1 pillar_1.6.4 lattice_0.20-44 glue_1.5.0
[9] RColorBrewer_1.1-2 colorspace_2.0-2 Matrix_1.3-4 pkgconfig_2.0.3
[13] devtools_2.4.2 purrr_0.3.4 mvtnorm_1.1-3 scales_1.1.1
[17] processx_3.5.2 tibble_3.1.6 proxy_0.4-26 generics_0.1.1
[21] ggplot2_3.3.5 usethis_2.1.0 ellipsis_0.3.2 cachem_1.0.6
[25] withr_2.4.2 lazyeval_0.2.2 cli_3.1.0 magrittr_2.0.1
[29] crayon_1.4.2 memoise_2.0.0 ps_1.6.0 fs_1.5.0
[33] fansi_0.5.0 doParallel_1.0.16 nlme_3.1-152 MASS_7.3-54
[37] class_7.3-19 pkgbuild_1.2.0 tools_4.1.1 prettyunits_1.1.1
[41] lifecycle_1.0.1 stringr_1.4.0 trust_0.1-8 munsell_0.5.0
[45] callr_3.7.0 compiler_4.1.1 e1071_1.7-9 rlang_0.4.12
[49] grid_4.1.1 iterators_1.0.13 bindata_0.9-20 testthat_3.1.0
[53] gtable_0.3.0 codetools_0.2-18 R6_2.5.1 lpSolveAPI_5.5.2.0-17.7
[57] rle_0.9.2 dplyr_1.0.7 fastmap_1.1.0 utf8_1.2.2
[61] rprojroot_2.0.2 desc_1.4.0 ape_5.5 stringi_1.7.5
[65] parallel_4.1.1 Rcpp_1.0.7 vctrs_0.3.8 DEoptimR_1.0-9
[69] tidyselect_1.1.1 coda_0.19-4
Beta Was this translation helpful? Give feedback.
All reactions