Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…matieberaad

# Conflicts:
#	Presentation_English.pdf
  • Loading branch information
misjamikkers committed Jan 8, 2020
2 parents 55118ec + da38dec commit c642ad4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.rds
/Presentation_English.log
Binary file removed PresentationZin.pdf
Binary file not shown.
40 changes: 30 additions & 10 deletions Presentation_English.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ library(grf)



## Example of a dataset dataset
## Causal inference as missing data

```{r}
X_1 <- c("Male", "Female", "Female", "...")
Expand Down Expand Up @@ -101,7 +101,7 @@ ggplot(data = conf, aes(x = Aantal_boeken, y = Cito)) +



## Voorspellen versus begrijpen
## Prediction versus understanding


```{r}
Expand All @@ -125,7 +125,7 @@ ggplot(data = conf, aes(x = Aantal_boeken, y = Cito, color = IQ_groep)) +



## DAG building blocks
## Causal graph (DAG) building blocks



Expand Down Expand Up @@ -156,9 +156,9 @@ ggplot(data = DAG, aes(x = X, y = Y)) +
annotate("text", x = 9, y = 0.8, label = "X") +
annotate("text", x = 10, y = 3.2, label = "Z") +
annotate("text", x = 11, y = 0.8, label = "Y") +
annotate("text", x = 2, y = 3.5, label = "Confounder") +
annotate("text", x = 2, y = 3.5, label = "Fork") +
annotate("text", x = 6, y = 3.5, label = "Collider") +
annotate("text", x = 10, y = 3.5, label = "Mediator") +
annotate("text", x = 10, y = 3.5, label = "Chain") +
ylim(0, 5) +
theme_void()
Expand All @@ -168,10 +168,28 @@ ggplot(data = DAG, aes(x = X, y = Y)) +



## Fork



```{r}
citodag <- dagitty('dag {
IQ_parents [pos = "1,0"]
Number_of_books [pos = "0,1"]
Test_score_children [pos = "2,1"]
Number_of_books <- IQ_parents -> Test_score_children
## Confounder
}')
plot(citodag)
```


## Confounding / confounder



Expand All @@ -183,6 +201,8 @@ Test_score_children [pos = "2,1"]
Number_of_books <- IQ_parents -> Test_score_children
Number_of_books -> Test_score_children
}')
Expand Down Expand Up @@ -212,7 +232,7 @@ plot(NBAdag)
```

## Does height causes speed?
## Does being tall makes you fast?

```{r}
Expand All @@ -235,7 +255,7 @@ ggplot(data = NBA, aes(x = Lengte, y = Snelheid)) +
```


## Does height causes speed?
## Does being tall makes you fast?


```{r}
Expand All @@ -252,7 +272,7 @@ ggplot(data = NBA, aes(x = Lengte, y = Snelheid, color = NBA)) +
```


## Mediator
## Chain / Mediator


```{r}
Expand Down Expand Up @@ -388,7 +408,7 @@ g <- dagitty('dag {
Health_care_cost [pos="1,0"]
Treatment [pos="0,1"]
Proportional_shortfall [pos="2,1"]
V_i [pos="3,1"]
V_i [pos="3,0"]
V_i -> Proportional_shortfall -> Health_care_cost <- Treatment
Expand Down
Binary file removed Presentation_English.pdf
Binary file not shown.

0 comments on commit c642ad4

Please sign in to comment.