[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 |
Re: st: RE: reshape problem |

Date |
Tue, 9 Dec 2008 21:39:51 +0100 |

That was my initial reply... HTH

To: <statalist@hsphsun2.harvard.edu> Sent: Tuesday, December 09, 2008 9:28 PM Subject: Re: st: RE: reshape problem

I work as a statistical consultant in a computer lab, and I ran into apatron who had this problem on his computer. (Reshaping data,specifically.) After much head-scratching, we figured out that it washis version of Stata that was causing the problem, as when it was doneon the lab machines it worked fine. Later, he admitted to me that theversion of Stata 10 that he had been using was pirated. In general, Iwould be careful if you are not using a fully licensed version of Stata10, because I have seen this problem before, and Stata is veryreasonably priced for researchers and students, anyway. The reshapingworked fine on Stata 10 on the computer lab machines. I'm not sure whatversion it was exactly that he was using.Nick Cox wrote:Although you are asked _not_ to send attachments -- as I should perhapshave reminded you in my previous post -- this one got through to me andI found that your data -reshape- fine:. ds x1963 x1967 x1971 x1975 x1979 x1983 x1987 x1992 x1996 x2001 x2005 x1964 x1968 x1972 x1976 x1980 x1984 x1989 x1993 x1997 x2002 x2006 x1965 x1969 x1973 x1977 x1981 x1985 x1990 x1994 x1999 x2003 regio x1966 x1970 x1974 x1978 x1982 x1986 x1991 x1995 x2000 x2004 . isid regio . reshape long x, i(regio) j(year) (note: j = 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1989 1990 1991 1992 1993 19941995 1996 1997 1999 20002001 2002 2003 2004 2005 2006)Data wide -> long ------------------------------------------------------------------------ ----- Number of obs. 21 -> 882 Number of variables 43 -> 3 j variable (42 values) -> year xij variables: x1963 x1964 ... x2006 -> x ------------------------------------------------------------------------ ----- . su Variable | Obs Mean Std. Dev. Min Max -------------+-------------------------------------------------------- regio | 882 11 6.058736 1 21 year | 882 1984.095 12.81874 1963 2006 x | 882 31.23255 9.333917 9.844 50.513 The problem if there is one would seem to lie in your Stata, but I can'tsay what it is.Nickn.j.cox@durham.ac.ukEmanuele Millemaci As the file *.dta containing the dataset is small(few KB), I try to send it attached to this message. Alternatively, such a file can be downloaded at this link: http://www.2shared.com/file/4425484/c1951cbd/produc.html (perhaps, need to wait few seconds before displaying the working link at the bottom of the page) The command I use is reshape long x, i(regio) j(year) 2008/12/9 Nick Cox <n.j.cox@durham.ac.uk>:Despite various attempts your problem looks just as puzzling as when first posted. If there is some way for you to post your data file in an accessible place, interested people will be able to look themselves. Alternatively, I suggest you get in touch with StataCorp tech-support.Iguess they will want a copy of the file too. Nick n.j.cox@durham.ac.uk Emanuele MillemaciI had a dataset on excel with regions on the rows and years on thecolumns.I moved this data to Stata 10.1 MP(updated to the latest packages)andwas trying to reshaping from wide to long as I would like to haveallyears' data of the same variable on the same column. Below, I report an example of what I have: regio prod1995 prod1996 .....prod2006 1 .... ... ... 2 ... ... ... 3 ... ... ... 4 ... ... ... I would like to get: regio years prod 1 1995 ... 1 1996 ... .. 2 1995 ... .. 3 1995 ... .. 4 1995 ... .. The command I use is: reshape long prod, i(regio) j(year) It would appear a very easy task. Instead, the result I get isalwaysdifferent (every time I launch the command) and never correct. Stata drops many observations and many others become missing forsomevariable (whereas my dataset has no missing value). I have also checked that Stata considers data as numeric.* * 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/-- Kyle Hood Department of Economics Yale University New Haven, CT website: http://www.econ.yale.edu/~kkh25 * * 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: reshape problem***From:*"Emanuele Millemaci" <e.millemaci@gmail.com>

**Re: st: RE: reshape problem***From:*"Ada Ma" <heu034@googlemail.com>

**Re: st: RE: reshape problem***From:*"Emanuele Millemaci" <e.millemaci@gmail.com>

**Re: st: RE: reshape problem***From:*"Anders Alexandersson" <andersalex@gmail.com>

**Re: st: RE: reshape problem***From:*"Emanuele Millemaci" <e.millemaci@gmail.com>

**RE: st: RE: reshape problem***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: reshape problem***From:*"Emanuele Millemaci" <e.millemaci@gmail.com>

**RE: st: RE: reshape problem***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**Re: st: RE: reshape problem***From:*Kyle Hood <kyle.hood@yale.edu>

- Prev by Date:
**RE: st: RE: reshape problem** - Next by Date:
**st: Re: RE: Re: Exporting results after -table-** - Previous by thread:
**RE: st: RE: reshape problem** - Next by thread:
**Rép. : st: RE: Exporting results after -anova-** - Index(es):

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