##Running network simulations with EPIModelHIV and ergm.ego.
#Load required packages.
library(EpiModelHIV)
library(EpiModelHPC)
#devtools::install_github("statnet/ergm.ego-private",ref="3.7-compat", auth_token ="")
#devtools::install_github("statnet/tergmLite")
#devtools::install_github("statnet/ergm.ego")
library(ergm.ego)
library(tergmLite)
##Load data
load(file = "~/EpiModelHIV_shamp_modeling/scenarios/est/fitsmall.rda")
load(file = "~/EpiModelHIV_shamp_modeling/scenarios/est/data.params.rda")
source(file= "~/EpiModelHIV_SHAMP2/tests/age_mort.R")
############################################################################
##No infection
param <- param_shamp(data.params,
msm.aq.prob.B=.1,
msm.aq.prob.BI=.1,
msm.aq.prob.H=.1,
msm.aq.prob.HI=.1,
msm.aq.prob.W=.1)
init <- init_shamp()
control <- control_shamp(nsteps = 1040)
test_msmheatbath_max_infections<-netsim(est, param, init, control)
##Outside of package
save(test_msmheatbath_max_infections, file = "~/EpiModelHIV_shamp_modeling/scenarios/test_msmheatbath_max_infections.rda")
##Run the Check
table(test_msmheatbath_max_infections$attr[[1]]$inf.class)
table(test_msmheatbath_max_infections$attr[[1]]$status,test_msmheatbath_max_infections$attr[[1]]$race)
table(test_msmheatbath_max_infections$attr[[1]]$status,test_msmheatbath_max_infections$attr[[1]]$sex.ident)
test_msmheatbath_max_infections$epi$num.msmf[,1][1040]
test_msmheatbath_max_infections$epi$i.prev.msmf[,1][1040]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.