Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: Compressing a panel dataset
From
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: Compressing a panel dataset
Date
Tue, 23 Jul 2013 10:43:23 -0400
collapse (min) v1 (min) v2 (min) v3, by(id)
id v1 v2 v3
1 9 7 2
2 7 7 1
Best, Sergiy
On Tue, Jul 23, 2013 at 10:25 AM, Lukas Borkowski <[email protected]> wrote:
> Dear list,
>
> I am using Stata 12 and currently clean up a dataset that will become a panel dataset. The quality of the dataset is quite poor (originates from a survey) and I face multiple (endless) situations where values to the same questions are recorded in different variables. I would now want to eliminate duplicates and to retain only one row for each household. My dataset looks somewhat like this:
>
> id v1 v2 v3
> 1 . . 2
> 1 . 7 .
> 1 9 . .
> 2 . . 1
> 2 . 7 .
> 2 7 . .
> ...
>
> I would like to retain only one row for each household. Is there a command for this? I have tried different things but have not found any solution.
>
> Do you have any suggestion what I could do?
>
> Thank you very much for your help!
>
> Best,
>
> Lukas
>
> #
> Lukas Borkowski
> University of London, School of Oriental and African Studies (SOAS)
>
> M: [email protected]
>
>
>
>
> *
> * For searches and help try:
> * http://www.stata.com/help.cgi?search
> * http://www.stata.com/support/faqs/resources/statalist-faq/
> * http://www.ats.ucla.edu/stat/stata/
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/