Statalist The Stata Listserver


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

st: RE: help in data manipulation (extraction of components indatabase and transposition of entries


From   "Maurizio Gibin" <Maurizio.Gibin@southwarkpct.nhs.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: help in data manipulation (extraction of components indatabase and transposition of entries
Date   Fri, 31 Mar 2006 17:03:41 +0100

Hi,
I really apologize for my lack of precision in explainin what my
problem was,
But I start using stata this week and I have to solve this problem and
I was (I am) in a rush.
Again, about the ado program compiled by Paul Seed, there might be some
corrections in the code to do
but at this time I am not in th eposition to suggest anything.
"It is not working" means that I put the parameters and the result was
a variable exaclty equal to the original one.
Thank you so much and I apoligize again for my lack of terminology.
Maurizio

>>> n.j.cox@durham.ac.uk 03/31/06 4:43 pm >>>
In Stata this would be a -reshape-. Try 

reshape wide area , i(farm) j(commmodity) string 

Nick 
n.j.cox@durham.ac.uk 

Jose Ramon Albert
 
> 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?

*
*   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/
*
*   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