Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: RE: Variable labels with proportion
From
Joe Canner <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: RE: Variable labels with proportion
Date
Thu, 21 Nov 2013 21:48:37 +0000
Geoff,
That is not a problem with -svy:- it appears to be a problem (feature?) with -proportion-, since it doesn't display variable labels when you don't use -svy- either. The same is true, for example, with -total-. In contrast, -tabulate- displays variable labels by default with or without -svy-. This is probably something to report/suggest to Stata for a future update/version.
I think you're out of luck on the second question. The only option I am aware of is recoding the variable to make it actually binary.
Regards,
Joe Canner
Johns Hopkins University School of Medicine
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Geoff Dougherty
Sent: Thursday, November 21, 2013 4:01 PM
To: [email protected]
Subject: st: Variable labels with proportion
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/