recode, get sample, and get columns

Jakson A. Aquino jaksonaquino at yahoo.com.br
Fri Jun 24 12:51:24 CEST 2005


Hello All!

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
scientist.

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!

Best,

Jakson






-------------- next part --------------
A non-text attachment was scrubbed...
Name: statist_tools.tar.gz
Type: application/x-gzip
Size: 6981 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/statist-list/attachments/20050624/1754e3f9/statist_tools.tar.gz


More information about the Statist-list mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)