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]
Re: st: RE: Variable labels with proportion
From
Geoff Dougherty <[email protected]>
To
[email protected]
Subject
Re: st: RE: Variable labels with proportion
Date
Thu, 21 Nov 2013 16:01:41 -0600
Joe,
Thanks for the input.
I mentioned svy lest someone suggest I try tab, or something else that doesn't play nicely with svy but maintains the labels.
It looks like I'll be able to get there by saving the svy: prop output to a dataset with parmest and then merging with a table of variable names/labels. I can then delete the rows that aren't "Yes", and calculate a new "No" variable as 1-yes.
Best,
Geoff Dougherty
MPH candidate '14, Johns Hopkins Bloomberg School of Public Health
Health rankings data consultant, US News & World Report
On Nov 21, 2013, at 3:48 PM, Joe Canner wrote:
> 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/
*
* 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/