Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: help in data manipulation (extraction of components in database and transposition of entries)


From   Jose Ramon Albert <toots_a@yahoo.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: help in data manipulation (extraction of components in database and transposition of entries)
Date   Thu, 30 Mar 2006 23:11:10 -0800 (PST)

i have a census data set of farming households that
have on each
"parcel" several sets of commodities planted... the
database looks likes this:

farm  parcel    commodity          area    type
1       1           rice            2
permanent
1       2           corn            3
permanent
2       1           banana          5         temp
2       1           rice            3         temp
2       1           corn            4         temp
2       2           rice            10       permanent
2       2           corn           5         permanent

etc.

is it possible to have the STATA database look instead
like this:

farm   parcel   rice area     corn area  barana area
1          1        2
1          2        .             3
2          1        3             4               5
2          2        10            5


in principle, what's happening is that we select each
unique parcel
and extract the "data matrix"  and then transpose
it...

can this be done in STATA or would it be faster to do
this in
another software instead?

jose ramon albert
manila, philippines

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index