ErrorMsg: running ART extension w/ nodefactor and nodematch #660
Replies: 1 comment 1 reply
-
Hello, I don't know all of the ins and outs of the current state of EpiModelHIV code, but I can parse the error you are seeing. It means that at least one node in the model does not have the attribute |
Beta Was this translation helpful? Give feedback.
-
Hi There,
I am trying to incorporate the HIV ART extension (https://github.com/EpiModel/EpiModel-Gallery/tree/master/2019-03-HIV) to a base EpiModel with a nodal attribute (i.e., high vs. low risk). I see the following error message when calling netsim():
Error in { :
task 1 failed - "In term 'nodefactor' in package 'ergm' (called from term 'Form (dynamic)', called from term 'Form' in package 'tergm'): Attribute '"risk"' has missing data, which is not currently supported by ergm."
I wonder if you can hint on what the error means? Or, is it possible to have the ART extension with nodal attributes? Here is how I initialize the conditions and my sessionInfo(). Thanks much!
h <- 600
k <- 100
status <- c(rep("i", k), rep("s", 2970-k), rep("i", h-k), rep("s", 2530-h+k))
init_ART <- init.net(status.vector = status)
control_ART <- control.net(type = NULL,
nsteps = 520,
nsims = 4,
ncores = 5,
infection.FUN = infect,
progress.FUN = progress,
departures.FUN = dfunc,
arrivals.FUN = afunc,
resimulate.network = TRUE,
verbose = TRUE,
epi.by = "risk",
module.order = c("resim_nets.FUN", "progress.FUN",
"infection.FUN", "departures.FUN",
"arrivals.FUN", "prevalence.FUN"))
param_ART <- param.net(inf.prob.chronic = 0.01,
relative.inf.prob.acute = 10,
relative.inf.prob.AIDS = 5,
relative.inf.prob.ART = 0.05,
act.rate = 4,
AcuteToChronic1.Rate = 1/12,
Chronic1ToChronic2.Rate = 1/260,
Chronic2ToAIDS.Rate = 1/260,
ART.Treatment.Rate = 0.01,
ART.Discontinuance.Rate = 0.005,
ART.Progression.Reduction.Rate = 0.5,
AIDSToDepart.Rate = 1/104,
arrival.rate = 0.002,
departure.rate = 0.003)
sim_ART <- netsim(est1_ART, param_ART, init_ART, control_ART)
R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] EpiModel_2.2.1 statnet.common_4.5.0 tergm_4.0.2 ergm_4.1.2 networkDynamic_0.11.1 network_1.17.1 deSolve_1.31 forcats_0.5.1
[9] stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 readr_2.1.2 tidyr_1.2.0 tibble_3.1.6 ggplot2_3.3.5 tidyverse_1.3.1
loaded via a namespace (and not attached):
[1] httr_1.4.2 jsonlite_1.7.3 foreach_1.5.2 modelr_0.1.8 assertthat_0.2.1 cellranger_1.1.0 yaml_2.2.2
[8] robustbase_0.93-9 pillar_1.7.0 backports_1.4.1 lattice_0.20-45 glue_1.6.1 digest_0.6.29 RColorBrewer_1.1-2
[15] rvest_1.0.2 colorspace_2.0-2 htmltools_0.5.2 Matrix_1.3-4 pkgconfig_2.0.3 broom_0.7.12 haven_2.4.3
[22] scales_1.1.1 tzdb_0.2.0 generics_0.1.2 ellipsis_0.3.2 cachem_1.0.6 withr_2.4.3 lazyeval_0.2.2
[29] cli_3.1.1 magrittr_2.0.2 crayon_1.4.2 readxl_1.3.1 evaluate_0.14 memoise_2.0.1 fs_1.5.2
[36] fansi_1.0.2 doParallel_1.0.17 nlme_3.1-153 MASS_7.3-54 xml2_1.3.3 tools_4.1.2 hms_1.1.1
[43] lifecycle_1.0.1 trust_0.1-8 munsell_0.5.0 reprex_2.0.1 compiler_4.1.2 rlang_1.0.1 grid_4.1.2
[50] rstudioapi_0.13 iterators_1.0.14 rmarkdown_2.11 gtable_0.3.0 codetools_0.2-18 DBI_1.1.2 R6_2.5.1
[57] lpSolveAPI_5.5.2.0-17.7 rle_0.9.2 lubridate_1.8.0 knitr_1.37 fastmap_1.1.0 utf8_1.2.2 ape_5.6-2
[64] stringi_1.7.6 parallel_4.1.2 Rcpp_1.0.8 vctrs_0.3.8 DEoptimR_1.0-10 dbplyr_2.1.1 tidyselect_1.1.1
[71] xfun_0.29 coda_0.19-4
Beta Was this translation helpful? Give feedback.
All reactions