*MACRO2 - PROBLEM SET 1 *EXERCISE 6 *This do-file contains some hints on how to produce the graph of PS1 exercise 6 with Stata *Set the correct working directory with command "cd" cd myfolder *You can import the data from for example xls/csv -formats to Stata by using the "import" command (or by hand choose Import from File tab) import delimited data1, clear *Format the date information from FRED to Stata date-time format by generating a new variable Time generate Time=date(date,"YMD") format Time %td sort Time *Save each dataset as .dta files (you need to import each .csv file separately) *You can combine datasets by using the "merge" command. 1:1 means that the variables specified (here Time) common to both datasets that uniquely identify single observations in both datasets merge Time using data2 data3 data4 *Keep the observation if it is observed in all datasets (used since some datasets have different date-time data) keep if _merge==3 *PLot time series: below how to plot Fed funds rate series starting from January 1990 twoway line fedfunds Time if Time>=date("01jan1990", "DMY")