-
Notifications
You must be signed in to change notification settings - Fork 0
/
ageSPVL_m08.R
51 lines (43 loc) · 1.13 KB
/
ageSPVL_m08.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
library(evonet)
options(error=browser) # go into debug mode on error
#--------------------------------------------------------------
initial_pop = 1000
mean_sqrt_age_diff = 1.5
meandeg = 0.7
param_list=list(
model_name = "08.lessagemix",
nw_form_terms = "~edges+absdiff('sqrt_age') + offset(nodematch('role',diff=TRUE, keep=1:2))",
target_stats = c(initial_pop*meandeg/2, mean_sqrt_age_diff*initial_pop*meandeg/2),
#mean_sex_acts_day = 0.2,
min_age = 18,
max_age = 55,
#age_dist = seq(50, 10, -10/9)/1110,
initial_agedata_male = "linear_decrease",
nw_coef_form = c(-Inf, -Inf),
prob_sex_by_age = TRUE,
prob_sex_age_19 = 0.3,
max_age_sex = 55,
nsims = 1,
initial_pop = initial_pop,
initial_infected = 100,
n_steps = 365*20,
popsumm_frequency=30,
fast_edgelist=T,
plot_nw=F
)
evoparams <- do.call(evonet_setup,param_list)
nw <- nw_setup(evoparams)
modules <- c(
"aging",
"testing",
"treatment",
"viral_update",
"coital_acts",
"transmission",
"deaths",
"births",
"summary_module"
)
evomodel <- evorun(modules,evoparams,nw)
ageSPVL_m08 <- evomodel
save(ageSPVL_m08, file="ageSPVL_m08.rda")