recode, get sample, and get columns
Jakson A. Aquino
jaksonaquino at yahoo.com.br
Fri Jun 24 12:51:24 CEST 2005
I developed some tools for Statist while trying to
use the PNAD database. PNAD is a national survey
made by the Brazilian government almost every
year. The resulting fixed-width database has more
than 300 variables and 360000 cases, and it
probably is the most popular database among
Brazilian social scientists.
I created a program to extract variables from a
fixed width database (xcols.c), another to extract
a sample of the rows of a Statist data file
(xsample.c), and a third one to recode a Statist
data file (recode.c). I also wrote the first draft
documentation for the three programs. Although
many researchers in the natural sciences might
never need any program like these three, I believe
that they are undispensable for a social
If the new code from recode.c, xsample.c and
xcols.c is added to Statist, we can give to
Statist users two options: (1) invoke Statist with
options -r, -s, or -x, and (2) use the menu to
choose "recode", "create a sample" or "extract
columns". xcols.c and xsample.c are very small,
and if they are added to Statist, they can become
functions of data.c. recode.c is bigger and more
complex, and, probably, it would be better to keep
it as a separate file.
If the code is accepted as part of Statist, at
least some small adaptations are necessary, like
using out_r, mymalloc, FREAD, and FWRITE, instead
of printf, malloc, fread and fwrite.
Comments and bug reports are welcome!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6981 bytes
Desc: not available
Url : http://intevation.de/pipermail/statist-list/attachments/20050624/1754e3f9/statist_tools.tar.bin
More information about the Statist-list