Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Tim Evans <Tim.Evans@wmciu.nhs.uk> |

To |
"'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu> |

Subject |
RE: st: Useful labelling of dummy variables following logit |

Date |
Wed, 24 Aug 2011 13:56:58 +0100 |

Thanks again for your input. Nick, in your last post, are you suggesting an alternative way of presenting things as I'm not sure I follow what you mean by: ' I'd much prefer to work at a graphical display of odds ratios and confidence limits with variable labels as horizontal text' If there is another better (in your opinion) way of presenting what I have, then I'd be happy to know. Best wishes Tim -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: 24 August 2011 13:28 To: statalist@hsphsun2.harvard.edu Subject: Re: st: Useful labelling of dummy variables following logit Although it's a fair way from the question, I will add that if I had your problem I'd much prefer to work at a graphical display of odds ratios and confidence limits with variable labels as horizontal text. Nick On Wed, Aug 24, 2011 at 1:16 PM, Maarten Buis <maartenlbuis@gmail.com> wrote: > On Wed, Aug 24, 2011 at 1:22 PM, Tim Evans wrote: >> Thanks for your help. I guess what I'm after is the labelling of the dummy variables when printed in the output table. I couldn't get dummieslab to work very well on the example using the auto data - I got this error message: >> >> sysuse auto >> (1978 Automobile Data) >> label define newfor 0 "Domestic car" 1 "Foreign (European or Japanese) car" >> label values foreign newfor >> dummieslab foreign >> dummieslab foreign, word(1) >> dummieslab foreign, word(-1) >> >> implied variable names contain duplicates >> r(498); > > That makes sense: In the last the last call to -dummieslab, you are > asking the names of the variables to come from the last word of each > value label. In this case that is for each category the word "car". > You cannot create two variables with the same name, so it should exit > with an error, which it does. > >> Even after this works, I'm not sure this would follow through to the table. > > In the output table you see the names of the variables, as the names > of the variables now somewhat correspond to the value labels, you now > get closer to what you want. It may still look horrible because > variable names may not contain characters like "(" or " " or when the > names are very long. If that is too big a problem for you, than there > is no other option than to create and name the dummy variables > yourself. That way you can fine tune the names to represent the > balance between clarity and length of the name. > * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ _DISCLAIMER: This email and any attachments hereto contains proprietary information, some or all of which may be confidential or legally privileged. It is for the exclusive use of the intended recipient(s) only. If an addressing or transmission error has misdirected this e-mail and you are not the intended recipient(s), please notify the author by replying to this e-mail. If you are not the intended recipient you must not use, disclose, distribute, copy, print, or rely on this e-mail or any attachments, as this may be unlawful. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Useful labelling of dummy variables following logit***From:*Nick Cox <njcoxstata@gmail.com>

**Re: st: Useful labelling of dummy variables following logit***From:*Maarten Buis <maartenlbuis@gmail.com>

**References**:**st: Useful labelling of dummy variables following logit***From:*Tim Evans <Tim.Evans@wmciu.nhs.uk>

**Re: st: Useful labelling of dummy variables following logit***From:*Maarten Buis <maartenlbuis@gmail.com>

**Re: st: Useful labelling of dummy variables following logit***From:*Nick Cox <njcoxstata@gmail.com>

**RE: st: Useful labelling of dummy variables following logit***From:*Tim Evans <Tim.Evans@wmciu.nhs.uk>

**Re: st: Useful labelling of dummy variables following logit***From:*Maarten Buis <maartenlbuis@gmail.com>

**Re: st: Useful labelling of dummy variables following logit***From:*Nick Cox <njcoxstata@gmail.com>

- Prev by Date:
**Re: st: string function** - Next by Date:
**Re: st: Useful labelling of dummy variables following logit** - Previous by thread:
**Re: st: Useful labelling of dummy variables following logit** - Next by thread:
**Re: st: Useful labelling of dummy variables following logit** - Index(es):