Replication package 162034 · mendeley · 2026
· open the deposit
How the code gets from data to results
Monitoring and Delivering: Evidence from Dropout Rates in Brazil - Replication
Code for: Monitoring and delivering: Evidence from dropout rates in Brazil Journal of Development Economics 2027
7
scripts
9
input files
0
file hand-offs
0
merges
49
sample steps
32
estimations
1 · Data in — files the code reads and no script of the package writes
Other input files
9 files
/CSVare_audits_random_table.R:3
Replication - Audits/Code/are_audits_random_table.R, line 3 data_random <- read.csv(paste(here("Data"),'random_table.csv',sep = '/'))/CSVaudit_effects_tables.R:2
Replication - Audits/Code/audit_effects_tables.R, line 2 data_drop_did <- read.csv(file = paste(here("Data"),'data_audits_tables.csv',sep = '/'))/CSVcorruption_effects_tables.R:5
Replication - Audits/Code/corruption_effects_tables.R, line 5 data_drop_corrup_drop <- read.csv(file = paste(here("Data"),'data_corruption.csv',sep = '/'))/CSVevent_study_figure.R:2
Replication - Audits/Code/event_study_figure.R, line 2 data_drop_did <- read.csv(file = paste(here("Data"),'data_audits.csv',sep = '/'))/CSVirregularity_histograms.R:4
Replication - Audits/Code/irregularity_histograms.R, line 4 full_audit_data <- read.csv(file = paste(here("Data"),'corrup_hist.csv',sep = '/'))/CSVprosecution_regressions_table.R:3
Replication - Audits/Code/prosecution_regressions_table.R, line 3 prosec_df <- read.csv(file = paste(here("Data"),'data_prosec.csv',sep = '/'))/CSVsummary_stats_table.R:5
Replication - Audits/Code/summary_stats_table.R, line 5 data_siab <- read.csv(file = paste(here("Data"),'sum_stats_siab.csv',sep = '/'))/CSVsummary_stats_table.R:60
Replication - Audits/Code/summary_stats_table.R, line 60 data_drop <- read.csv(file = paste(here("Data"),'sum_stats_dropout.csv',sep = '/'))
1 more
/CSVsummary_stats_table.R:110
Replication - Audits/Code/summary_stats_table.R, line 110 data_birth_mun <- read.csv(file = paste(here("Data"),'sum_stats_births.csv',sep = '/'))
2 · The file pipeline — which script writes which file that a later script reads
7 scripts, in the order the README lists them (Replication - Audits/ReadMe.md);
0 hand-offs through 0 intermediate files.
-
1.
Replication - Audits/Code/irregularity_histograms.Rnamed in Replication - Audits/ReadMe.md reads 1 input file · -
2.
Replication - Audits/Code/event_study_figure.Rnamed in Replication - Audits/ReadMe.md reads 1 input file · 1 estimation -
3.
Replication - Audits/Code/summary_stats_table.Rnamed in Replication - Audits/ReadMe.md reads 3 input files · -
4.
Replication - Audits/Code/are_audits_random_table.Rnamed in Replication - Audits/ReadMe.md reads 1 input file · 4 estimations -
5.
Replication - Audits/Code/corruption_effects_tables.Rnamed in Replication - Audits/ReadMe.md reads 1 input file · 7 estimations -
6.
Replication - Audits/Code/prosecution_regressions_table.Rnamed in Replication - Audits/ReadMe.md reads 1 input file · 2 estimations -
7.
Replication - Audits/Code/audit_effects_tables.Rnamed in Replication - Audits/ReadMe.md reads 1 input file · 18 estimations
3 · Merges — 0 joins
No merges recorded.
4 · The sample — 49 keep/drop steps, 0 variables winsorized or trimmed
Filters, by kind
time period ×10
- keep if
event_time %in% -5:8 # Filter to keep only the relevant event times (Baker et al . 2022)event_study_figure.R:29
Replication - Audits/Code/event_study_figure.R, line 29 filter( event_time %in% -5:8 # Filter to keep only the relevant event times (Baker et al . 2022) ) - keep if
year >= 2006 , year <= 2014summary_stats_table.R:30
Replication - Audits/Code/summary_stats_table.R, line 30 filter(year >= 2006 , year <= 2014) %>% - keep if
year >= 2006summary_stats_table.R:120
Replication - Audits/Code/summary_stats_table.R, line 120 filter(year >= 2006) %>% - keep if
year >= 2006 , year <= 2014summary_stats_table.R:148
Replication - Audits/Code/summary_stats_table.R, line 148 filter(year >= 2006 , year <= 2014) %>% - keep if
year >= 2006summary_stats_table.R:207
Replication - Audits/Code/summary_stats_table.R, line 207 filter(year >= 2006) %>% - keep if
year == y, # audit_first_year == y | audit_first_year == 0, audit_first_year != yare_audits_random_table.R:18
Replication - Audits/Code/are_audits_random_table.R, line 18 aud_ever <- data_random %>% filter( year == y, # audit_first_year == y | audit_first_year == 0, audit_first_year != y ) %>% - keep if
year == 2007, # audit_first_year == y | audit_first_year == 0, audit_first_year %in% c(2008:2010, 0)are_audits_random_table.R:34
Replication - Audits/Code/are_audits_random_table.R, line 34 ) %>% filter( - keep if
year == 2010, # audit_first_year == y | audit_first_year == 0, audit_first_year %in% c(2011:2013, 0)are_audits_random_table.R:50
Replication - Audits/Code/are_audits_random_table.R, line 50 ) %>% filter( - first 8 of 10
category values ×28
- keep if
gestao == "Municipal" ,event_study_figure.R:6
Replication - Audits/Code/event_study_figure.R, line 6 filter( gestao == "Municipal" , ) %>% - keep if
year >= 2006 , gestao == "Municipal"summary_stats_table.R:81
Replication - Audits/Code/summary_stats_table.R, line 81 filter(year >= 2006 , gestao == "Municipal") %>% - keep if
year >= 2006 , gestao == "Municipal"summary_stats_table.R:178
Replication - Audits/Code/summary_stats_table.R, line 178 filter(year >= 2006 , gestao == "Municipal") %>% - keep if
gestao == "Municipal"corruption_effects_tables.R:13
Replication - Audits/Code/corruption_effects_tables.R, line 13 filter(gestao == "Municipal") %>% - keep if
gestao == "Municipal"corruption_effects_tables.R:23
Replication - Audits/Code/corruption_effects_tables.R, line 23 filter(gestao == "Municipal") %>% - keep if
gestao == "Municipal"corruption_effects_tables.R:33
Replication - Audits/Code/corruption_effects_tables.R, line 33 filter(gestao == "Municipal") %>% - keep if
gestao == "Municipal"corruption_effects_tables.R:43
Replication - Audits/Code/corruption_effects_tables.R, line 43 filter(gestao == "Municipal") %>% - keep if
gestao == "Estadual"corruption_effects_tables.R:58
Replication - Audits/Code/corruption_effects_tables.R, line 58 filter(gestao == "Estadual") %>% - first 8 of 28
indicator subsets ×10
- keep if
ever_audited == 1summary_stats_table.R:31
Replication - Audits/Code/summary_stats_table.R, line 31 #filter(ever_audited == 1) %>% we recorded (not found at this line in the file): #filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:42
Replication - Audits/Code/summary_stats_table.R, line 42 #filter(ever_audited == 1) %>% we recorded (not found at this line in the file): #filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:83
Replication - Audits/Code/summary_stats_table.R, line 83 #filter(ever_audited == 1) %>% we recorded (not found at this line in the file): #filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:90
Replication - Audits/Code/summary_stats_table.R, line 90 #filter(ever_audited == 1) %>% we recorded (not found at this line in the file): #filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:121
Replication - Audits/Code/summary_stats_table.R, line 121 #filter(ever_audited == 1) %>% we recorded (not found at this line in the file): #filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:124
Replication - Audits/Code/summary_stats_table.R, line 124 #filter(ever_audited == 1) %>% we recorded (not found at this line in the file): #filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:149
Replication - Audits/Code/summary_stats_table.R, line 149 filter(ever_audited == 1) %>% - keep if
ever_audited == 1summary_stats_table.R:180
Replication - Audits/Code/summary_stats_table.R, line 180 filter(ever_audited == 1) %>% - first 8 of 10
other conditions ×1
- keep if
str_detect(term, "year")event_study_figure.R:24
Replication - Audits/Code/event_study_figure.R, line 24 filter(str_detect(term, "year")) %>%
Outliers
No winsorizing or trimming recorded.
Missing values
filled with a value ×1
audit_effects_tables.R:100
Replication - Audits/Code/audit_effects_tables.R, line 100 fill(starts_with("qty_media_and_grave"), .direction = "updown") %>%
5 · Key variables — what enters the models, and where the code builds it
| Variable | Used in models as | Built by |
|---|---|---|
total_drop_prim |
outcome in 1 | no statement builds it — a column of an input file, or made by a reshape/merge we do not trace |
6 · Models, by the table or figure they feed — 32 estimations, 0 traced into 0 exhibits
Estimations not traced to a table or figure · 32
| Command | Outcome | Regressors | Fixed effects | Standard errors | Where |
|---|---|---|---|---|---|
feolspanel fe |
total_drop_prim |
sunab(year_treated, year, ref.p = c(-1) )
|
ibge_cod, year | cluster: ibge_cod | event_study_figure.R:16Replication - Audits/Code/event_study_figure.R, line 16
feols(total_drop_prim ~ sunab(year_treated, year, ref.p = c(-1) ) | +
ibge_cod + year,
cluster = ~ibge_cod ,
data = .) |
feolsols |
— |
— | default | are_audits_random_table.R:23Replication - Audits/Code/are_audits_random_table.R, line 23
feols(formula_final , #cluster = ~ibge_cod
vcov = "IID",
, data = . ) |
|
feolsols |
— |
— | default | are_audits_random_table.R:39Replication - Audits/Code/are_audits_random_table.R, line 39
feols(formula_08_10 , #cluster = ~ibge_cod
vcov = "IID",
, data = . ) |
|
feolsols |
— |
— | default | are_audits_random_table.R:55Replication - Audits/Code/are_audits_random_table.R, line 55
feols(formula_11_13 , #cluster = ~ibge_cod
vcov = "IID",
, data = . ) |
|
feolsols |
— |
— | default | are_audits_random_table.R:71Replication - Audits/Code/are_audits_random_table.R, line 71
feols(formula_14_15 , #cluster = ~ibge_cod
vcov = "IID",
, data = . ) |
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:14Replication - Audits/Code/corruption_effects_tables.R, line 14
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=total_drop_prim; y=total_fail_prim; y=total_drop_high…)
|
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:24Replication - Audits/Code/corruption_effects_tables.R, line 24
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=total_drop_prim; y=total_fail_prim; y=total_drop_high…)
|
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:34Replication - Audits/Code/corruption_effects_tables.R, line 34
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=total_drop_prim; y=total_fail_prim; y=total_drop_high…)
|
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:44Replication - Audits/Code/corruption_effects_tables.R, line 44
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=total_drop_prim; y=total_fail_prim; y=total_drop_high…)
|
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:59Replication - Audits/Code/corruption_effects_tables.R, line 59
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=total_drop_prim; y=total_fail_prim; y=total_drop_high…)
|
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:94Replication - Audits/Code/corruption_effects_tables.R, line 94
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=std_port_avg_5th; y=std_math_avg_5th; y=std_port_avg_9th…)
|
|
feolsols |
— |
— | cluster: ibge_cod | corruption_effects_tables.R:103Replication - Audits/Code/corruption_effects_tables.R, line 103
feols(as.formula(paste0(y, "~", covariates,
"| state + year ")) , cluster = ~ibge_cod , data = . ) run 4× in a loop (y=std_port_avg_5th; y=std_math_avg_5th; y=std_port_avg_9th…)
|
|
feolsols |
— |
— | robust | prosecution_regressions_table.R:12Replication - Audits/Code/prosecution_regressions_table.R, line 12
feols(
as.formula(paste0(y, "~", covariates,
"| sigla_uf+ year ")) , vcov = "hetero", data = . ) run 3× in a loop (y=operacoes_ever; y=convictions_ever; y=legal_ever)
|
|
feolsols |
— |
— | robust | prosecution_regressions_table.R:40Replication - Audits/Code/prosecution_regressions_table.R, line 40
feols(
as.formula(paste0(y, "~", covariates,
"| sigla_uf+ lottery + no_os")) , vcov = "hetero", data = . ) run 3× in a loop (y=operacoes_ever; y=convictions_ever; y=legal_ever)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:14Replication - Audits/Code/audit_effects_tables.R, line 14
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:47Replication - Audits/Code/audit_effects_tables.R, line 47
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:60Replication - Audits/Code/audit_effects_tables.R, line 60
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:110Replication - Audits/Code/audit_effects_tables.R, line 110
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:121Replication - Audits/Code/audit_effects_tables.R, line 121
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:170Replication - Audits/Code/audit_effects_tables.R, line 170
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:209Replication - Audits/Code/audit_effects_tables.R, line 209
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:241Replication - Audits/Code/audit_effects_tables.R, line 241
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:256Replication - Audits/Code/audit_effects_tables.R, line 256
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:296Replication - Audits/Code/audit_effects_tables.R, line 296
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:309Replication - Audits/Code/audit_effects_tables.R, line 309
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:322Replication - Audits/Code/audit_effects_tables.R, line 322
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:357Replication - Audits/Code/audit_effects_tables.R, line 357
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:372Replication - Audits/Code/audit_effects_tables.R, line 372
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:405Replication - Audits/Code/audit_effects_tables.R, line 405
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:418Replication - Audits/Code/audit_effects_tables.R, line 418
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:431Replication - Audits/Code/audit_effects_tables.R, line 431
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
|
feolsols |
— |
— | cluster: ibge_cod | audit_effects_tables.R:445Replication - Audits/Code/audit_effects_tables.R, line 445
feols(as.formula(paste0(y, "~", covariates,
"| ibge_cod + year ")) , cluster = ~ibge_cod, data = . ) run 8× in a loop (y=total_drop_prim; y=total_drop_1o_5o; y=total_drop_6o_9o…)
|
7 · Figures: how each is drawn — 4 figures in the code (command, layers, options, the file it is saved to)
histogram 3 · event-study plot 1
| command | layers | variables | options | saved as | where |
|---|---|---|---|---|---|
ggplotevent-study plot
|
rect + point + errorbar + hline |
y estimate
x event_time
band estimate - 2 * std.error, estimate + 2 * std.error
by color_single
|
title Sun & Abraham (2021) · xtitle Relative Time Period · ytitle Treatment Effect - Dropout Rates · yline 0 · ci geom_errorbar · scheme theme_minimal · legend position=none |
not saved | event_study_figure.R:49Replication - Audits/Code/event_study_figure.R, line 49
event_study_results %>% |
ggplothistogram
|
histogram + vline |
y ..density..
x qty_media_and_grave_per_os
|
xtitle Number of Irregularities per Service Order · ytitle Density · xline median_val · bins bins=30 · scheme theme_bw |
not saved | irregularity_histograms.R:11Replication - Audits/Code/irregularity_histograms.R, line 11
ggplot(full_audit_data, aes(x = qty_media_and_grave_per_os)) + |
ggplothistogram
|
histogram + vline |
y ..density..
x qty_media_and_grave_educ_per_os
|
xtitle Number of Irregularities per Service Order · ytitle Density · xline median_val · bins bins=30 · scheme theme_bw |
not saved | irregularity_histograms.R:77Replication - Audits/Code/irregularity_histograms.R, line 77
ggplot(full_audit_data, aes(x = qty_media_and_grave_educ_per_os)) + |
ggplothistogram
|
histogram + vline |
y ..density..
x qty_media_and_grave_educ_per_os
|
xtitle Number of Irregularities per Service Order · ytitle Density · xline median_val · bins bins=30 · scheme theme_bw |
not saved | irregularity_histograms.R:145Replication - Audits/Code/irregularity_histograms.R, line 145
ggplot(full_audit_data, aes(x = qty_media_and_grave_educ_per_os)) + |