Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: value labels in output regression model


From   Fred Wolfe <[email protected]>
To   [email protected], <[email protected]>
Subject   Re: st: RE: value labels in output regression model
Date   Thu, 03 Aug 2006 09:48:00 -0500

I wrote a front end to -estout- that does what is requested. It wrote it for my own purposes wasn't my intention to support it generally so I didn't submit it to the archives. I'll be glad to send it to people who request (assuming not too many requests).

Here is output

. xi: reg haq_ pain_ age sex i.edcat i.eth
i.edcat _Iedcat_0-4 (naturally coded; _Iedcat_2 omitted)
i.ethorig _Iethorig_1-7 (naturally coded; _Iethorig_1 omitted)

Source | SS df MS Number of obs = 91391
-------------+------------------------------ F( 12, 91378) = 5739.31
Model | 20754.1758 12 1729.51465 Prob > F = 0.0000
Residual | 27536.3448 91378 .301345453 R-squared = 0.4298
-------------+------------------------------ Adj R-squared = 0.4297
Total | 48290.5206 91390 .528400488 Root MSE = .54895

------------------------------------------------------------------------------
haq_disabi~y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
pain_scale | .1558587 .0006831 228.17 0.000 .1545198 .1571975
age | .0093668 .0001478 63.39 0.000 .0090772 .0096564
sex | -.3222326 .004443 -72.53 0.000 -.3309408 -.3135243
_Iedcat_0 | .1101317 .0126369 8.72 0.000 .0853634 .1349
_Iedcat_1 | .0709843 .0073687 9.63 0.000 .0565417 .0854269
_Iedcat_3 | -.0371579 .004691 -7.92 0.000 -.0463521 -.0279636
_Iedcat_4 | -.1199543 .0046501 -25.80 0.000 -.1290684 -.1108402
_Iethorig_2 | .0882691 .0100497 8.78 0.000 .0685718 .1079663
_Iethorig_3 | -.0253238 .0186842 -1.36 0.175 -.0619446 .011297
_Iethorig_4 | .127085 .0195591 6.50 0.000 .0887493 .1654207
_Iethorig_5 | .1399429 .0128928 10.85 0.000 .1146731 .1652128
_Iethorig_7 | -.0446747 .0298009 -1.50 0.134 -.1030842 .0137348
_cons | .0132629 .0102259 1.30 0.195 -.0067797 .0333055
------------------------------------------------------------------------------

. regestout, n
(note: file atesteo.log not found)

Regression analysis: dependent variable is haq_disability [HAQ (0-3)]

Coef. P-value 95% C.I.
Pain (0-10) 0.156 0.000 [0.155,0.157]
Age (years) 0.009 0.000 [0.009,0.010]
Sex (male=1) -0.322 0.000 [-0.331,-0.314]
0-8 0.110 0.000 [0.085,0.135]
8-11 0.071 0.000 [0.057,0.085]
13-15 -0.037 0.000 [-0.046,-0.028]
16 or > -0.120 0.000 [-0.129,-0.111]
Black (non-Hispanic) 0.088 0.000 [0.069,0.108]
Asian/Pacific Islander -0.025 0.175 [-0.062,0.011]
Native American 0.127 0.000 [0.089,0.165]
Hispanic 0.140 0.000 [0.115,0.165]
Other -0.045 0.134 [-0.103,0.014]
Constant 0.013 0.195 [-0.007,0.033]

Adjusted R-Square 0.430
P-value 0.000
Number of Cases 91391



At 09:31 AM 8/3/2006, Nick Cox wrote:

I can't speak for STATA. In Stata, which is similar in
this respect, I believe the answer is No, it is not
possible to do this without cloning some very low-level stuff
for yourself, and inserting a lot of code to deal with
troublesome cases. It would be a better use of time
to memorise the graphics and Mata manuals.

Otherwise put: I am not clear where in the output you would want
the value labels to be shown, but a problem with value labels
in general is that they can be far too long and also include
characters that are illegal in variable names. So, if you
are expecting -xi- to use value labels not numeric values
in variable names, then this is unrealistic. Thus in your
example the labels are unproblematic such as "group1" but once
you change the label to "group 1" the label could not be used
within a variable name.

Nick
[email protected]

raoul reulen

> If I create an ordinal variable which has several categories (1,2,3,4
> etc) and add value labels to the values. For example, 1=group1,
> 2=group2 etc. , why doesn;t STATA show these value labels when I use
> the variable in a regression model as a dummy/indicator variable?
>
> So for example if I run the model:
>
> xi:reg X1 i.var1
>
> then STATA doesn't use the value labels in the ourput for var1. Is it
> possible to show the value labels of the variable in the output?

*
*   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/

Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel +1 316 263 2125
[email protected]


*
*   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