[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: AW: AW: one row for each individual |

Date |
Thu, 26 Mar 2009 10:51:51 +0100 |

<> Also: Give an excerpt of your data, or frame your question in terms of a dataset shipped with Stata... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Martin Weiss Gesendet: Donnerstag, 26. März 2009 10:20 An: statalist@hsphsun2.harvard.edu Betreff: st: AW: one row for each individual <> Stata does not randomly select in your example, but keeps exactly the first observation for every "newID" if you specify -_n==1-. You may want to look at -reshape- for a solution... HTH Martin -----Ursprüngliche Nachricht----- Von: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Chiara Mussida Gesendet: Donnerstag, 26. März 2009 10:10 An: statalist Betreff: st: one row for each individual Dear All, i'm trying to get 1 row for each individual in my dataset. The actual situation of my data: I have 3 rows for each, and the indivv are identifiesd with the variable newID. Anyway, by employing the command: bysort newID: keep if _n==1, I get 1 row for each, but stata randomly select 1 row for every individual in this way causing the loss of relevant info. each indiv has been interv in 3 waves (2004,2005, 2006), for each wave I gen the corresponding categorical variables, which are the lase 36 colums of the dataset. I would be pleased, given that these represent the labour market story of each subject, to get all this info in 1 row. Does anybody know the precise command to get this result? Thanks a lot -- Chiara Mussida PhD candidate Doctoral school of Economic Policy Catholic University, Piacenza (Italy) * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/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/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/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**References**:**st: one row for each individual***From:*Chiara Mussida <cmussida@gmail.com>

**st: AW: one row for each individual***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**Re: st: 2SLS with random effects correcting for autocorrelation** - Next by Date:
**st: Testing unbalanced panels** - Previous by thread:
**st: AW: one row for each individual** - Next by thread:
**Re: st: AW: AW: one row for each individual** - Index(es):

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