-
Notifications
You must be signed in to change notification settings - Fork 0
/
temp_fusion_blouk.do
114 lines (55 loc) · 1.78 KB
/
temp_fusion_blouk.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
*********************************************************************
*** Programme temporaire pour réunir les bases blouk
*** On a NL en (additif + iceber) et NL en iceberg (old version)
*** On fusionne avec les nouvelles bases blouk NL en additif seulement
*** Novembre 2016
**********************************************************************
** On fait la fusion sur mon
global dir \\filer.windows.dauphine.fr\home\l\lpatureau\My_Work\Lise\trade_cost\results\
cd $dir
*** Correction calcul R2 en 3 digits
set more off
local mode air
foreach x in `mode' {
forvalues z = 1974(1) 2013 {
use $dir\results_I_IetA\blouk_`z'_sitc2_3_`x', clear
drop Rp2_nl
capture correlate ln_ratio_minus1 blink_nl
capture generate Rp2_nl = r(rho)^2
save $dir\results_I_IetA\blouk_`z'_sitc2_3_`x', replace
}
}
*** Fusion des bases en 3 digits
set more off
*local mode ves air
local mode air
*local year 1974
** 3 digits
foreach x in `mode' {
forvalues z = 1974(1) 2013 {
*foreach z in `year' {
* la nouvelle base
*use blouk_`z'_sitc2_3_`x', clear
use $dir\results_I_IetA\blouk_`z'_sitc2_3_`x', clear
* de mon poste Dauphine
merge using "C:\Users\lpatureau\Dropbox\trade_cost\results\blouk_`z'_sitc2_3_`x'"
drop _merge
save "C:\Users\lpatureau\Dropbox\trade_cost\results\blouk_`z'_sitc2_3_`x'", replace
}
}
/*
** 4 digits
local year 1974 1977 1981 1985 1989 1993 1997 2001 2005 2009 2013
foreach x in `mode' {
foreach z in `year'{
*foreach z in `year' {
* la nouvelle base
*use blouk_`z'_sitc2_3_`x', clear
use $dir\results_I_IetA\blouk_`z'_sitc2_4_`x', clear
* de mon poste Dauphine
merge using "C:\Users\lpatureau\Dropbox\trade_cost\results\blouk_`z'_sitc2_4_`x'"
drop _merge
save "C:\Users\lpatureau\Dropbox\trade_cost\results\blouk_`z'_sitc2_4_`x'", replace
}
}
*/