Adding stochastic transmission mode to expure and rdiffnet#68
Adding stochastic transmission mode to expure and rdiffnet#68
Conversation
…ion to 1.25.0, and fix exposure rownames issue
gvegayon
left a comment
There was a problem hiding this comment.
I see you are still working on this, @aoliveram. I've always thought that the random component is needed. Nonetheless, I have my doubts about the way this is implemented. Isn't this equivalent to multiplying the exposure by a random uniform vector? I think that would be the case.
Option B is what aligns better with @twvalente, have the exposure represent a probability of adoption. Furthermore, this approach would be better if you consider that, in the case of attribute-weighted exposure, individuals who have a higher effect on ego won't randomly drop from the equation (Which is what option B is doing).
Let me know what are your thoughts, @aoliveram.
| # Step 2.1: Checking class of TOA and coercing if necessary | ||
| if (!inherits(toa, "integer")) { | ||
| if (!is.integer(toa)) { |
There was a problem hiding this comment.
Why this change? inherits() is the proper way to check for classes in R.
|
I see your point clearly, @gvegayon, but to me both have their distinct value on their own. Option A, edge based stochasticity, could apply if you are interested in modelling something like the friction of daily encounters: "individual A is important to me, but today I simply didn't check his social media or run into him in the hallway, so his opinion today had zero weight in my social landscape." |
Yes, I understand those are not equivalent. My thought was that the way you implemented option A was too complex, suggesting that it would suffice to multiply the exposure by r ~ U(0,1). In reality, the two following approaches yield the same mean: With |
This PR addresses feature A in Issue #67
Some errors in the first checks are expected.