Skip to content

Adding stochastic transmission mode to expure and rdiffnet#68

Draft
aoliveram wants to merge 4 commits intomasterfrom
stochastic-transmission
Draft

Adding stochastic transmission mode to expure and rdiffnet#68
aoliveram wants to merge 4 commits intomasterfrom
stochastic-transmission

Conversation

@aoliveram
Copy link
Member

This PR addresses feature A in Issue #67

Some errors in the first checks are expected.

@aoliveram aoliveram self-assigned this Dec 10, 2025
Copy link
Member

@gvegayon gvegayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines 625 to +626
# Step 2.1: Checking class of TOA and coercing if necessary
if (!inherits(toa, "integer")) {
if (!is.integer(toa)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change? inherits() is the proper way to check for classes in R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants