Code Monkey home page Code Monkey logo

epimodelcovid's Issues

Mismatch in positional and unique IDs using get_partners() function

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)

Looking for clarification on "discord_edgelist_covid_ship" function

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.

Global function definitions

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
     foras.edgelistresim_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 foras.edgelistresim_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 foras.edgelistUndefined global functions or variables:
     %n% %n%<- as.edgelist layer

Is this something we get also with EpiModelHIV? Is it an issue with imports?

del$dx referenced but not set

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
        }

Error in update_cumlative_edgelist with ContactTrace branch

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:

  1. Script: https://github.com/EpiModel/COVID-ContactTrace/blob/updatePackages/R/03-epi-model-calib.R (use this updatePackages branch for now)
  2. Package: https://github.com/EpiModel/EpiModelCOVID/tree/ContactTrace

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.