Selection Bias Assignment

Selection Bias Assignment

by Maria Glymour -
Number of replies: 0

Modify your data generation code from last week to match the following causal DAG (I can't figure out how to post the DAG - it's in the attached word document... if anyone else can figure out how to post directly please do so):

Where S1 and S2 are indicators for whether an observation is selected into the analysis (ie, when S1=0 or S2=0, the observations are excluded). 

Write out data generating rules to match this causal DAG for at least 2 values S1 (e.g., S1 = 1 for 90% of observations vs S1=1 for 50% of observations) and 2 values for S2.  Please be sure that your data generating model entails that U influences X, Y, and S2.

For each, write a simulation model generating data with N=500 individuals following these data generating rules.  Report the structural causal model for each variable in the DAG, including the distributions of the error terms.  Use the statistical method of your choice to estimate the effect of X on Y in each scenario, assuming that U is unmeasured (ie, your estimate will likely be biased because you cannot account for U).

Now assume the null, that X has no effect on Y.  Under each of your four scenarios above, what is:

-          The average estimate of the effect of X on Y (ie, if you repeat your chosen statistical analysis across repeated iterations, what is the average value of the parameter estimate for the association between X and Y)?

-           the type 1 error rate using an alpha threshold of 0.05 (ie, the percent of iterations under which you would find a statistically significant association between X and Y, using a p<.05 threshold)?