scf6286.doc

advertisement
Survey of Consumer Finances
1962 - 1963 and 1983 - 1986
Federal Reserve Board
Complete microdata files for the 1962-3 and the 1983-6 Surveys of
Consumer Finances are available for anonymous ftp from nber.harvard.edu.
For the 1962-3 survey all 619 variables are stored in the file
scf6263.tar.Z in directory pub/scf6263, and for the 1983-6 survey 1959
variables are stored in the file scf8386.tar.Z in pub/scf8386. We do not
yet have a machine readable codebook for the 62-63 survey, and would be
grateful for a donation. Codebooks for 1983-6 are in pub/scf8386.
Within the tar files, each variable is given its own file. Within the
file there are a few lines of text, followed by the data one line per
observation. The files are readable with any text editor.
Variable names for the surveys are given in the documentation only as
numbers. A ``v'' is prefixed for the 1962 survey, an ``x'' for the 1963
survey a ``b'' for 1983 and a ``c'' for 1986. In the tar files a
``.db'' is added as a file extension. That is, variable 1 in 1962 (a
sequence number) is be stored as v001.db.
The .db file contains all 2557 or 4303 observations for the single
variable in Micro-TSP format. This format is pure ASCII and directly
supported by RATSDATA and TSP. If you examine a sample file, the format
will be apparent. For SAS or STATA, you need to remove the 5 or 6 line
header and convert the missing value code from ``1.e-37'' to ``.''
before reading the data. A spreadsheet could do this, and also join
several variables as columns in a single file. For STATA, note the
'byvariable' option of the infile command.
On Unix, it is possible to untar, extract and combine in two statements:
zcat scf6263.tar.Z | tar -xvf - v001.db v101.db
paste *.db | tail -2557 >file.dat
By way of explanation: zcat uncompresses the tar file and passes
it on to tar which extracts the two named variables. The second
statement
uses paste to combine the two .db files into one, with variables per
line. This in turn is passed on to tail which deletes the header
comments,
leaving file.dat with two fields per record, and 2557 records. Voila!
Daniel Feenberg
National Bureau of Economic Research
December 11, 1992
Download