epimodel / epimodelcovid Goto Github PK
View Code? Open in Web Editor NEWNetwork-Based Epidemic Modeling of Transmission Dynamics for SARS-CoV-2
Network-Based Epidemic Modeling of Transmission Dynamics for SARS-CoV-2
related to EpiModel/EpiModelHIV-p#191
When filtering for eligible IDs for case investigation (e.g., status in c(a,ic,ip)), noticing that these are not always translating into the IDs being pulled by the get_partners() for the discordant edgelist.
For example: my idsEligCI are: 15, 657, 759, and 835. The index IDs in the discordant edgelist are 15, 659, 761, and 837. Seems like this is an issue with the positional versus unique IDs.
Relevant code for this issue: [https://github.com/EpiModel/EpiModelCOVID/blob/ContactTrace/R/mod-intervention.R]
Lines 27-28
idsEligCI <- which(active == 1 & status %in% c("a", "ic", "ip") & dxStatus == 2 & is.na(eligible.case))
Line 45
del_ct <- get_partners(dat, idsEligCI)
Hello Sam,
This is Nisarg, part of the group adapting your cruise code for the hospital context. I was looking for your help to provide an insight into why "nw = 1" in line 221 of "mod-infection.R" , within the "discord_edgelist_covid_ship" function?
I noticed it did not seem to affect the outcome for the patient/ healthcare worker parameters (different parameter values for # of patients, health care workers & rooms compared to the cruise ship code) if I change it to "nw" or "nw=2" since the infection function is dependent on the network selected on the discordant edge.*
Thanks a lot for your help,
Nisarg
*edit: changing it to nw or nw=2 did have an effect on the cruise ship code. limiting the simulation output to both crew and passengers & only passengers respectively.
See implementation in corporate moduleset.
Updates needed for init and simnet modules for ContactTrace
Remove bespoke calc_nwstats functions in package.
In running R CMD check on ContactTrace, we are getting this as a NOTE:
resim_nets_covid_contacttrace: no visible global function definition
for ‘%n%<-’
resim_nets_covid_contacttrace: no visible global function definition
for ‘%n%’
resim_nets_covid_contacttrace: no visible global function definition
for ‘as.edgelist’
resim_nets_covid_corporate: no visible global function definition for
‘%n%<-’
resim_nets_covid_corporate: no visible global function definition for
‘%n%’
resim_nets_covid_corporate: no visible global function definition for
‘as.edgelist’
resim_nets_covid_ship: no visible global function definition for
‘%n%<-’
resim_nets_covid_ship: no visible global function definition for ‘%n%’
resim_nets_covid_ship: no visible global function definition for
‘as.edgelist’
Undefined global functions or variables:
%n% %n%<- as.edgelist layer
Is this something we get also with EpiModelHIV? Is it an issue with imports?
In mod_infection.R, infect_covid_corporate()
and infect_covid_contacttrace()
reference del$dx
but that variable is never set (it does not exist).
# Case isolation with diagnosed or symptomatic infection
if (at >= act.rate.dx.inter.time) {
del$actRate[del$dx == 2] <- del$actRate[del$dx == 2] *
act.rate.dx.inter.rr
}
Parallel issue to https://github.com/EpiModel/EpiModelHIV-p/issues/141 for EpiModelCOVID
Running the test script for Kristin's EpiModelCOVID, I am encountering this error:
A ERROR occured in module 'initialize.FUN' at step `Initialization Step` (1)
Error: Can't recycle input of size 4 to size 5.
Run `rlang::last_error()` to see where the error occurred.
within update_cumlative_edgelist
specifically at the line:
terminated_edges <- is.na(el_cuml[["current"]]) & is.na(el_cuml[["stop"]])
if (any(terminated_edges)) {
el_cuml[terminated_edges, ][["stop"]] <- at - 1
}
Relevant files for reproducing the error:
For example, it calls init_tergmLite
, which has been removed in the multinets
branch.
I will spend some time reviewing this package and updating initialization/simulation as appropriate for pending core EpiModel changes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.