Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: data labels


From   "David Moore" <[email protected]>
To   [email protected]
Subject   RE: st: RE: data labels
Date   Thu, 14 Nov 2002 11:44:56 -0800

This is only peripherally related to the thread, but it may be of interest
to some of you following this discussion.

I often use -xi- to create dummy variables for regression, but find the
labeling of the resulting variables to be somewhat crude.  I've hacked the
original command to use the underlying value and variable labels, if
available, instead.  You don't see them in the standard regression output,
of course, but the commands described in this thread would make use of them.
Personally, I think it makes for prettier output.

Noting the changes to -xi- over the years, it should be pointed out that my
version may fall out of date and this could prove troublesome to some
people.  One could compare the two programs to see exactly what I changed
and simply update accordingly, of course.  Basically, all I did was add a
few lines of code to extract the labels and attach them to the newly created
dummy variables.

If anyone is interested in my alternative to -xi-, let me know.

David Moore

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Roger Newson
Sent: Wednesday, November 13, 2002 11:53 AM
To: [email protected]
Subject: Re: st: RE: data labels


At 22:35 12/11/02 +0000, Nick Cox wrote:
>Rich Prisinzano
> >
> > I was wondering if anyone knew of a way to get the data
> > labels to appear
> > in the regression output rather than just in describe, etc..
>
>Typing
>
>. findit labels regression
>
>points to -outreg- and -reformat-.

Another possibility would be to use the -parmest- package, which allows the
user to save the results of an estimation in a data set with 1 observation
per parameter and data on parameter estimates, confidence limits, P-values,
and other parameter attributes, including the variable label of the
X-variable corresponding to the parameter. Type

ssc desc parmest

inside Stata to find out more. A tutorial on -parmest-, entitled "Creating
plots and tables of estimation results using parmest and friends", is
available for downloading at the 2002 Stata UK User Meeting site at

http://ideas.repec.org/s/boc/usug02.html

and contains some advanced examples, including the display of value labels
for categorical predictors and confidence interval plots.

I hope this helps.

Roger


--
Roger Newson
Lecturer in Medical Statistics
Department of Public Health Sciences
King's College London
5th Floor, Capital House
42 Weston Street
London SE1 3QD
United Kingdom

Tel: 020 7848 6648 International +44 20 7848 6648
Fax: 020 7848 6620 International +44 20 7848 6620
   or 020 7848 6605 International +44 20 7848 6605
Email: [email protected]

Opinions expressed are those of the author, not the institution.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index