Shared slides

Again, please share your results with us and the other participants along the way by adding them to the shared slideshow here. We will use this slideshow to discuss our findings together.

3. Using the temporal/tiered PC algorithm (TPC)

We will now make use of the fact that the variables in nlsdata are organized in three temporal tiers, corresponding to the survey round in which they were measured: r1, r6, and r12.

3.1 Apply the temporal PC algorithm

Run the temporal PC algorithm:

# Define temporal background knowledge 
tempoinfo <- knowledge(nlsdata, 
                       tier(r1 ~ r1_mcollege + r1_urban + r1_hhchildren, 
                            r6 ~ r6_depressed + r6_docvisits + r6_exercise, 
                            r12 ~ r12_depressed + r12_docvisits + r12_health))

# Run temporal PC algorithm
tpcres <- disco(nlsdata, tpc(engine = "causalDisco", 
                             test = "reg", 
                             alpha = 0.05),
                knowledge = tempoinfo)

Plot the result (plot(tpcres)) and compare it with what you found in exercise 1.2 (ordinary PC algorithm):

  • Where do the to graphs agree, where do they disagree?
  • Which graph is more informative, i.e. holds more causal information? In terms of omitted adjacencies? In terms of orientations?
  • What proposed causal relationships in the new TPC result do you not trust?
  • What proposed causal relationships in the new TPC result do you find to be plausible?
  • Which of the two graphs, pcres and tpcres, do you find to be overall most plausible?

3.2 Changing the tiers

We will now make three alternative versions of the temporal background knowledge where variables are assigned differently to tiers:

# new temporal background knowledge where mcollege is assigned to its own 
# (first) tier named r0:
tempoinfo_4tiers <-knowledge(nlsdata, 
                             tier(r0 ~ r1_mcollege,
                                  r1 ~ r1_urban + r1_hhchildren, 
                                  r6 ~ r6_depressed + r6_docvisits + r6_exercise, 
                                  r12 ~ r12_depressed + r12_docvisits + r12_health))

# new temporal background knowledge where r1 and r6 are collapsed into one 
# (named r1_r6)
tempoinfo_bigearly <-knowledge(nlsdata, 
                             tier(r1_r6 ~ r1_mcollege + r1_urban + r1_hhchildren +
                                          r6_depressed + r6_docvisits + r6_exercise, 
                                  r12 ~ r12_depressed + r12_docvisits + r12_health))


# new temporal background knowledge where r6 and r12 are collapsed into one 
# (named r6_r12)
tempoinfo_biglate <-knowledge(nlsdata, 
                              tier(r1 ~ r1_mcollege + r1_urban + r1_hhchildren, 
                                   r6_r12 ~ r6_depressed + r6_docvisits +
                                            r6_exercise + r12_depressed +
                                            r12_docvisits + r12_health))

Run the TPC algorithm with each of these new knowledge objects using this code:

tpcres_4tiers <- disco(nlsdata, tpc(engine = "causalDisco", 
                             test = "reg", alpha = 0.05),
                knowledge = tempoinfo_4tiers)

tpcres_bigearly <- disco(nlsdata, tpc(engine = "causalDisco", 
                             test = "reg", alpha = 0.05),
                knowledge = tempoinfo_bigearly)
tpcres_biglate <- disco(nlsdata, tpc(engine = "causalDisco", 
                             test = "reg", alpha = 0.05),
                knowledge = tempoinfo_biglate)

Look at each of the models, and compare them with each other and the results from 3.1 and 2.1. Which version of tiered information seems to be most useful for the algorithm?

3.3 Update your CPDAG

Now, consider whether you want to change any parts of our first attempt at an expert CPDAG for these data, based on what you found using TPC.

  • Draw a new updated CPDAG. You can take a photo of it and share it in our joint slideshow.

3.4 Significance level or choice of variables

Go back to exercises 2.1, or 2.4 and rerun them using the TPC algorithm instead of the PC algorithm.