Giter Site home page Giter Site logo

causal_inference_r_workshop's People

Contributors

lucymcgowan avatar malcolmbarrett avatar tgerke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

causal_inference_r_workshop's Issues

typos in g-comp exercises

We create a dataset wait_times but we accidentally use seven_dwarfs instead for the subsequent sections

Not all parks open at 8?

re: the continuous example. May need to switch to a later time.

Need to update the book example if so

Re-work continuous exposure section

  • Use g-comp
  • brief slides at end on using propensity scores
  • for last part, include how to check, e.g. difference in bootstraps, bootstrap distribution, etc
  • make current exercises for PS bonus?

need to get propensity's continuous functionality up and running to streamline the last bit

Re-order material

  • Quartets after DAGs
  • Selection bias to bonus
  • Remove g-comp section (moving to cont.)

Closely related to the cont. section re-work which I will post a separate issue for

Add solutions folder

We'll have to be mindful of updating solutions any time we update the exercises

rules for associational flow in DAG slides?

I've given the following 4 rules in the past which help identify when/why an association exists between variables. Not necessary to belabor it in the lectures, but could be a useful touchpoint to understand what dag_paths() is doing under the hood.

  1. If no variables are conditioned upon, an association path is blocked when two arrowheads collide at some variable
  2. A path that contains a noncollider that has been conditioned upon is blocked
  3. A collider that has been conditioned upon does not block a path
  4. Conditioning on a descendent of a collider does not block a path

Switch whole game example?

There are pros and cons to revisiting the same question in different ways. We need to let this marinate

Tweak tipr section

  • Update to recent version of tipr
  • Add adjust example
  • Show with a simulated confounder?
  • If simulating something like age, actually show how we would do the SMD for the argument

ggdag warning re: segment.alpha

This pops up in the whole game exercises, for example

> smk_wt_dag |>
Warning messages:
1: Unknown or uninitialised column: `segment.alpha`. 
2: Unknown or uninitialised column: `segment.alpha`. 
3: Unknown or uninitialised column: `segment.alpha`. 
4: Unknown or uninitialised column: `segment.alpha`. 
+   ggdag(text = FALSE, use_labels = "label")

I searched a bit through {ggdag} but wasn't able to find an obvious source. Not urgent since things work as-is, would just be good to fix to tidy and prevent questions.

Censoring with Disney data

@LucyMcGowan in the G-comp section we do a loss-to-follow-up model to account for censoring using the NHEFS data. Do we have anything we can use for that in the Disney data sets?

Switch to Quarto

  • Write theme extension matching our slides
  • Switch slides
  • Tweak slides to make more consistent
  • Switch exercises
  • add hex stickers

Use smd package for SMDs and love plots

For basic calculation, it's not too rough to get SMDs with the smd pkg + dplyr

library(smd)
library(dplyr, warn.conflicts = FALSE)

mtcars %>% 
  mutate(wts = runif(n())) %>% 
  summarise(
    across(
      c(mpg, disp, hp), 
      ~smd(.x, am, wts)$estimate)
  )
#>    mpg      disp     hp
#> 1 -1.808428 2.198783 1.064067

Created on 2021-09-02 by the reprex package (v2.0.1)

Additionally, gtsummary will have SMDs in a new update, potentially supporting weights. It also supports fully-weighted tables via survey and gtsummary::tbl_svysummary().

I think we should break this up into two steps 1) SMDs, weighted SMDS, love plots & friends with smd() 2) creating weighted tables with gtsummary + survey

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.