[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: RE: RE: combining values distributed over multiple observations |

Date |
Tue, 8 Dec 2009 23:51:17 +0100 |

<> " It seems to be at the intersection of ideas behind reshape / stack" -reshape- does indeed look like a great solution here, but really your dataset is neither exactly "long" nor "wide"... -stack- seems a little far fetched. I rarely try to use it for this kind of data management problem... HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss Sent: Dienstag, 8. Dezember 2009 23:39 To: statalist@hsphsun2.harvard.edu Subject: st: RE: combining values distributed over multiple observations <> Could be as easy as ******* clear* inp var:mylabel T1 T2 T3 T4 T5 , auto A .129 . . . . A . .647 . . . A . . .991 . . A . . . .582 . A . . . . .043 end compress collapse (min) T?, by(var) list, noo ******* HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Mark Pachucki Sent: Dienstag, 8. Dezember 2009 23:35 To: statalist@hsphsun2.harvard.edu Subject: st: combining values distributed over multiple observations Hello - this seems like an exceedingly simple question, but couldn't find a reference to relevant syntax in the help. What I'm essentially trying to do is go from the below format, where a given variable "A" takes different values at discrete observations arrayed over T1-T5: var T1 T2 T3 T4 T5 A .129 . . . . A . .647 . . . A . . .991 . . A . . . .582 . A . . . . .043 to the following format, wherein all values of A at each time are compressed into one observation : var T1 T2 T3 T4 T5 A .129 .647 .991 .582 .043 It seems to be at the intersection of ideas behind reshape / stack (and even stjoin - except it's not survival-time data). Yet doesn't fall neatly within any (or does it?) Thanks in advance, Mark * * 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/

**Follow-Ups**:**Re: st: RE: RE: combining values distributed over multiple observations***From:*Mark Pachucki <pachucki@fas.harvard.edu>

**References**:**st: combining values distributed over multiple observations***From:*Mark Pachucki <pachucki@fas.harvard.edu>

**st: RE: combining values distributed over multiple observations***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**Re: Oops.....[Fwd: st: xtoverid error]** - Next by Date:
**st: How do I calculate prvalues for specific time points in my survival analysis?** - Previous by thread:
**st: RE: combining values distributed over multiple observations** - Next by thread:
**Re: st: RE: RE: combining values distributed over multiple observations** - Index(es):

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