USCCANA / netdiffuseR

netdiffuseR: Analysis of Diffusion and Contagion Processes on Networks
https://USCCANA.github.io/netdiffuseR
Other
85 stars 21 forks source link

Split netdiffuseR into multiple packages #22

Open gvegayon opened 6 years ago

gvegayon commented 6 years ago

I like the idea of following what statnet has done. Having a baseline "common" package with the basic structure and methods, and from that deploying a set of offspring packages with specific goals. It makes it easier to maintain and easier to the user to figure out what they need.

At first, I can think of the following structure:

And netdiffuseR as an R package that installs all of it.

What do you think @twvalente @srpitts?

srpitts commented 6 years ago

@gvegayon That sounds good to me! If you want to discuss breaking it apart, I'm happy to. Anything that makes it easier to maintain is a plus. Something I always want to do on this is contribute to vignettes & help files!

gvegayon commented 6 years ago

That'll be nice, and more than about splitting it apart, I think it is a good idea to talk about the future of the package. I was talking to Tom and Kayla about putting more efforts on the simulation bit, as I have the impression that that is one of the most useful features of the package. Also, there's statnet's EpiModel R package which might do exactly that...

George G. Vega Yon +1 (626) 381 8171 http://cana.usc.edu/vegayon

On Tue, Oct 24, 2017 at 3:46 AM, Stephanie Pitts notifications@github.com wrote:

@gvegayon https://github.com/gvegayon That sounds good to me! If you want to discuss breaking it apart, I'm happy to. Anything that makes it easier to maintain is a plus. Something I always want to do on this is contribute to vignettes & help files!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/USCCANA/netdiffuseR/issues/22#issuecomment-338950546, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2is9ror5Q-kF0yzKwjbNluDElnDhy1ks5svcAfgaJpZM4QDNl_ .

srpitts commented 6 years ago

Good point--- we should look more into EpiModel. I have a goal of after next Monday being able to contribute again to things like this. There's also this R package: https://cran.r-project.org/web/packages/spatialnbda/index.html that we should look into as well, that we were looking at a long while back.

gvegayon commented 6 years ago

On NBDA

That package looks very interesting but does not make much sense without the paper:

Nightingale GF, Laland KN, Hoppitt W, Nightingale P (2015) Bayesian Spatial NBDA for Diffusion Data with Home-Base Coordinates. PLoS ONE10(7): e0130326. https://doi.org/10.1371/journal.pone.0130326

(BTW, as you may be aware now, I wrote to the author of the package asking about NBDA without the spatial component).

But from what I see, this is an extension to this paper's model (which I'm sure we've all seen before :]) (BTW, by the same people/lab!): Mathias Franz, Charles L. Nunn (2009) Network-based diffusion analysis: a new method for detecting social learning. Proc. R. Soc. B 2009 276 1829-1836; DOI: 10.1098/rspb.2008.1824. Published 6 April 2009

They have R implementations of this: https://lalandlab.st-andrews.ac.uk/freeware/ but not as an R package.

On EpiModel

I've been going through the manual and running some of the examples that they have. It seems that there's a way to specify how the infection/suscept process works, but I haven't got there yet. Still, it seems very flexible, and one of its strengths is that it is built on top of ERGM (statnet), so before simulating the process it estimates TERGMS and uses those parameters to run the simulations in which the network can actually be affected by the "disease". I'll share more with you as soon as I have an idea of whether we can use this or not to model contagion processes other than disease.

George G. Vega Yon +1 (626) 381 8171 http://cana.usc.edu/vegayon

On Mon, Oct 30, 2017 at 5:39 PM, Stephanie Pitts notifications@github.com wrote:

Good point--- we should look more into EpiModel. I have a goal of after next Monday being able to contribute again to things like this. There's also this R package: https://cran.r-project.org/web/packages/spatialnbda/ index.html that we should look into as well, that we were looking at a long while back.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/USCCANA/netdiffuseR/issues/22#issuecomment-340625787, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2is4GlDEDBoXdyYep7r7BS2X0so-Ueks5sxmxBgaJpZM4QDNl_ .

gvegayon commented 6 years ago

By the way, here I have a work-in-progress document going though EpiModel https://github.com/USCCANA/netdiffuseR/blob/master/playground/epimodel/epimodel_notes.md#notes-on-the-epimodel-r-package

srpitts commented 6 years ago

I'm very interested in where this is going--- and sorry I didn't send the papers on NBDA--- I actually have those from long ago. Next week I hope to begin looking into this further. I have a deadline on Monday, but will redirect my free time that I spend on work to this after then. I'm interested in the ability to specify how the diffusion process works with the EpiModel package.

gvegayon commented 6 years ago

Hey, so I just made a last commit on this side project that should be the starting point for splitting netdiffuseR, readnet. The idea is that the survey-reading functions (and other data import-like functions) to be hold here, and use netdiffuseR as a wrapper around this. Currently, the only functions that I have are survey_to_edgelist (which is similar to what is survey_to_diffnet) and a couple of other functions to coerce the objects into igraph objects. I'm kind of stuck here as I'm not fully sure of what are the needs of the potential users... any clues?