/* makefmt.prg converts bond data from ascii file to gauss *.fmt to make it easier to load in other programs. takes mbx.cha ascii file produces mbx.fmt gauss data file of monthly bonds mbxa.fmt gauss data file of once a year slice with no cleaning. Note: this program may require you to increase workspace memory. TO do so, exit gauss, and etit \gauss\gaussi.cfg ------------------------------------------------------------------------- */ new; /* code used to produce mbx.fmt */ load x[] = mbx.cha; x = reshape(x,rows(x)/13,13); format /RD 12,2; "Printing data on what should be last of 1949 and first 1950"; x[15219:15220,.]'; "rows(x)"; rows(x); mbx = x[15220:rows(x),.]; save mbx; /* the following creates annual data with NO cleaning from lookbond.prg. Use it to check data against published sources. For production, it is better to run lookbond and do the cleaning */ load mbx; mo = trunc(mbx[.,1]/100)-100*trunc(mbx[.,1]/10000); indxs = indexcat(mo,12); /* implements selif in less memory */ clear mo; mbxa = mbx[indxs,.]; save mbxa;