|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: value labels in output regression model
From
Roger Harbord <[email protected]>
To
[email protected]
Subject
Re: st: value labels in output regression model
Date
Thu, 03 Aug 2006 17:20:37 +0100
You may like to take a look at Tony Brady's -reformat- package. Type -ssc
describe reformat- for more info.
A simple example :
. sysuse nlsw88
(NLSW, 1988 extract)
. xi: regress wage i.race i.collgrad
i.race _Irace_1-3 (naturally coded; _Irace_1 omitted)
i.collgrad _Icollgrad_0-1 (naturally coded; _Icollgrad_0 omitted)
Source | SS df MS Number of obs = 2246
-------------+------------------------------ F( 3, 2242) = 62.05
Model | 5701.44986 3 1900.48329 Prob > F = 0.0000
Residual | 68666.5175 2242 30.6273495 R-squared = 0.0767
-------------+------------------------------ Adj R-squared = 0.0754
Total | 74367.9674 2245 33.1260434 Root MSE = 5.5342
------------------------------------------------------------------------------
wage | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_Irace_2 | -.9562714 .2678221 -3.57 0.000 -1.481477 -.4310662
_Irace_3 | .15138 1.09421 0.14 0.890 -1.99439 2.29715
_Icollgrad_1 | 3.531785 .2757022 12.81 0.000 2.991126 4.072443
_cons | 7.17686 .1539904 46.61 0.000 6.874882 7.478839
------------------------------------------------------------------------------
. reformat
REGRESS formatted output
Outcome variable: wage (hourly wage), n=2246
-----------------------------------------------------------------------------
Covariate Coef. Std. Err. P>|t| 95% Conf. Interval
-----------------------------------------------------------------------------
Race
white* 0
black -0.956 0.268 <0.001 (-1.481 to -0.431)
other 0.151 1.094 0.890 (-1.994 to 2.297)
College graduate
not college grad* 0
college grad 3.532 0.276 <0.001 (2.991 to 4.072)
Constant 7.177 0.154 <0.001 (6.875 to 7.479)
-----------------------------------------------------------------------------
* Baseline category
There are options to vary what is displayed and how it's formatted. I think
it's a very useful and well-designed package. Those who like to use asterisks
to indicate significance levels may prefer something else.
Roger.
--On 03 August 2006 15:18 +0100 raoul reulen <[email protected]> wrote:
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?
Thanks
Raoul
*
* 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 |