Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Sergiy Radyakin <serjradyakin@gmail.com> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
Subject | Re: st: Variable labels with proportion |
Date | Thu, 21 Nov 2013 17:10:15 -0500 |
sysuse auto, clear svyset [pw=weight] label define quality 1 "bad" 2 "bad" 3 "bad" 4 "ok" 5 "ok" label values rep78 quality svy : tab rep78 recode rep78 (1/3=0 "bad") (4/5=1 "ok"), generate(newrep78) svy : tab newrep78 On Thu, Nov 21, 2013 at 4:01 PM, Geoff Dougherty <geoffdougherty@gmail.com> wrote: > Hi, all. I am using svy: proportion to calculate percentages for a long list of variables. I am wondering if there's a way to have the output display the variable labels rather than variable names. I saw an indication in an old listserv post that this may not be possible, so if anyone has an idea for a workaround, that would be great. > > Also, I'm wrestling with creating a value label that will display categorical variables as binary: > > #delimit ; > label define tobinary > 1 "Yes" > 2 "No" > 7 "No" > 8 "No" > 9 "No" > ; > > However, values 2-9 are showing up as individual levels in the output. Any idea how to remedy this without recoding a long list of variables? > > Thanks, > Geoff Dougherty > * > * 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/ * * 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/