Statalist


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

st: RE: Problem with -reshape- and value labels


From   Clyde Schechter <cschecht@aecom.yu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: RE: Problem with -reshape- and value labels
Date   Thu, 12 Jun 2008 13:14:17 -0400

Thanks to Roger Newson for his suggestion to use his -descsave- package. It nearly did the trick. What I had neglected to mention in my description of the problem is that some of the resp variables in the real data set had no label at all, and needed to similarly be restored in that way. It appears that descsave does not cover explicitly deal with unlabeled variables. But that was very easy to fix:

tempfile formatting
descsave, dofile(`formatting')
reshape wide resp, i(seq) j(item)
<snip>
do stuff
<end snip>
reshape long
label values resp* // ADDITIONAL LINE NEEDED TO WIPE OUT UNWANTED VALUE LABELS
run `formatting'

Thanks so much for authoring this very useful package--I can envision doing a lot with it. And, of course, for solving my immediate problem.

Clyde Schechter
Albert Einstein College of Medicine
Bronx, NY, USA

*
* 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/




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