Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epi-scenario-2 #3

Open
djinnome opened this issue Feb 26, 2024 · 0 comments
Open

epi-scenario-2 #3

djinnome opened this issue Feb 26, 2024 · 0 comments
Assignees

Comments

@djinnome
Copy link

djinnome commented Feb 26, 2024

Scenario 2: Mediation Analysis

image
  1. The simulated data provided was generated by the causal Directed Acyclic Graph (DAG) in Figure 1 above, which represents the relationships between vaccination status, wearing masks, contracting Covid-19, hospitalization, and recovery. The data were generated via a discrete event simulation. Note that in the causal model above:
    • Whether you wear a mask affects your probability of contracting Covid.
    • Whether you are vaccinated affects your probability of wearing a mask, your probability of contracting Covid, and your probability of getting hospitalized once you have Covid.
    • You cannot become hospitalized without contracting Covid first.
    • Each node represents a discrete random variable with two possible values (True, False).
    • Everyone who gets hospitalized fully recovers.

In the graph above, one should interpret an edge between nodes A and B (A $\rightarrow$ B) as “the value of A affects the probability of B occurring” and NOT “A must occur for B to occur”. In that sense, “vaccination $\rightarrow$ mask” should be understood as someone's vaccination status affecting the probability that they decide to wear a mask. Similarly, “vaccination $\rightarrow$ hosp” should be interpreted as someone`s vaccination status affects the probability that they become hospitalized (if they contract Covid-19.)

In this simulation, there are 10000 individuals in a population and a fixed proportion are eligible to be vaccinated every day. The simulation runs for 1000 days. Whether an individual masks or not is influenced by their vaccination status, but it can also change day-to-day.

There is one vaccine in circulation. The vaccine takes effect immediately. The vaccine provides full immunity immediately upon vaccination, but the immunity declines linearly (to no immunity) over the course of 90 days. One cannot be vaccinated a second time.

There are two files associated with this question:
full-fixed-vax.csv contains the full simulation output (in long format), where the proportion of people who are eligible to be vaccinated every day is fixed.
daily-summary-fixed-vax.csv takes the output from full-fixed-vax.csv, groups it by time, and computes sums of those with covid, those hospitalized, those vaccinated, and those recovered every day (i.e. “daily summaries” of those four states).

Using the information and data provided, estimate:
a. The (direct) effect of vaccination on the likelihood of becoming infected with Covid
b. The (indirect) effect of vaccination on the likelihood of becoming infected with Covid
c. The effect of masking as a mediator on the likelihood of becoming infected with Covid
d. The causal effects of vaccination on the likelihood of becoming hospitalized, if infected with Covid

  1. In Question 1, a fixed proportion of people are eligible to be vaccinated every day. In this question, the proportion of people who can be vaccinated can change every day. How does this impact the estimated effects above?

There are two files associated with this question, which are analogous to the two described in Question 1 above:

full-random-vax.csv contains the full simulation output (in long format), where the proportion of people who are eligible to be vaccinated every day is random.
daily-summary-random-vax.csv takes the output from full-random-vax.csv, groups it by time, and computes sums of those with covid, those hospitalized, those vaccinated, and those recovered every day (i.e. “daily summaries” of those four states).

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

When branches are created from issues, their pull requests are automatically linked.

2 participants