diff --git a/slides/00-intro.html b/slides/00-intro.html index bc84026..133fc39 100644 --- a/slides/00-intro.html +++ b/slides/00-intro.html @@ -12,7 +12,7 @@ class: center, middle, inverse, title-slide # Causal Inference in R: Introduction -### 2020-07-29 (updated: 2020-11-18) +### 2020-07-29 (updated: 2020-12-01) --- diff --git a/slides/00-intro.pdf b/slides/00-intro.pdf index b006afd..8106a47 100644 Binary files a/slides/00-intro.pdf and b/slides/00-intro.pdf differ diff --git a/slides/01-causal_modeling_whole_game.html b/slides/01-causal_modeling_whole_game.html index 4bac6e1..1d5d5b0 100644 --- a/slides/01-causal_modeling_whole_game.html +++ b/slides/01-causal_modeling_whole_game.html @@ -12,7 +12,7 @@ class: center, middle, inverse, title-slide # Causal Modeling in R: Whole Game -### 2020-07-29 (updated: 2020-11-18) +### 2020-07-29 (updated: 2020-12-01) --- diff --git a/slides/01-causal_modeling_whole_game.pdf b/slides/01-causal_modeling_whole_game.pdf index 7373b9b..251c9ea 100644 Binary files a/slides/01-causal_modeling_whole_game.pdf and b/slides/01-causal_modeling_whole_game.pdf differ diff --git a/slides/01-causal_modeling_whole_game_files/figure-html/unnamed-chunk-6-1.png b/slides/01-causal_modeling_whole_game_files/figure-html/unnamed-chunk-6-1.png index 4a0c35f..230efc5 100644 Binary files a/slides/01-causal_modeling_whole_game_files/figure-html/unnamed-chunk-6-1.png and b/slides/01-causal_modeling_whole_game_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/slides/02-dags.html b/slides/02-dags.html index 7ab3bd7..7467605 100644 --- a/slides/02-dags.html +++ b/slides/02-dags.html @@ -14,7 +14,7 @@ class: center, middle, inverse, title-slide # Causal Diagrams in R -### 2020-07-29 (updated: 2020-11-18) +### 2020-07-29 (updated: 2020-12-01) --- @@ -144,7 +144,7 @@ ### We're going to assume that coffee does not cause cancer, so there's no formula for that. But we still need to declare our causal question. Specify "coffee" as the exposure and "cancer" as the outcome (both in quotations marks). ### Plot the DAG using `ggdag()` -
+
05:00
@@ -225,7 +225,7 @@ ### Call `tidy_dagitty()` on `coffee_cancer_dag` to create a tidy DAG, then pass the results to `dag_paths()`. What's different about these data? ### Plot the open paths with `ggdag_paths()`. (Just give it `coffee_cancer_dag` rather than using `dag_paths()`; the quick plot function will do that for you.) Remember, since we assume there is *no* causal path from coffee to lung cancer, any open paths must be confounding pathways. -
+
05:00
@@ -312,7 +312,7 @@ #### Use `ggdag_adjustment_set()` to visualize the adjustment sets. Add the arguments `use_labels = "label"` and `text = FALSE`. #### Write an R formula for each adjustment set, as you might if you were fitting a model in `lm()` or `glm()` -
+
05:00
diff --git a/slides/02-dags.pdf b/slides/02-dags.pdf index 7e36cbd..02eb760 100644 Binary files a/slides/02-dags.pdf and b/slides/02-dags.pdf differ diff --git a/slides/02-dags_files/figure-html/unnamed-chunk-19-1.png b/slides/02-dags_files/figure-html/unnamed-chunk-19-1.png index 9c1efb1..f81a59c 100644 Binary files a/slides/02-dags_files/figure-html/unnamed-chunk-19-1.png and b/slides/02-dags_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/slides/03-pscores.html b/slides/03-pscores.html index eabb94e..92052bf 100644 --- a/slides/03-pscores.html +++ b/slides/03-pscores.html @@ -4,10 +4,10 @@ Propensity Scores - - - - + + + + @@ -17,7 +17,7 @@ # Propensity Scores ### Lucy D’Agostino McGowan ### Wake Forest University -### 2020-07-29 (updated: 2020-11-18) +### 2020-07-29 (updated: 2020-12-01) --- @@ -168,7 +168,7 @@ ## Your turn -
+
07:00
diff --git a/slides/03-pscores.pdf b/slides/03-pscores.pdf index 5df436c..1271532 100644 Binary files a/slides/03-pscores.pdf and b/slides/03-pscores.pdf differ diff --git a/slides/04-using-pscores.html b/slides/04-using-pscores.html index ee3d087..4bf1b34 100644 --- a/slides/04-using-pscores.html +++ b/slides/04-using-pscores.html @@ -4,10 +4,10 @@ Using Propensity Scores - - - - + + + + @@ -17,7 +17,7 @@ # Using Propensity Scores ### Lucy D’Agostino McGowan ### Wake Forest University -### 2020-12-02 (updated: 2020-11-24) +### 2020-12-02 (updated: 2020-12-01) --- @@ -105,77 +105,77 @@ ``` ## Rows: 806 ## Columns: 71 -## $ i <chr> "11", "1220", "15", "1082", "18", "534", "23", "697… -## $ subclass <fct> 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, … -## $ weights <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … -## $ seqn <dbl> 428, 23045, 446, 22294, 596, 14088, 618, 18085, 806… -## $ qsmk <dbl> 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, … -## $ death <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 1, … -## $ yrdth <dbl> NA, NA, 88, NA, NA, NA, NA, NA, NA, NA, 85, NA, 84,… -## $ modth <dbl> NA, NA, 1, NA, NA, NA, NA, NA, NA, NA, 1, NA, 10, 6… -## $ dadth <dbl> NA, NA, 3, NA, NA, NA, NA, NA, NA, NA, 22, NA, 17, … -## $ sbp <dbl> 135, 159, 141, 113, 151, NA, 125, 135, 144, 135, 12… -## $ dbp <dbl> 89, 91, 79, 73, 80, NA, 71, 85, 76, 88, 83, 95, 56,… -## $ sex <fct> 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, … -## $ age <dbl> 43, 49, 71, 36, 48, 51, 56, 40, 47, 70, 57, 62, 72,… -## $ race <fct> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, … -## $ income <dbl> 19, 22, 17, 21, 18, 22, 20, 18, 22, 18, NA, 19, 12,… -## $ marital <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 5, 3, … -## $ school <dbl> 12, 12, 0, 12, 12, 9, 12, 10, 17, 16, 12, 17, 10, 1… -## $ education <fct> 3, 3, 1, 3, 3, 2, 3, 2, 5, 5, 3, 5, 2, 3, 3, 2, 3, … -## $ ht <dbl> 176.5938, 160.2812, 147.0938, 174.5938, 164.0000, 1… -## $ wt71 <dbl> 63.96, 47.29, 75.64, 68.38, 62.03, 71.10, 60.78, 63… -## $ wt82 <dbl> 79.83226, 53.07031, 56.69905, 73.48196, 70.30682, 7… -## $ wt82_71 <dbl> 15.8722571, 5.7803073, -18.9409537, 5.1019639, 8.27… -## $ birthplace <dbl> 42, 30, NA, 19, 36, 47, NA, 42, 42, 39, 18, 1, 25, … -## $ smokeintensity <dbl> 30, 20, 40, 9, 2, 5, 20, 5, 30, 30, 7, 2, 20, 20, 1… -## $ smkintensity82_71 <dbl> -30, 0, -40, 1, -2, 1, -20, 0, -30, -10, -7, -2, -2… -## $ smokeyrs <dbl> 24, 29, 41, 30, 30, 29, 11, 20, 23, 40, 35, 23, 40,… -## $ asthma <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, … -## $ bronch <dbl> 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, … -## $ tb <dbl> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, … -## $ hf <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ hbp <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 1, 2, 0, 0, 0, 2, 0, … -## $ pepticulcer <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ colitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ hepatitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ chroniccough <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, … -## $ hayfever <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, … -## $ diabetes <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, … -## $ polio <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ tumor <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ nervousbreak <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ alcoholpy <dbl> 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, … -## $ alcoholfreq <dbl> 3, 0, 4, 0, 1, 2, 3, 1, 3, 0, 2, 0, 1, 0, 3, 3, 4, … -## $ alcoholtype <dbl> 3, 3, 4, 1, 2, 3, 4, 1, 2, 3, 3, 3, 3, 1, 4, 3, 4, … -## $ alcoholhowmuch <dbl> 2, 2, NA, 6, 1, 3, NA, 5, 1, 3, 1, 1, 2, 1, NA, 5, … -## $ pica <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, … -## $ headache <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, … -## $ otherpain <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, … -## $ weakheart <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ allergies <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ nerves <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ lackpep <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ hbpmed <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 1, 2, 0, 0, 0, 2, 0, … -## $ boweltrouble <dbl> 0, 2, 1, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, … -## $ wtloss <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ infection <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, … -## $ active <fct> 1, 2, 1, 0, 1, 0, 0, 0, 0, 1, 2, 1, 1, 1, 1, 2, 1, … -## $ exercise <fct> 1, 1, 1, 0, 1, 0, 2, 0, 0, 2, 2, 0, 2, 1, 2, 2, 1, … -## $ birthcontrol <dbl> 2, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 0, 0, 0, 1, 0, … -## $ pregnancies <dbl> NA, 4, 15, NA, 3, NA, 4, 2, NA, 5, NA, NA, 4, NA, 5… -## $ cholesterol <dbl> 173, 279, 229, 200, 225, 199, 230, 195, 328, 247, 2… -## $ hightax82 <dbl> 0, 0, NA, 0, 0, 0, NA, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1… -## $ price71 <dbl> 2.346680, 2.104980, NA, 2.199707, 2.241699, 2.18359… -## $ price82 <dbl> 1.797363, 1.698242, NA, 1.847900, 1.828125, 1.73999… -## $ tax71 <dbl> 1.3649902, 1.0498047, NA, 1.1022949, 1.0498047, 1.1… -## $ tax82 <dbl> 0.5718994, 0.4399414, NA, 0.5718994, 0.5059814, 0.4… -## $ price71_82 <dbl> 0.54931641, 0.40686035, NA, 0.35174561, 0.41357422,… -## $ tax71_82 <dbl> 0.7929688, 0.6099854, NA, 0.5303955, 0.5439453, 0.6… -## $ id <int> 11, 1274, 15, 1135, 18, 564, 23, 736, 27, 925, 32, … -## $ censored <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ older <dbl> 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, … -## $ distance <dbl> 0.2384597, 0.2381918, 0.2090935, 0.2091562, 0.40078… +## $ i <chr> "11", "1220", "15", "1082", "18… +## $ subclass <fct> 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6… +## $ weights <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1… +## $ seqn <dbl> 428, 23045, 446, 22294, 596, 14… +## $ qsmk <dbl> 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1… +## $ death <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1… +## $ yrdth <dbl> NA, NA, 88, NA, NA, NA, NA, NA,… +## $ modth <dbl> NA, NA, 1, NA, NA, NA, NA, NA, … +## $ dadth <dbl> NA, NA, 3, NA, NA, NA, NA, NA, … +## $ sbp <dbl> 135, 159, 141, 113, 151, NA, 12… +## $ dbp <dbl> 89, 91, 79, 73, 80, NA, 71, 85,… +## $ sex <fct> 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0… +## $ age <dbl> 43, 49, 71, 36, 48, 51, 56, 40,… +## $ race <fct> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0… +## $ income <dbl> 19, 22, 17, 21, 18, 22, 20, 18,… +## $ marital <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2… +## $ school <dbl> 12, 12, 0, 12, 12, 9, 12, 10, 1… +## $ education <fct> 3, 3, 1, 3, 3, 2, 3, 2, 5, 5, 3… +## $ ht <dbl> 176.5938, 160.2812, 147.0938, 1… +## $ wt71 <dbl> 63.96, 47.29, 75.64, 68.38, 62.… +## $ wt82 <dbl> 79.83226, 53.07031, 56.69905, 7… +## $ wt82_71 <dbl> 15.8722571, 5.7803073, -18.9409… +## $ birthplace <dbl> 42, 30, NA, 19, 36, 47, NA, 42,… +## $ smokeintensity <dbl> 30, 20, 40, 9, 2, 5, 20, 5, 30,… +## $ smkintensity82_71 <dbl> -30, 0, -40, 1, -2, 1, -20, 0, … +## $ smokeyrs <dbl> 24, 29, 41, 30, 30, 29, 11, 20,… +## $ asthma <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ bronch <dbl> 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0… +## $ tb <dbl> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0… +## $ hf <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ hbp <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 1… +## $ pepticulcer <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ colitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ hepatitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ chroniccough <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0… +## $ hayfever <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ diabetes <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0… +## $ polio <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ tumor <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ nervousbreak <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ alcoholpy <dbl> 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1… +## $ alcoholfreq <dbl> 3, 0, 4, 0, 1, 2, 3, 1, 3, 0, 2… +## $ alcoholtype <dbl> 3, 3, 4, 1, 2, 3, 4, 1, 2, 3, 3… +## $ alcoholhowmuch <dbl> 2, 2, NA, 6, 1, 3, NA, 5, 1, 3,… +## $ pica <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0… +## $ headache <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1… +## $ otherpain <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0… +## $ weakheart <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ allergies <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ nerves <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ lackpep <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ hbpmed <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 1… +## $ boweltrouble <dbl> 0, 2, 1, 2, 0, 0, 0, 0, 0, 2, 0… +## $ wtloss <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ infection <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ active <fct> 1, 2, 1, 0, 1, 0, 0, 0, 0, 1, 2… +## $ exercise <fct> 1, 1, 1, 0, 1, 0, 2, 0, 0, 2, 2… +## $ birthcontrol <dbl> 2, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2… +## $ pregnancies <dbl> NA, 4, 15, NA, 3, NA, 4, 2, NA,… +## $ cholesterol <dbl> 173, 279, 229, 200, 225, 199, 2… +## $ hightax82 <dbl> 0, 0, NA, 0, 0, 0, NA, 0, 0, 0,… +## $ price71 <dbl> 2.346680, 2.104980, NA, 2.19970… +## $ price82 <dbl> 1.797363, 1.698242, NA, 1.84790… +## $ tax71 <dbl> 1.3649902, 1.0498047, NA, 1.102… +## $ tax82 <dbl> 0.5718994, 0.4399414, NA, 0.571… +## $ price71_82 <dbl> 0.54931641, 0.40686035, NA, 0.3… +## $ tax71_82 <dbl> 0.7929688, 0.6099854, NA, 0.530… +## $ id <int> 11, 1274, 15, 1135, 18, 564, 23… +## $ censored <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ older <dbl> 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1… +## $ distance <dbl> 0.2384597, 0.2381918, 0.2090935… ``` --- @@ -287,77 +287,77 @@ ``` ## Rows: 780 ## Columns: 71 -## $ i <chr> "11", "1220", "15", "1082", "18", "534", "23", "697… -## $ subclass <fct> 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, … -## $ weights <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, … -## $ seqn <dbl> 428, 23045, 446, 22294, 596, 14088, 618, 18085, 806… -## $ qsmk <dbl> 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, … -## $ death <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, … -## $ yrdth <dbl> NA, NA, 88, NA, NA, NA, NA, NA, NA, NA, 84, 90, NA,… -## $ modth <dbl> NA, NA, 1, NA, NA, NA, NA, NA, NA, NA, 10, 6, NA, N… -## $ dadth <dbl> NA, NA, 3, NA, NA, NA, NA, NA, NA, NA, 17, 12, NA, … -## $ sbp <dbl> 135, 159, 141, 113, 151, NA, 125, 135, 144, 135, 12… -## $ dbp <dbl> 89, 91, 79, 73, 80, NA, 71, 85, 76, 88, 56, 75, 88,… -## $ sex <fct> 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, … -## $ age <dbl> 43, 49, 71, 36, 48, 51, 56, 40, 47, 70, 72, 66, 35,… -## $ race <fct> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, … -## $ income <dbl> 19, 22, 17, 21, 18, 22, 20, 18, 22, 18, 12, 16, 20,… -## $ marital <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 5, 3, 2, 2, … -## $ school <dbl> 12, 12, 0, 12, 12, 9, 12, 10, 17, 16, 10, 12, 12, 1… -## $ education <fct> 3, 3, 1, 3, 3, 2, 3, 2, 5, 5, 2, 3, 3, 2, 3, 3, 2, … -## $ ht <dbl> 176.5938, 160.2812, 147.0938, 174.5938, 164.0000, 1… -## $ wt71 <dbl> 63.96, 47.29, 75.64, 68.38, 62.03, 71.10, 60.78, 63… -## $ wt82 <dbl> 79.83226, 53.07031, 56.69905, 73.48196, 70.30682, 7… -## $ wt82_71 <dbl> 15.8722571, 5.7803073, -18.9409537, 5.1019639, 8.27… -## $ birthplace <dbl> 42, 30, NA, 19, 36, 47, NA, 42, 42, 39, 25, 31, 11,… -## $ smokeintensity <dbl> 30, 20, 40, 9, 2, 5, 20, 5, 30, 30, 20, 20, 15, 20,… -## $ smkintensity82_71 <dbl> -30, 0, -40, 1, -2, 1, -20, 0, -30, -10, -20, 20, -… -## $ smokeyrs <dbl> 24, 29, 41, 30, 30, 29, 11, 20, 23, 40, 40, 40, 22,… -## $ asthma <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, … -## $ bronch <dbl> 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, … -## $ tb <dbl> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, … -## $ hf <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ hbp <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 1, … -## $ pepticulcer <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ colitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ hepatitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ chroniccough <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, … -## $ hayfever <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ diabetes <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, … -## $ polio <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ tumor <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ nervousbreak <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ alcoholpy <dbl> 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, … -## $ alcoholfreq <dbl> 3, 0, 4, 0, 1, 2, 3, 1, 3, 0, 1, 0, 3, 3, 4, 2, 0, … -## $ alcoholtype <dbl> 3, 3, 4, 1, 2, 3, 4, 1, 2, 3, 3, 1, 4, 3, 4, 3, 3, … -## $ alcoholhowmuch <dbl> 2, 2, NA, 6, 1, 3, NA, 5, 1, 3, 2, 1, NA, 5, NA, 2,… -## $ pica <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, … -## $ headache <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, … -## $ otherpain <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, … -## $ weakheart <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ allergies <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ nerves <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ lackpep <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ hbpmed <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, … -## $ boweltrouble <dbl> 0, 2, 1, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, … -## $ wtloss <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ infection <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, … -## $ active <fct> 1, 2, 1, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 1, 1, 1, … -## $ exercise <fct> 1, 1, 1, 0, 1, 0, 2, 0, 0, 2, 2, 1, 2, 2, 1, 2, 2, … -## $ birthcontrol <dbl> 2, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0, 0, 0, 1, 0, 0, 2, … -## $ pregnancies <dbl> NA, 4, 15, NA, 3, NA, 4, 2, NA, 5, 4, NA, 5, 6, 1, … -## $ cholesterol <dbl> 173, 279, 229, 200, 225, 199, 230, 195, 328, 247, 2… -## $ hightax82 <dbl> 0, 0, NA, 0, 0, 0, NA, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0… -## $ price71 <dbl> 2.346680, 2.104980, NA, 2.199707, 2.241699, 2.18359… -## $ price82 <dbl> 1.797363, 1.698242, NA, 1.847900, 1.828125, 1.73999… -## $ tax71 <dbl> 1.3649902, 1.0498047, NA, 1.1022949, 1.0498047, 1.1… -## $ tax82 <dbl> 0.5718994, 0.4399414, NA, 0.5718994, 0.5059814, 0.4… -## $ price71_82 <dbl> 0.54931641, 0.40686035, NA, 0.35174561, 0.41357422,… -## $ tax71_82 <dbl> 0.7929688, 0.6099854, NA, 0.5303955, 0.5439453, 0.6… -## $ id <int> 11, 1274, 15, 1135, 18, 564, 23, 736, 27, 925, 35, … -## $ censored <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, … -## $ older <dbl> 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, … -## $ distance <dbl> -1.1611429, -1.1626186, -1.3303980, -1.3300192, -0.… +## $ i <chr> "11", "1220", "15", "1082", "18… +## $ subclass <fct> 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6… +## $ weights <dbl> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1… +## $ seqn <dbl> 428, 23045, 446, 22294, 596, 14… +## $ qsmk <dbl> 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1… +## $ death <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1… +## $ yrdth <dbl> NA, NA, 88, NA, NA, NA, NA, NA,… +## $ modth <dbl> NA, NA, 1, NA, NA, NA, NA, NA, … +## $ dadth <dbl> NA, NA, 3, NA, NA, NA, NA, NA, … +## $ sbp <dbl> 135, 159, 141, 113, 151, NA, 12… +## $ dbp <dbl> 89, 91, 79, 73, 80, NA, 71, 85,… +## $ sex <fct> 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 1… +## $ age <dbl> 43, 49, 71, 36, 48, 51, 56, 40,… +## $ race <fct> 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0… +## $ income <dbl> 19, 22, 17, 21, 18, 22, 20, 18,… +## $ marital <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3… +## $ school <dbl> 12, 12, 0, 12, 12, 9, 12, 10, 1… +## $ education <fct> 3, 3, 1, 3, 3, 2, 3, 2, 5, 5, 2… +## $ ht <dbl> 176.5938, 160.2812, 147.0938, 1… +## $ wt71 <dbl> 63.96, 47.29, 75.64, 68.38, 62.… +## $ wt82 <dbl> 79.83226, 53.07031, 56.69905, 7… +## $ wt82_71 <dbl> 15.8722571, 5.7803073, -18.9409… +## $ birthplace <dbl> 42, 30, NA, 19, 36, 47, NA, 42,… +## $ smokeintensity <dbl> 30, 20, 40, 9, 2, 5, 20, 5, 30,… +## $ smkintensity82_71 <dbl> -30, 0, -40, 1, -2, 1, -20, 0, … +## $ smokeyrs <dbl> 24, 29, 41, 30, 30, 29, 11, 20,… +## $ asthma <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ bronch <dbl> 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0… +## $ tb <dbl> 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0… +## $ hf <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ hbp <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0… +## $ pepticulcer <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ colitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ hepatitis <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ chroniccough <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0… +## $ hayfever <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ diabetes <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0… +## $ polio <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ tumor <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ nervousbreak <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ alcoholpy <dbl> 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1… +## $ alcoholfreq <dbl> 3, 0, 4, 0, 1, 2, 3, 1, 3, 0, 1… +## $ alcoholtype <dbl> 3, 3, 4, 1, 2, 3, 4, 1, 2, 3, 3… +## $ alcoholhowmuch <dbl> 2, 2, NA, 6, 1, 3, NA, 5, 1, 3,… +## $ pica <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0… +## $ headache <dbl> 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0… +## $ otherpain <dbl> 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0… +## $ weakheart <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ allergies <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ nerves <dbl> 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ lackpep <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ hbpmed <dbl> 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0… +## $ boweltrouble <dbl> 0, 2, 1, 2, 0, 0, 0, 0, 0, 2, 0… +## $ wtloss <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ infection <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ active <fct> 1, 2, 1, 0, 1, 0, 0, 0, 0, 1, 1… +## $ exercise <fct> 1, 1, 1, 0, 1, 0, 2, 0, 0, 2, 2… +## $ birthcontrol <dbl> 2, 0, 0, 2, 0, 2, 0, 0, 2, 0, 0… +## $ pregnancies <dbl> NA, 4, 15, NA, 3, NA, 4, 2, NA,… +## $ cholesterol <dbl> 173, 279, 229, 200, 225, 199, 2… +## $ hightax82 <dbl> 0, 0, NA, 0, 0, 0, NA, 0, 0, 0,… +## $ price71 <dbl> 2.346680, 2.104980, NA, 2.19970… +## $ price82 <dbl> 1.797363, 1.698242, NA, 1.84790… +## $ tax71 <dbl> 1.3649902, 1.0498047, NA, 1.102… +## $ tax82 <dbl> 0.5718994, 0.4399414, NA, 0.571… +## $ price71_82 <dbl> 0.54931641, 0.40686035, NA, 0.3… +## $ tax71_82 <dbl> 0.7929688, 0.6099854, NA, 0.530… +## $ id <int> 11, 1274, 15, 1135, 18, 564, 23… +## $ censored <dbl> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0… +## $ older <dbl> 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1… +## $ distance <dbl> -1.1611429, -1.1626186, -1.3303… ``` @@ -367,7 +367,7 @@ ## Your Turn -
+
07:00
@@ -478,7 +478,7 @@ ## Your Turn -
+
07:00
diff --git a/slides/04-using-pscores.pdf b/slides/04-using-pscores.pdf index 360fe0b..0df5c90 100644 Binary files a/slides/04-using-pscores.pdf and b/slides/04-using-pscores.pdf differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-14-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-14-1.png index fe9da9f..6efff61 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-14-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-15-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-15-1.png index 1b92ca7..e0f97a3 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-15-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-16-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-16-1.png index 8a1bfd7..80cbed7 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-16-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-17-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-17-1.png index 24d301e..dc6a075 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-17-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-18-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-18-1.png index 322f20f..9efd5ee 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-18-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-19-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-19-1.png index e09c811..228837a 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-19-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-3-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-3-1.png index 964d2f6..c64a16f 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-3-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-4-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-4-1.png index ba27abd..898256d 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-4-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-7-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-7-1.png index 597aca0..03d70d4 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-7-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/slides/04-using-pscores_files/figure-html/unnamed-chunk-9-1.png b/slides/04-using-pscores_files/figure-html/unnamed-chunk-9-1.png index 1526bf5..34647a9 100644 Binary files a/slides/04-using-pscores_files/figure-html/unnamed-chunk-9-1.png and b/slides/04-using-pscores_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/slides/05-pscore-diagnostics.html b/slides/05-pscore-diagnostics.html index b27b402..ff0aa09 100644 --- a/slides/05-pscore-diagnostics.html +++ b/slides/05-pscore-diagnostics.html @@ -4,10 +4,10 @@ Propensity Score Diagnostics - - - - + + + + @@ -17,7 +17,7 @@ # Propensity Score Diagnostics ### Lucy D’Agostino McGowan ### Wake Forest University -### 2020-07-29 (updated: 2020-11-18) +### 2020-07-29 (updated: 2020-12-01) --- @@ -312,7 +312,7 @@ ## Your turn 1 -
+
07:00
@@ -574,7 +574,7 @@ ## Your turn 2 -
+
07:00
diff --git a/slides/05-pscore-diagnostics.pdf b/slides/05-pscore-diagnostics.pdf index 1f45fd5..52b0578 100644 Binary files a/slides/05-pscore-diagnostics.pdf and b/slides/05-pscore-diagnostics.pdf differ diff --git a/slides/06-outcome-model.html b/slides/06-outcome-model.html index 0fd3b10..0101ead 100644 --- a/slides/06-outcome-model.html +++ b/slides/06-outcome-model.html @@ -4,10 +4,10 @@ Fitting the outcome model - - - - + + + + @@ -17,7 +17,7 @@ # Fitting the outcome model ### Lucy D’Agostino McGowan ### Wake Forest University -### 2020-07-29 (updated: 2020-11-18) +### 2020-07-29 (updated: 2020-12-01) --- @@ -246,7 +246,7 @@ ## Your Turn -
+
10:00
diff --git a/slides/06-outcome-model.pdf b/slides/06-outcome-model.pdf index a899548..1a5218f 100644 Binary files a/slides/06-outcome-model.pdf and b/slides/06-outcome-model.pdf differ diff --git a/slides/index.html b/slides/index.html index 44f4a83..ef1b61b 100644 --- a/slides/index.html +++ b/slides/index.html @@ -3,7 +3,7 @@ Causal Inference in R Slides - + @@ -20,7 +20,7 @@ ###[01-causal_modeling_whole_game](01-causal_modeling_whole_game.html) ###[02-dags](02-dags.html) ###[03-pscores](03-pscores.html) -###[04-using-pscores](04-pscore-weighting.html) +###[04-using-pscores](04-using-pscores.html) ###[05-pscore-diagnostics](05-pscore-diagnostics.html) ###[06-outcome-model](06-outcome-model.html) diff --git a/slides/index.pdf b/slides/index.pdf index c934e8b..ce00bce 100644 Binary files a/slides/index.pdf and b/slides/index.pdf differ