-
Notifications
You must be signed in to change notification settings - Fork 0
/
analysis.qmd
217 lines (173 loc) · 7.36 KB
/
analysis.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
---
title: "Legal status--FDS identification questions"
format: html
theme: cosmo
date: today
editor: visual
execute:
echo: false
warning: false
message: false
---
```{r packages}
#| warning: false
#| message: false
library(labelled)
library(tibble)
library(tidyverse)
library(tidyr)
library(forcats)
library(readr)
library(readxl)
library(haven)
library(lubridate)
library(kableExtra)
library(fusen)
library(srvyr)
library(gtable)
library(rlang)
library(stringr)
library(purrr)
library(tibble)
library(readr)
library(unhcrthemes)
library(writexl)
library(pins)
```
```{r sourceFunctions}
load_flat_functions("functions/flat_functions_datamanagement.qmd", envir = globalenv())
```
```{r readData}
#SSD
ssd_hhroster <- read_rds("data/SSD/hhroster_clean.rds")
ssd_rmember <- read_rds("data/SSD/rmember_clean.rds")
#PAK
pak_hhroster <- read_rds("data/PAK/hhroster_merge.rds")
#CMR
source(".Renviron")
board <- board_connect(auth = "envvar")
cmr_df_l <- pin_read(board, "[email protected]/FDS_CMR_df_l")
```
## Analysis
### South Sudan
Combine "recognized refugee" and "refugee enrollment documents"
Overview of identification questions
National of host country
```{r}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 1), ID_01comb, ID_02simp, ID_03simp, ID_04, ID_05, ID_06, ID_06bsimp, popgroup)
```
National of other country
```{r}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 2), ID_00, ID_01b, ID_02simp, ID_03simp, ID_05, ID_06, ID_06bsimp, popgroup)
```
Comparing ID document and proxy classification
Final outcome
Comparing outcome of responses from household head and identification document.
Inclusion error: Classified as refugees: e.g. 310 who have no documents (we don't know if this is really an error, many may have really misplaced documents).
Exclusion error: Not classified as refugees: e.g. 1473 refugees classified as foreigners/600 refugees classified as missing/132 refugees classified as asylum-seekers
```{r warning = FALSE, message = FALSE}
ssd_hhroster_15plus <- ssd_hhroster |> filter(ageYears >= 15)
popgroup_ID_09 <- table(ssd_hhroster_15plus$popgroup |> to_factor(),
ssd_hhroster_15plus$ID_09 |> to_factor())
df_popgroup_ID_09 <- data.frame(popgroup_ID_09) |>
mutate(Var2 = case_when(Var2 == "" ~ "Missing",
TRUE ~ Var2)) |>
pivot_wider(names_from = "Var1", values_from = "Freq") %>%
bind_rows(summarise(.,
across(where(is.numeric), sum),
across(where(is.character), ~"Total"))) %>%
mutate(Total = rowSums(.[-1])) |>
rename("Identification document" = "Var2")
df_popgroup_ID_09
#write_xlsx(df_popgroup_ID_09, "Identitification questions crosstabs.xlsx")
```
Identification questions and identity document
Non-nationals
```{r}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15), ID_00)
```
Exclusion error due to ID_01b (forced to flee from country of origin): 1220 individuals with refugee documents and 143 individuals with refugee enrollment document who were not forced to flee.
Could be misunderstanding due to specific context in South Sudan. Question reworded for next countries.
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 2), ID_00, ID_01b)
```
Exclusion error due to ID_02 (main reason for fleeing): 245 individuals with refugee documents and 28 individuals with refugee enrollment document whose reason for fleeing provided in the FDS does not classify them as refugees.
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 2, ID_01b == 1), ID_00, ID_01b, ID_02simp, ID_09)
```
Exclusion error due to ID_03 (crossed an international border): 93 individuals with refugee documents and 3 individuals with refugee enrollment document who did not cross an international border after fleeing.
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 2, ID_01b == 1, ID_02simp == 1), ID_00, ID_01b, ID_03simp)
```
Exclusion error due to ID_05 (applied for international protection): 430 individuals with refugee documents and 30 individuals with refugee enrollment document who did not apply for international protection, classified as missing. 135 refugees falsely classfied as AS
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 2, ID_01b == 1, ID_02simp == 1, ID_03simp == 1), ID_05)
```
Exclusion error due to ID_06 (refugee application status): 7 individuals who say they are waiting for response on asylum application but have refugee enrollment document
Inclusion error as refugee: 61 individuals with refugee status granted, but document is for asylum applicant
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, ID_00 == 2, ID_01b == 1, ID_02simp == 1, ID_03simp == 1, ID_05 == 1), ID_00, ID_01b, ID_06bsimp, popgroup, ID_09)
```
```{r}
grouped_summary_table(ssd_hhroster |> filter(ageYears >= 15, !is.na(popgroup)), ID_09)
```
Individual (random adult) and proxy responses
ID_00: 33 cases where proxy identifies individual as national of other country but individual state they are South Sudanese, 6 cases of the opposite
```{r warning = FALSE, message = FALSE}
IDcrosstab <- function (var1, var2) {
tab <- table(ssd_rmember[[var1]] |>
to_factor(),
ssd_rmember[[var2]] |>
to_factor()) |>
kable(format = 'html') |>
kable_styling() |>
scroll_box(width = "100%", box_css = "border: 0px;")
tab
}
IDcrosstab("ID_00", "ID_00_random")
```
ID_01a
```{r warning = FALSE, message = FALSE}
IDcrosstab("ID_01a", "ID_01a_random")
```
ID_01b: Fairly high dispcrepency here, matches high inclusion/exclusion error as above
```{r warning = FALSE, message = FALSE}
IDcrosstab("ID_01b", "ID_01b_random")
```
ID_02
```{r warning = FALSE, message = FALSE}
IDcrosstab("ID_02", "ID_02_random")
```
ID_03
```{r warning = FALSE, message = FALSE}
IDcrosstab("ID_03", "ID_03_random")
```
ID_05
```{r warning = FALSE, message = FALSE}
IDcrosstab("ID_05", "ID_05_random")
```
ID_06b
```{r warning = FALSE, message = FALSE}
IDcrosstab("ID_06b", "ID_06b_random")
```
Individual responses and identity document (random adult)
ID_01b
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_rmember |> filter(ID_00_random == 2), ID_00_random, ID_01b_random, ID_09_random)
```
Exclusion error due to ID_02 (main reason for fleeing)
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_rmember |> filter(ID_00_random == 2, ID_01b == 1), ID_00_random, ID_01b_random, ID_02_random, ID_09_random)
```
Exclusion error due to ID_03 (crossed an international border)
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_rmember |> filter(ID_00_random == 2, ID_01b_random == 1, ID_02_random == 1), ID_03_random, ID_09_random)
```
Exclusion error due to ID_05
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_rmember |> filter(ID_00_random == 2, ID_01b_random == 1, ID_02_random == 1, ID_03_random == 1), ID_05_random, ID_09_random)
```
Exclusion error due to ID_06 (refugee application status)
```{r warning = FALSE, message = FALSE}
grouped_summary_table(ssd_rmember |> filter(ID_00_random == 2, ID_01b_random == 1, ID_02_random == 1, ID_03_random == 1, ID_05_random == 1), ID_00_random, ID_01b_random, ID_06b_random, ID_09_random)
```