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
Sergiy Radyakin <[email protected]>
To
"[email protected]" <[email protected]>
Subject
Re: st: RE: Variable labels with proportion
Date
Thu, 21 Nov 2013 17:17:12 -0500
Dear Geoff, see my another email with an example.
Actually in the 'Wishes and grumbles' session of one of the recent
Stata user group meetings I made a wish to have interval labels, such
as:
label define occupation 1/999 "agriculture" 1000/1999 "services",
etc, which I needed e.g. for the -usecspro- since they are supported
in CSPro. For that Bill Gould answered 'maybe, sometimes, as long as
you don't want to create tables with this aggregation". I definitely
didn't need this aggregation in the tables, just display proper label
in the list/browse, but I guess you are one case. Best, Sergiy
On Thu, Nov 21, 2013 at 5:01 PM, Geoff Dougherty
<[email protected]> wrote:
> 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/
*
* 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/