You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Merge part of Episode 04 works with files data/wdi_decades.dta and data/average_distance.dta. There are no such files in the data folder, and they are not created in previous episodes either.
Generating these datasets would fit into Episode 03 to illustrate and practice egen and collapse.
The text was updated successfully, but these errors were encountered:
wdi_decades.dta --> one line of code can be included in Episode 4, after the append
Append
use "data/derived/gdp1990.dta", clear
generate year = 1990
append using "data/derived/gdp1991.dta"
replace year = 1991 if missing(year)
append using "data/derived/gdp1992.dta"
replace year = 1992 if missing(year)
save data/wdi_decades.dta, replace // this line needs to be added to generate the wdi_decades.dta that we use later in merge. But the naming does not make much sense, since no decade data here...
average_distance.dta --> can be included in Episode 3 as an example for collapse, I suggest to include it as a challenge at the end, right before the opional part (keep if inlist(countrycode, "EMU", "WLD") ...), the following way:
Additional challenge: create the average of simple distances between capitals by country, using collapse. Save it in data/average_distance.dta, we will need it in a later exercise in Episode 4.
use "data/raw/cepii/dist_cepii.dta", clear
collapse (mean) average_distance=dist, by(iso_o)
save "data/average_distance.dta", replace
The Merge part of Episode 04 works with files
data/wdi_decades.dta
anddata/average_distance.dta
. There are no such files in the data folder, and they are not created in previous episodes either.Generating these datasets would fit into Episode 03 to illustrate and practice
egen
andcollapse
.The text was updated successfully, but these errors were encountered: