-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata_analysis.do
44 lines (34 loc) · 1.15 KB
/
data_analysis.do
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
/*****************************************************************
** INEQUALITY AND CRIME
**
** Author : Ronny M. Condor (ronny.condor@unmsm.edu.pe)
**
** Objective : Descriptive analysis
**
** Inputs : RENADEF and ENAHO
**
** Output : graphs and tables
**
** Comments :
******************************************************************/
*Folder structure
global root "G:\Mi unidad\La Rotonda Blog\Research\Criminalidad y desigualdad\03_data"
global raw "${root}\01_raw"
global raw_renadef "${raw}\renadef"
global raw_enaho "${enaho}\enaho"
global codes "${root}\02_codes"
global cleaned "${root}\03_cleaned"
global analysis "${root}\04_analysis"
global tables "${analysis}\01_tables"
global graphs "${analysis}\02_graphs"
global results "${root}\05_results"
set scheme blogrotonda
foreach var in patrimonio_st segpublica_st tranpublica_st dentotal_st {
qui summ `var', d
replace `var' = . if `var' > r(p95)
}
pwcorr gini *_st, star(0.1)
graph tw (scatter segpublica_st gini)
graph export "$graphs/scatter_gini_seg.png", as(png) replace
binscatter segpublica_st gini
graph export "$graphs/binscatter_gini_seg.png", as(png) replace