Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Wayne Folta <wfolta@mac.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: st: Bug in Stata 13 (Mac) with compress duplicating variables? |
Date | Sat, 03 Aug 2013 19:05:56 -0400 |
I poked around and poked around, and I may have found something. I haven't had the chance to reproduce everything, but the dta that my data originally came from was created by exporting from R using the 'foreign' package's function to export a dta. (I have since saved over the original with saves from Stata, unfortunately, so have to recreate it.) It's possible that this introduced a problem that eventually tripped up compress. Both year and month were integers -- and not factors -- and I first though that things went wrong with compress because I remember seeing that month was compressed to a byte (makes sense, it's only 1..12), which might be coincidence or might not. I can't remember the name of the third variable, but year and month were adjacent and in the middle of the data set, column-wise, so all three might've been adjacent. > How about describe? ds? and what happens if you save the dataset? Are > there two variables with the same name that end up in the saved file? > Does the number of variables increase after compress? or a variable > got renamed incorrectly? does the problem occur only to variable year? > or other variables in the dataset? How is 'year' special? (e.g. this > is the only variable that got compressed, or the last variable, or the > first variable, etc). > Sergiy * * 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/