Skip to content

Commit bfc86ce

Browse files
committed
push2
1 parent de31b24 commit bfc86ce

File tree

10 files changed

+3464
-9
lines changed

10 files changed

+3464
-9
lines changed

_quarto.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ book:
77
date: "summer 2023"
88
chapters:
99
- index.qmd
10-
- panel_data.qmd
1110
- multi-level.qmd
11+
- panel_data.qmd
1212
- missing-data.qmd
1313

1414
format:

data/1.Example.txt

Lines changed: 3455 additions & 0 deletions
Large diffs are not rendered by default.

data/2.Example1.dta

262 KB
Binary file not shown.

data/2.Example2.dta

84.7 KB
Binary file not shown.

data/3.Example1.dta

788 KB
Binary file not shown.

data/3.Example2.dta

1.03 MB
Binary file not shown.

data/3.Example3.dta

255 KB
Binary file not shown.

missing-data.qmd

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Note: Implemented in the R package 'naniar', function `mcar_test`. AND: takes a
6565
Load data:
6666

6767
```{r}
68-
DAT <- read_dta("3.Example1.dta")
68+
DAT <- read_dta("data/3.Example1.dta")
6969
summary(DAT)
7070
```
7171

@@ -176,7 +176,7 @@ One way of dealing with missing data, but meanwhile the most used one.
176176
- To account for the variability induced by imputing missing values: impute missing values several times by making random draws from multivariate distributions
177177
- data is incomplete, fill with imputed data from a data set with predictive power, depends on the distribution of the data set you fill the holes and account for the uncertainty with random imputations from multivariate distributions. Then you analyse the data and pooled the results.
178178

179-
![Multiple Imputation](0.Screenshots/3.multiple-imp.png){width="600"}
179+
![Multiple Imputation](figures/3.multiple-imp.png){width="600"}
180180

181181
- you need 20 or 30 data sets with different distributions for robust estimators
182182
- These multivariate distributions have to be informative for the missingness mechanism at hand
@@ -330,7 +330,7 @@ The name CART is from the 80s, nowadays known under the name Classification and
330330
- The cut points divide the sample into more homogeneous subsamples
331331
- The splitting process is repeated on both subsamples, so that a series of splits defines a binary tree
332332

333-
![Regression trees](0.Screenshots/3.cart.png){width="300"}
333+
![Regression trees](figures/3.cart.png){width="300"}
334334

335335
- you identify different groups of data points in form of random nodes
336336
- now we not use donors, we use the random nodes to impute the missing data points **→ Approach:**
@@ -566,7 +566,7 @@ Transformation is done on-the-fly within the imputation algorithm
566566
- Since the transformed variable is available for imputation, the hope is that passive imputation removes the bias of the Impute, then transform methods
567567
- while restoring consistency among the imputations that was broken in JAV (create derived variable first and impute just as another variable (JAV))
568568

569-
![](0.Screenshots/3.passive.png){width="width"}
569+
![](figures/3.passive.png){width="width"}
570570

571571
→ not of the procedures are perfect, but this is the best we have
572572

@@ -843,7 +843,7 @@ Check missing data pattern & test for MCAR (Hint: "mcar test" works best with da
843843
844844
```{r}
845845
#read in data from day 2 with manually generated missings
846-
lDAT <- read_dta("3.Example3.dta")
846+
lDAT <- read_dta("data/3.Example3.dta")
847847
848848
# test with Little's missing completely at random test (MCAR)
849849
mcar_test(lDAT)

multi-level.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Already done, see @sec-load.libraries.
7474
2. Load the data:
7575

7676
```{r}
77-
DAT <- read.csv2("1.Example.txt")
77+
DAT <- read.csv2("data/1.Example.txt")
7878
```
7979

8080
3. Have a look at the data

panel_data.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ In biostatistics & social sciences, mostly the term "longitudinal data" is used
132132
Read in:
133133

134134
```{r}
135-
DAT1 <- read_dta("2.Example1.dta")
135+
DAT1 <- read_dta("data/2.Example1.dta")
136136
```
137137

138138
1. How many observation for units and times:
@@ -177,7 +177,7 @@ All 595 units in the data frame has 7 time points.
177177
### Look into the Data 2:
178178

179179
```{r}
180-
DAT2 <- read_dta("2.Example2.dta")
180+
DAT2 <- read_dta("data/2.Example2.dta")
181181
```
182182

183183
1. How many observation for units and times:

0 commit comments

Comments
 (0)