forked from datazoompuc/datazoom_social_Stata
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rotina_testes.do
160 lines (113 loc) · 3.12 KB
/
rotina_testes.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
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
if "`c(username)'" == "igorr" {
global dados "F:\Dados"
}
cd $dados
cap mkdir bases_teste
/* Censo (AP 2010) */
* Pessoas
datazoom_censo, years(2010) ufs( AP ) /*
*/ original("$dados\Censo") /*
*/ saving("$dados\bases_teste") /*
*/ pes
* Domicílios
datazoom_censo, years(2010) ufs( AP ) /*
*/ original("$dados\Censo") /*
*/ saving("$dados\bases_teste") /*
*/ dom
* Both
datazoom_censo, years(2010) ufs( AP ) /*
*/ original("$dados\Censo") /*
*/ saving("$dados\bases_teste") /*
*/ both
* Both com compat
datazoom_censo, years(2010) ufs( AP ) /*
*/ original("$dados\Censo") /*
*/ saving("$dados\bases_teste") /*
*/ both comp
/* ECINF */
* 1997
datazoom_ecinf, year( 1997 ) /*
*/ original("$dados\ECINF\1997") /*
*/ saving("$dados\bases_teste") /*
*/ tipo( pesocup indprop uecon trabrend moradores domicilios )
* 2003
datazoom_ecinf, year( 2003 ) /*
*/ original("$dados\ECINF\2003") /*
*/ saving("$dados\bases_teste") /*
*/ tipo( pesocup sebrae indprop uecon trabrend moradores domicilios )
/* PME Antiga (1994) */
* sem id
datazoom_pmeantiga, years(1994) /*
*/ original("$dados\PME") /*
*/ saving("$dados\bases_teste") /*
*/ nid
* idbas
datazoom_pmeantiga, years(1994) /*
*/ original("$dados\PME") /*
*/ saving("$dados\bases_teste") /*
*/ idbas
*idrs
datazoom_pmeantiga, years(1994) /*
*/ original("$dados\PME") /*
*/ saving("$dados\bases_teste") /*
*/ idrs
/* PME Nova (2008) */
datazoom_pmenova, years(2008) /*
*/ original("$dados\PME") /*
*/ saving("$dados\bases_teste") /*
*/ nid
* idbas
datazoom_pmenova, years(2008) /*
*/ original("$dados\PME") /*
*/ saving("$dados\bases_teste") /*
*/ idbas
*idrs
datazoom_pmenova, years(2008) /*
*/ original("$dados\PME") /*
*/ saving("$dados\bases_teste") /*
*/ idrs
/* PNAD */
* 2001
foreach id in pes dom both{
foreach comp in ncomp comp81 comp92{
datazoom_pnad, years(2001) /*
*/ original("$dados\PNAD") /*
*/ saving("$dados\bases_teste") /*
*/ `id' `comp'
}
}
* 2002-2015
foreach id in pes dom both{
foreach comp in ncomp comp81 comp92{
datazoom_pnad, years(2002/2009 2011/2015) /*
*/ original("$dados\PNAD") /*
*/ saving("$dados\bases_teste") /*
*/ `id' `comp'
}
}
/* PNADs Antigas */
foreach id in pes dom both{
foreach comp in ncomp comp81 comp92{
datazoom_pnad, years(1981/1990 1992/1993 1995/1999) /*
*/ original("$dados\PNAD\Antigos") /*
*/ saving("$dados\bases_teste") /*
*/ `id' `comp'
}
}
/* PNAD Contínua (2019 Visita 1) */
datazoom_pnadcont_anual, years(20191) /*
*/ original("$dados\PNADC\Anual") /*
*/ saving("$dados\bases_teste")
/* PNAD Covid */
datazoom_pnad_covid, months(05 06 07 08 09 10 11) /*
*/ original("$dados\PNAD_COVID") /*
*/ saving("$dados\bases_teste")
/* PNS */
* 2013
datazoom_pns, year(2013) /*
*/ original("$dados\PNS") /*
*/ saving("$dados\bases_teste")
* 2019
datazoom_pns, year(2019) /*
*/ original("$dados\PNS") /*
*/ saving("$dados\bases_teste")