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: Useful labelling of dummy variables following logit
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: Useful labelling of dummy variables following logit
Date
Wed, 24 Aug 2011 13:27:38 +0100
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 <[email protected]> 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/