//download data from fred
//step1: establish freduse
findit freduse
//then we see a stata table, click on st0110
//step2: download data
// when you search data on fred website, you enter the following address:  http://research.stlouisfed.org/fred2/
//that web has many fed timeseries data, you only type in stata varibles- what characters in quotation ().
//freduse var1 var2.....
freduse UNRATE
clear
freduse UNRATE CPIAUCSL
//set timeseries
tsset daten
//graph downloaded data
twoway (tsrline UNRATE CPIAUCSL)
twoway (tsline UNRATE)
//my view
gen logCPI=log(CPIAUCSL)
twoway(tsrline UNRATE logCPI)

reference:
http://www.youtube.com/watch?v=iiizhsX-I00&list=UUVk4G4nEtBS4tLOyHqustDA

0 comments:

Post a Comment