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

From |
"Friedrich Huebler" <fhuebler@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: reshape question |

Date |
Wed, 21 May 2008 14:39:43 -0400 |

Sara, Try this: reshape long x@_24, i(id) j(year) string Friedrich On Wed, May 21, 2008 at 2:12 PM, sara borelli <saraborelli77@yahoo.it> wrote: > Dear members, > > I have a dataset in wide format where the variables are > > id x73_24 x74_24 x75_24 x87_24 x99_24 x00_24 > ... ... ... ... ... ... ... > > where the first two numbers in, for example, x73_24 indicate the year. It is a variable indicating whether there are less than 24 crimes in 1973 in city id; x00_24 indicates whether there are less than 24 crimes in 2000 in city id, and so on... > > > I have specified > reshape long x@_24, i(id), j(year) > after reshape stata displays > note: j=0 73 74 75 87 99 > note: x0_24 not found > > > if instead I write > reshape long x@_24, i(id), j(year 73-75 87 99 00) > > stata does not give that messagge. Is this because stata does read "00" as a "0" and thus does not recognize any x0_24? > And would be correct to apply the second specification? Looking at that the data it seems correct to me but I would like to be sure > > Thank you for any help > Sara Borelli * * 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/

**Follow-Ups**:**Re: st: reshape question***From:*sara borelli <saraborelli77@yahoo.it>

**References**:**st: reshape question***From:*sara borelli <saraborelli77@yahoo.it>

- Prev by Date:
**Re: st: -merge- which one would make sense?** - Next by Date:
**st: Collpasing Data by every 4 observations** - Previous by thread:
**st: reshape question** - Next by thread:
**Re: st: reshape question** - Index(es):

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