{smcl} {com}{sf}{ul off}{txt}{.-} name: {res} {txt}log: {res}/Users/baum/Documents/IMFInstitute/usmacro1.smcl {txt}log type: {res}smcl {txt}opened on: {res}24 Jan 2011, 14:39:08 {txt} {com}. clear all {txt} {com}. insheet using ifsQ.download.php {txt}(5 vars, 6198 obs) {com}. do ifsQdata {txt} {com}. * This Stata 6.0 program will process a IFS (quarterly) data extract produced by the data . * access system, saved to file 'ifsQdata.download.php3' and loaded with 'insheet', . * reformatting the data as 'wide', with each variable in a separate column. . * This program does not save the resulting dataset. . * C F Baum 0110 rev 0703 for tsset . * . * Before running this program, you must use 'insheet using...' to . * read the "ifsQdata.download.php3" file into Stata. If you are using . * a desktop (Mac or Windows) version of Stata, this is most easily done . * by using the File->Filename... command to point to the file on your disk. . * . * Provide concordance for series; order in this list corresponds . * to 'var1', 'var2' etc. . tab ncode {txt}ncode {c |} Freq. Percent Cum. {hline 12}{c +}{hline 35} 51 {c |}{res} 207 3.34 3.34 {txt} 52 {c |}{res} 207 3.34 6.68 {txt} 58 {c |}{res} 207 3.34 10.02 {txt} 73 {c |}{res} 207 3.34 13.36 {txt} 155 {c |}{res} 207 3.34 16.70 {txt} 204 {c |}{res} 202 3.26 19.96 {txt} 205 {c |}{res} 36 0.58 20.54 {txt} 220 {c |}{res} 202 3.26 23.80 {txt} 316 {c |}{res} 207 3.34 27.14 {txt} 318 {c |}{res} 207 3.34 30.48 {txt} 334 {c |}{res} 207 3.34 33.82 {txt} 335 {c |}{res} 158 2.55 36.37 {txt} 337 {c |}{res} 144 2.32 38.69 {txt} 342 {c |}{res} 191 3.08 41.77 {txt} 345 {c |}{res} 207 3.34 45.11 {txt} 347 {c |}{res} 207 3.34 48.45 {txt} 348 {c |}{res} 207 3.34 51.79 {txt} 349 {c |}{res} 207 3.34 55.13 {txt} 350 {c |}{res} 158 2.55 57.68 {txt} 351 {c |}{res} 207 3.34 61.02 {txt} 359 {c |}{res} 207 3.34 64.36 {txt} 361 {c |}{res} 139 2.24 66.60 {txt} 363 {c |}{res} 207 3.34 69.94 {txt} 369 {c |}{res} 207 3.34 73.28 {txt} 480 {c |}{res} 207 3.34 76.62 {txt} 481 {c |}{res} 207 3.34 79.96 {txt} 482 {c |}{res} 207 3.34 83.30 {txt} 483 {c |}{res} 207 3.34 86.64 {txt} 484 {c |}{res} 207 3.34 89.98 {txt} 486 {c |}{res} 207 3.34 93.32 {txt} 489 {c |}{res} 207 3.34 96.66 {txt} 492 {c |}{res} 207 3.34 100.00 {txt}{hline 12}{c +}{hline 35} Total {c |}{res} 6,198 100.00 {txt} {com}. * Rename the data to ensure that name length limits are observed . rename dataval var {txt} {com}. * Reshape the data into panel format . reshape wide var,i(ccode year qtr) j(ncode) {txt}(note: j = 51 52 58 73 155 204 205 220 316 318 334 335 337 342 345 347 348 349 350 351 359 361 363 369 480 481 482 483 484 486 489 492) Data{col 36}long{col 43}->{col 48}wide {hline 77} Number of obs. {res} 6198 {txt}->{res} 207 {txt}Number of variables {res} 5 {txt}->{res} 35 {txt}j variable (32 values) {res}ncode {txt}-> (dropped) xij variables: {res}var {txt}-> {res}var51 var52 ... var492 {txt}{hline 77} {com}. * Specify the i and t identifiers . iis ccode {txt} {com}. gen date=yq(year,qtr) {txt} {com}. format date %tq {txt} {com}. tis date {txt} {com}. * describe the data as reformatted . tsset ccode date {res}{txt}{col 8}panel variable: {res}ccode (strongly balanced) {txt}{col 9}time variable: {res}{col 25}date, 1959q1 to 2010q3 {txt}{col 17}delta: {res}1 quarter {txt} {com}. summ {txt} Variable {c |} Obs Mean Std. Dev. Min Max {hline 13}{c +}{hline 56} {space 7}ccode {c |}{res} 207 111 0 111 111 {txt}{space 8}year {c |}{res} 207 1984.377 14.97548 1959 2010 {txt}{space 9}qtr {c |}{res} 207 2.492754 1.118553 1 4 {txt}{space 7}var51 {c |}{res} 207 54.60411 31.99002 14.8234 112.282 {txt}{space 7}var52 {c |}{res} 207 4.016544 2.913436 -1.62336 14.4503 {txt}{hline 13}{c +}{hline 56} {space 7}var58 {c |}{res} 207 22.53738 21.60395 2.92 123.973 {txt}{space 7}var73 {c |}{res} 207 3.578331 2.375856 .192355 11.0825 {txt}{space 6}var155 {c |}{res} 207 339.0834 392.2569 40.615 2074.88 {txt}{space 6}var204 {c |}{res} 202 4231.313 4027.925 294.556 15649.5 {txt}{space 6}var205 {c |}{res} 36 12417.63 2234.114 9164.36 15588.1 {txt}{hline 13}{c +}{hline 56} {space 6}var220 {c |}{res} 202 683.9681 450.8478 143.213 1487.02 {txt}{space 6}var316 {c |}{res} 207 686.3667 473.6018 139.6 1765.7 {txt}{space 6}var318 {c |}{res} 207 2827.04 2356.066 289.2 8709.1 {txt}{space 6}var334 {c |}{res} 207 5.737956 3.38206 .12 17.78 {txt}{space 6}var335 {c |}{res} 158 6.142827 3.408482 .16 16.7733 {txt}{hline 13}{c +}{hline 56} {space 6}var337 {c |}{res} 144 5.633148 3.242065 .054 15.7767 {txt}{space 6}var342 {c |}{res} 191 6.557255 3.502772 .256333 18.5007 {txt}{space 6}var345 {c |}{res} 207 7.706555 3.194581 3.25 20.3233 {txt}{space 6}var347 {c |}{res} 207 6.680628 2.58984 2.73667 14.8467 {txt}{space 6}var348 {c |}{res} 207 6.205202 2.846842 .833333 15.79 {txt}{hline 13}{c +}{hline 56} {space 6}var349 {c |}{res} 207 36.23329 38.05912 5.6294 128.018 {txt}{space 6}var350 {c |}{res} 158 46.51016 46.00487 2.9169 210.055 {txt}{space 6}var351 {c |}{res} 207 37.81332 40.04274 4.25073 130.258 {txt}{space 6}var359 {c |}{res} 207 54.09373 31.58975 12.4239 112.318 {txt}{space 6}var361 {c |}{res} 139 116.7296 19.92613 83.1943 179.976 {txt}{hline 13}{c +}{hline 56} {space 6}var363 {c |}{res} 207 61.49922 24.17083 23.6933 105.448 {txt}{space 6}var369 {c |}{res} 207 5.961643 1.578505 3.2 11.1667 {txt}{space 6}var480 {c |}{res} 207 5.29e+11 5.20e+11 2.18e+10 1.93e+12 {txt}{space 6}var481 {c |}{res} 207 8.42e+11 7.01e+11 7.82e+10 2.50e+12 {txt}{space 6}var482 {c |}{res} 207 9.92e+11 8.21e+11 1.03e+11 2.74e+12 {txt}{hline 13}{c +}{hline 56} {space 6}var483 {c |}{res} 207 1.72e+10 3.65e+10 -1.80e+11 1.27e+11 {txt}{space 6}var484 {c |}{res} 207 3.56e+12 3.14e+12 3.10e+11 1.04e+13 {txt}{space 6}var486 {c |}{res} 207 6.79e+11 7.29e+11 2.14e+10 2.69e+12 {txt}{space 6}var489 {c |}{res} 207 5.26e+12 4.45e+12 4.96e+11 1.48e+13 {txt}{space 6}var492 {c |}{res} 207 58.37399 30.45941 18.2821 111.093 {txt}{hline 13}{c +}{hline 56} {space 8}date {c |}{res} 207 99 59.89992 -4 202 {txt} {com}. * end of do-file; use 'save' to save the data if you wish . . . {txt}end of do-file {com}. drop var205 {txt} {com}. label var var51 "CPI" {txt} {com}. label var var52 "CPI % CHANGE" {txt} {com}. label var var58 "PETROLEUM:AVERAGE CRUDE PRICE" {txt} {com}. label var var73 "GDP DEFLATOR % CHANGE" {txt} {com}. label var var155 "MONETARY BASE, SEASONALLY ADJUSTED" {txt} {com}. label var var204 "DOMESTIC CREDIT" {txt} {com}. label var var220 "MONEY, SEASONALLY ADJUSTED" {txt} {com}. label var var316 "M1 SEASONALLY ADJUSTED" {txt} {com}. label var var318 "M2 SEASONALLY ADJUSTED" {txt} {com}. label var var334 "FEDERAL FUNDS RATE" {txt} {com}. label var var335 "COMMERCIAL PAPER- 3 MONTH" {txt} {com}. label var var337 "T-BILL RATE-3 MNTH CONS. MAT." {txt} {com}. label var var342 "3-MONTH US DEP. LONDON OFFER" {txt} {com}. label var var345 "BANK PRIME LOAN RATE" {txt} {com}. label var var347 "GOVT BOND YIELD: 10 YEAR" {txt} {com}. label var var348 "GOVT BOND YIELD: 3 YEAR" {txt} {com}. label var var349 "SHARE PRICES" {txt} {com}. label var var350 "NASDAQ COMPOSITE" {txt} {com}. label var var351 "S&P INDUSTRIALS" {txt} {com}. label var var359 "WAGES: HOURLY EARNINGS, MFG" {txt} {com}. label var var361 "REER BASED ON RULC" {txt} {com}. label var var363 "INDUSTRIAL PRODUCTION SA" {txt} {com}. label var var369 "UNEMPLOYMENT RATE" {txt} {com}. label var var480 "EXPORTS OF GOODS AND SERVICES SA" {txt} {com}. label var var481 "GOVERNMENT CONSUMPTION EXPEND. SA" {txt} {com}. label var var482 "GROSS FIXED CAPITAL FORMATION SA" {txt} {com}. label var var483 "CHANGES IN INVENTORIES SA" {txt} {com}. label var var484 "HOUSEH.CONS.EXPEND.,INCL.NPISHS SA" {txt} {com}. label var var486 "IMPORTS OF GOODS AND SERVICES SA" {txt} {com}. label var var489 "GROSS DOMESTIC PRODUCT SA" {txt} {com}. label var var492 "GDP DEFLATOR (2005=100)" {txt} {com}. tsset date {res}{txt}{col 9}time variable: {res}{col 25}date, 1959q1 to 2010q3 {txt}{col 17}delta: {res}1 quarter {txt} {com}. // correct units issues with 48x . foreach v of varlist var48* {c -(} {txt} 2{com}. replace `v' = `v'/1.0e9 {txt} 3{com}. {c )-} {txt}(207 real changes made) (207 real changes made) (207 real changes made) (207 real changes made) (207 real changes made) (207 real changes made) (207 real changes made) {com}. desc {txt}Contains data obs:{res} 207 {txt} vars:{res} 35 {txt} size:{res} 54,855{txt} (99.9% of memory free) {hline} storage display value variable name type format label variable label {hline} {p 0 48}{res}{bind:ccode }{txt}{bind: int }{bind:{txt}%8.0g }{space 1}{bind: }{bind: }{res}{res}{p_end} {p 0 48}{bind:year }{txt}{bind: int }{bind:{txt}%8.0g }{space 1}{bind: }{bind: }{res}{res}{p_end} {p 0 48}{bind:qtr }{txt}{bind: byte }{bind:{txt}%8.0g }{space 1}{bind: }{bind: }{res}{res}{p_end} {p 0 48}{bind:var51 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}CPI{p_end} {p 0 48}{bind:var52 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}CPI % CHANGE{p_end} {p 0 48}{bind:var58 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}PETROLEUM:AVERAGE CRUDE PRICE{p_end} {p 0 48}{bind:var73 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GDP DEFLATOR % CHANGE{p_end} {p 0 48}{bind:var155 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}MONETARY BASE, SEASONALLY ADJUSTED{p_end} {p 0 48}{bind:var204 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}DOMESTIC CREDIT{p_end} {p 0 48}{bind:var220 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}MONEY, SEASONALLY ADJUSTED{p_end} {p 0 48}{bind:var316 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}M1 SEASONALLY ADJUSTED{p_end} {p 0 48}{bind:var318 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}M2 SEASONALLY ADJUSTED{p_end} {p 0 48}{bind:var334 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}FEDERAL FUNDS RATE{p_end} {p 0 48}{bind:var335 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}COMMERCIAL PAPER- 3 MONTH{p_end} {p 0 48}{bind:var337 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}T-BILL RATE-3 MNTH CONS. MAT.{p_end} {p 0 48}{bind:var342 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}3-MONTH US DEP. LONDON OFFER{p_end} {p 0 48}{bind:var345 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}BANK PRIME LOAN RATE{p_end} {p 0 48}{bind:var347 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GOVT BOND YIELD: 10 YEAR{p_end} {p 0 48}{bind:var348 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GOVT BOND YIELD: 3 YEAR{p_end} {p 0 48}{bind:var349 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}SHARE PRICES{p_end} {p 0 48}{bind:var350 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}NASDAQ COMPOSITE{p_end} {p 0 48}{bind:var351 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}S&P INDUSTRIALS{p_end} {p 0 48}{bind:var359 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}WAGES: HOURLY EARNINGS, MFG{p_end} {p 0 48}{bind:var361 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}REER BASED ON RULC{p_end} {p 0 48}{bind:var363 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}INDUSTRIAL PRODUCTION SA{p_end} {p 0 48}{bind:var369 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}UNEMPLOYMENT RATE{p_end} {p 0 48}{bind:var480 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}EXPORTS OF GOODS AND SERVICES SA{p_end} {p 0 48}{bind:var481 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GOVERNMENT CONSUMPTION EXPEND. SA{p_end} {p 0 48}{bind:var482 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GROSS FIXED CAPITAL FORMATION SA{p_end} {p 0 48}{bind:var483 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}CHANGES IN INVENTORIES SA{p_end} {p 0 48}{bind:var484 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}HOUSEH.CONS.EXPEND.,INCL.NPISHS SA{p_end} {p 0 48}{bind:var486 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}IMPORTS OF GOODS AND SERVICES SA{p_end} {p 0 48}{bind:var489 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GROSS DOMESTIC PRODUCT SA{p_end} {p 0 48}{bind:var492 }{txt}{bind: double }{bind:{txt}%10.0g }{space 1}{bind: }{bind: }{res}{res}GDP DEFLATOR (2005=100){p_end} {p 0 48}{bind:date }{txt}{bind: float }{bind:{txt}%tq }{space 1}{bind: }{bind: }{res}{res}{p_end} {txt}{hline} Sorted by: {res}date Note: dataset has changed since last saved {txt} {com}. summ {txt} Variable {c |} Obs Mean Std. Dev. Min Max {hline 13}{c +}{hline 56} {space 7}ccode {c |}{res} 207 111 0 111 111 {txt}{space 8}year {c |}{res} 207 1984.377 14.97548 1959 2010 {txt}{space 9}qtr {c |}{res} 207 2.492754 1.118553 1 4 {txt}{space 7}var51 {c |}{res} 207 54.60411 31.99002 14.8234 112.282 {txt}{space 7}var52 {c |}{res} 207 4.016544 2.913436 -1.62336 14.4503 {txt}{hline 13}{c +}{hline 56} {space 7}var58 {c |}{res} 207 22.53738 21.60395 2.92 123.973 {txt}{space 7}var73 {c |}{res} 207 3.578331 2.375856 .192355 11.0825 {txt}{space 6}var155 {c |}{res} 207 339.0834 392.2569 40.615 2074.88 {txt}{space 6}var204 {c |}{res} 202 4231.313 4027.925 294.556 15649.5 {txt}{space 6}var220 {c |}{res} 202 683.9681 450.8478 143.213 1487.02 {txt}{hline 13}{c +}{hline 56} {space 6}var316 {c |}{res} 207 686.3667 473.6018 139.6 1765.7 {txt}{space 6}var318 {c |}{res} 207 2827.04 2356.066 289.2 8709.1 {txt}{space 6}var334 {c |}{res} 207 5.737956 3.38206 .12 17.78 {txt}{space 6}var335 {c |}{res} 158 6.142827 3.408482 .16 16.7733 {txt}{space 6}var337 {c |}{res} 144 5.633148 3.242065 .054 15.7767 {txt}{hline 13}{c +}{hline 56} {space 6}var342 {c |}{res} 191 6.557255 3.502772 .256333 18.5007 {txt}{space 6}var345 {c |}{res} 207 7.706555 3.194581 3.25 20.3233 {txt}{space 6}var347 {c |}{res} 207 6.680628 2.58984 2.73667 14.8467 {txt}{space 6}var348 {c |}{res} 207 6.205202 2.846842 .833333 15.79 {txt}{space 6}var349 {c |}{res} 207 36.23329 38.05912 5.6294 128.018 {txt}{hline 13}{c +}{hline 56} {space 6}var350 {c |}{res} 158 46.51016 46.00487 2.9169 210.055 {txt}{space 6}var351 {c |}{res} 207 37.81332 40.04274 4.25073 130.258 {txt}{space 6}var359 {c |}{res} 207 54.09373 31.58975 12.4239 112.318 {txt}{space 6}var361 {c |}{res} 139 116.7296 19.92613 83.1943 179.976 {txt}{space 6}var363 {c |}{res} 207 61.49922 24.17083 23.6933 105.448 {txt}{hline 13}{c +}{hline 56} {space 6}var369 {c |}{res} 207 5.961643 1.578505 3.2 11.1667 {txt}{space 6}var480 {c |}{res} 207 528.5652 519.6567 21.8 1927.3 {txt}{space 6}var481 {c |}{res} 207 841.8981 700.6253 78.2 2503.7 {txt}{space 6}var482 {c |}{res} 207 991.6319 820.5616 102.8 2737.1 {txt}{space 6}var483 {c |}{res} 207 17.21449 36.51636 -179.5 126.6 {txt}{hline 13}{c +}{hline 56} {space 6}var484 {c |}{res} 207 3555.82 3138.476 310.1 10383.6 {txt}{space 6}var486 {c |}{res} 207 679.4237 729.1259 21.4 2690.4 {txt}{space 6}var489 {c |}{res} 207 5255.701 4449.525 495.5 14750.2 {txt}{space 6}var492 {c |}{res} 207 58.37399 30.45941 18.2821 111.093 {txt}{space 8}date {c |}{res} 207 99 59.89992 -4 202 {txt} {com}. . log close {txt}name: {res} {txt}log: {res}/Users/baum/Documents/IMFInstitute/usmacro1.smcl {txt}log type: {res}smcl {txt}closed on: {res}24 Jan 2011, 14:39:08 {txt}{.-} {smcl} {txt}{sf}{ul off}