---------------------------------------------------------------------------------------------------------------------------------- name: log: C:\Users\rwr\Dropbox\basu-house\build\code\../temp/fred4ucvar.log log type: text opened on: 17 Jul 2016, 12:11:43 . /*** FRED DATA ***/ > /*** Real Gross Domestic Product > 2015:Q2: 16,324.3 Billions of Chained 2009 Dollars (+ see more) > Quarterly, Seasonally Adjusted Annual Rate, GDPC1, Updated: 2015-08-27 8:51 AM CDT > > Real Personal Consumption Expenditures > 2015:Q2: 11,166.4 Billions of Chained 2009 Dollars (+ see more) > Quarterly, Seasonally Adjusted Annual Rate, PCECC96, Updated: 2015-08-27 8:51 AM CDT > > Gross Domestic Product: Implicit Price Deflator > 2015:Q2: 109.664 Index 2009=100 (+ see more) > Quarterly, Seasonally Adjusted, GDPDEF, Updated: 2015-08-27 8:51 AM CDT > > Real Gross Private Domestic Investment, 3 decimal > 2015:Q2: 2,866.135 Billions of Chained 2009 Dollars (+ see more) > Quarterly, Seasonally Adjusted Annual Rate, GPDIC96, Updated: 2015-08-27 8:51 AM CDT > > Nonfarm Business Sector: Real Compensation Per Hour > 2015:Q2: 102.409 Index 2009=100 (+ see more) > Quarterly, Seasonally Adjusted, COMPRNFB, Updated: 2015-09-02 10:01 AM CDT > > Nonfarm Business Sector: Compensation Per Hour > 2015:Q3: 113.938 Index 2009=100 (+ see more) > Quarterly, Seasonally Adjusted, COMPNFB, Updated: 2015-11-05 8:51 AM CST > > Nonfarm Business Sector: Real Output Per Hour of All Persons > 2015:Q2: 105.867 Index 2009=100 (+ see more) > Quarterly, Seasonally Adjusted, OPHNFB, Updated: 2015-09-02 10:01 AM CDT > > Nonfarm Business Sector: Real Output > 2015:Q2: 117.125 Index 2009=100 (+ see more) > Quarterly, Seasonally Adjusted, OUTNFB, Updated: 2015-09-02 10:01 AM CDT > > Nonfarm Business Sector: Implicit Price Deflator > 2015:Q2: 108.951 Index 2009=100 (+ see more) > Quarterly, Seasonally Adjusted, IPDNBS, Updated: 2015-09-02 10:01 AM CDT > > Corporate Profits After Tax (without IVA and CCAdj) > 2015:Q2: 1,823.7 Billions of Dollars (+ see more) > Quarterly, Seasonally Adjusted Annual Rate, CP, Updated: 2015-08-27 8:51 AM CDT > > Effective Federal Funds Rate > 2015-07: 0.13 Percent (+ see more) > Monthly, Not Seasonally Adjusted, FEDFUNDS, Updated: 2015-08-06 2:21 PM CDT > > M2 Money Stock > 2015-07: 12,059.5 Billions of Dollars (+ see more) > Monthly, Seasonally Adjusted, M2SL, Updated: 2015-09-03 3:41 PM CDT > ***/ > > /* Monthly */ > /* grap CPI to deflate macro wage */ > freduse FEDFUNDS M2SL CPIAUCSL, clear; (744 observations read) (690 observations read) (834 observations read) . gen dateq = qofd(daten); . format dateq %tq; . list dateq daten in 1/25; +--------------------+ | dateq daten | |--------------------| 1. | 1947q1 01jan1947 | 2. | 1947q1 01feb1947 | 3. | 1947q1 01mar1947 | 4. | 1947q2 01apr1947 | 5. | 1947q2 01may1947 | |--------------------| 6. | 1947q2 01jun1947 | 7. | 1947q3 01jul1947 | 8. | 1947q3 01aug1947 | 9. | 1947q3 01sep1947 | 10. | 1947q4 01oct1947 | |--------------------| 11. | 1947q4 01nov1947 | 12. | 1947q4 01dec1947 | 13. | 1948q1 01jan1948 | 14. | 1948q1 01feb1948 | 15. | 1948q1 01mar1948 | |--------------------| 16. | 1948q2 01apr1948 | 17. | 1948q2 01may1948 | 18. | 1948q2 01jun1948 | 19. | 1948q3 01jul1948 | 20. | 1948q3 01aug1948 | |--------------------| 21. | 1948q3 01sep1948 | 22. | 1948q4 01oct1948 | 23. | 1948q4 01nov1948 | 24. | 1948q4 01dec1948 | 25. | 1949q1 01jan1949 | +--------------------+ . drop daten; . keep FEDFUNDS M2SL CPIAUCSL dateq; . collapse FEDFUNDS M2SL CPIAUCSL, by(dateq); . save `tempdata'junkm, replace; (note: file ../temp/junkm.dta not found) file ../temp/junkm.dta saved . /* Quarterly */ > freduse GDPC1 PCECC96 GDPDEF GPDIC96 COMPRNFB COMPNFB OPHNFB OUTNFB IPDNBS CP, clear; (277 observations read) (277 observations read) (277 observations read) (277 observations read) (277 observations read) (277 observations read) (277 observations read) (277 observations read) (277 observations read) (277 observations read) . gen dateq = qofd(daten); . format dateq %tq; . list daten dateq in 1/15; +--------------------+ | daten dateq | |--------------------| 1. | 01jan1947 1947q1 | 2. | 01apr1947 1947q2 | 3. | 01jul1947 1947q3 | 4. | 01oct1947 1947q4 | 5. | 01jan1948 1948q1 | |--------------------| 6. | 01apr1948 1948q2 | 7. | 01jul1948 1948q3 | 8. | 01oct1948 1948q4 | 9. | 01jan1949 1949q1 | 10. | 01apr1949 1949q2 | |--------------------| 11. | 01jul1949 1949q3 | 12. | 01oct1949 1949q4 | 13. | 01jan1950 1950q1 | 14. | 01apr1950 1950q2 | 15. | 01jul1950 1950q3 | +--------------------+ . merg 1:1 dateq using `tempdata'junkm, gen(monthly_merge); Result # of obs. ----------------------------------------- not matched 1 from master 0 (monthly_merge==1) from using 1 (monthly_merge==2) matched 277 (monthly_merge==3) ----------------------------------------- . tsset dateq; time variable: dateq, 1947q1 to 2016q2 delta: 1 quarter . /* rename all variables to lower */ > rename *, lower; . /* CEE (2005) */ > /*** > Y1 = [1] real gross domestic product > [2] real consumption > [3] the GDP deflator > [4] real investment > [5] the real wage > [6] labor productivity > > Y2 = [7] real profits > [8] the growth rate of M2 > > R = [9] the federal funds rate > > All the variables, except money growth, have been logged. > ***/ > > /*******************/ > /*** MACRO WAGES ***/ > /*******************/ > /* versions of the macrowage */ > rename comprnfb macrowage; . la var macrowage "Nonfarm Business Sector: Real Compensation Per Hour"; . foreach ii of var ipdnbs cpiaucsl {; 2. gen temp1 = `ii' if dateq == yq(2009,1); 3. egen temp2 = max(temp1); 4. replace `ii' = 100*`ii'/temp2; 5. drop temp1 temp2; 6. }; (277 missing values generated) (277 real changes made) (277 missing values generated) (278 real changes made) . gen macrowage_ipd = 100*compnfb/ipdnbs; (1 missing value generated) . la var macrowage_ipd "Macro Wage [deflated using ipd (2009q1=100)]"; . gen macrowage_cpi = 100*compnfb/cpiaucsl; (1 missing value generated) . la var macrowage_cpi "Macro Wage [deflated using CPI (2009q1=100)]"; . rename ophnfb prod; . la var prod "Nonfarm Business Sector: Real Output Per Hour of All Persons"; . rename outnfb output; . la var output "Nonfarm Business Sector: Real Output"; . rename pcecc96 consumption; . la var consumption "Real Personal Consumption Expenditures"; . rename ipdnbs infl; . la var infl "Nonfarm Business Sector: Implicit Price Deflator (2009q1=100)"; . rename gpdic96 inv; . la var inv "Real Gross Private Domestic Investment, 3 decimal"; . la var fedfunds "Effective Federal Funds Rate (MEAN)"; . replace cp = 100*cp/gdpdef; (277 real changes made) . rename m2sl m2; . gen gm2 = log(m2)-log(L.m2); (49 missing values generated) . la var gm2 "growth in money supply"; . foreach ii of var macrowage macrowage_ipd macrowage_cpi prod output consumption infl inv cp {; 2. gen l`ii' = log(`ii'); 3. }; (1 missing value generated) (1 missing value generated) (1 missing value generated) (1 missing value generated) (1 missing value generated) (1 missing value generated) (1 missing value generated) (1 missing value generated) (1 missing value generated) . save `myoutput'`prg'_data, replace; (note: file ../output/fred4ucvar_data.dta not found) file ../output/fred4ucvar_data.dta saved . /* CSV file for MATLAB */ > gen year = year(dofq(dateq)); . gen quarter = quarter(dofq(dateq)); . export delimited using `myinput'`prg'_data.csv, delim(",") nolabel replace; file ../input/fred4ucvar_data.csv saved . log close; name: log: C:\Users\rwr\Dropbox\basu-house\build\code\../temp/fred4ucvar.log log type: text closed on: 17 Jul 2016, 12:11:47 ----------------------------------------------------------------------------------------------------------------------------------