Code 6.1

6.1 Multicollinearity

Code 6.2

Code 6.3

Code 6.4

Code 6.5

Code 6.6

Code 6.7

Code 6.8

Code 6.9

Code 6.10

Code 6.11

Code 6.12

6.2 Post-treatment bias

Code 6.13

Code 6.14

Code 6.15

Code 6.16

Code 6.17

Code 6.18

Code 6.19

Code 6.20

6.3 Collider bias

Code 6.21

Code 6.22

Code 6.23

Code 6.24

Code 6.25

Code 6.26

Code 6.27

Code 6.28

6.4 Confronting confounding

Code 6.29

Code 6.30