Examples
d1<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 3,R02 = 0.3,R012 = 0.1,R11 = 2.5,R12 = 1,R112 = 1)
d1$R01=3
d2<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 1.6,R02 = 0.3,R012 = 0.1,R11 = 2.5,R12 = 1,R112 = 1)
d2$R01=1.6
d3<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 1.4,R02 = 0.3,R012 = 0.1,R11 = 2.5,R12 = 1,R112 = 1)
d3$R01=1.4
d4<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 1.1,R02 = 0.3,R012 = 0.1,R11 = 2.5,R12 = 1,R112 = 1)
d4$R01=1.1
d<-rbind(d1,d2,d3,d4)
d %>% pivot_longer(c(2:7)) %>% separate(name,into=c("Class", "group"), sep=1,remove=FALSE) %>% filter(Class !="S") -> dd
ggplot(dd,aes(x=time,y=value,col=name)) + geom_line() +facet_wrap(~R01) + geom_vline(aes(xintercept=100),col="grey")
d1<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 3,R02 = 0.3,R012 = 0.1,R11 = 2.5,R12 = 1,R112 = 1)
d1$R012=0.1
d2<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 3,R02 = 0.3,R012 = 0.4,R11 = 2.5,R12 = 1,R112 = 1)
d2$R012=0.4
d3<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 3,R02 = 0.3,R012 = 0.6,R11 = 2.5,R12 = 1,R112 = 1)
d3$R012=0.6
d4<-run_sim(gamma = 0.2,days1 = 100,days2= 100,R01 = 3,R02 = 0.3,R012 = 1,R11 = 2.5,R12 = 1,R112 = 1)
d4$R012=1
d<-rbind(d1,d2,d3,d4)
d %>% pivot_longer(c(2:7)) %>% separate(name,into=c("Class", "group"), sep=1,remove=FALSE) %>% filter(Class !="S") -> dd
ggplot(dd,aes(x=time,y=value,col=name)) + geom_line() +facet_wrap(~R012) + geom_vline(aes(xintercept=100),col="grey")