14
Stata Technical Bulletin
STB-33
commands (e.g., logistic, fit, glm) make this sample information available. Thus, if you use the mean option of diest
after sample selection, you should restate the if and/or in clauses and the weighting information. The two other display modes,
sezp and ci, ignore this information.
Examples
We illustrate the command diest via some output from a regression analysis of the repair record of cars using Stata’s
standard dataset auto.dta. First, we consider the regular Stata output.
. regress rep78 price length mpg foreign
Source I |
SS |
df |
MS |
Number of obs F( 4, 64) |
= 69 = 10.92 | |
_________-|-_ |
— | |||||
Model I |
27.0380695 |
4 6.75951737 |
Prob > F |
= 0.0000 | ||
Residual ∣ |
39.5996117 |
64 .618743933 |
R-Squared |
= 0.4057 | ||
Adj R-Squared |
= 0.3686 | |||||
_________-|-_ |
— | |||||
Total I |
66.6376812 |
68 .979965899 |
Root MSE |
= .7866 | ||
— rep78 I |
Coef. |
Std. Err. |
t |
p>∣t∣ |
[957. Conf. |
— Interval] |
---------+_ |
.0000242 |
.0000397 |
0.611 |
0.544 |
-.000055 |
.0001035 |
length I |
.0125744 |
.008331 |
1.509 |
0.136 |
-.0040687 |
.0292174 |
≡pg I |
.0674953 |
.027824 |
2.426 |
0.018 |
.0119106 |
.1230801 |
foreign I |
1.25691 |
.2782758 |
4.517 |
0.000 |
.7009899 |
1.81283 |
_cons I |
-.9302744 |
2.011363 |
-0.463 |
0.645 |
-4.948433 |
3.087884 |
The default output of diest replaces variable labels for the confidence intervals.
. diest
rep78 Repair Record 1978 |
I |
Coef. |
Std. Err. |
t |
p>∣t∣ |
— price Price |
I |
.0000242 |
.0000397 |
0.611 |
— 0.544 |
length Length (in.) |
I |
.0125744 |
.008331 |
1.509 |
0.136 |
mpg Mileage (mpg) |
I |
.0674953 |
.027824 |
2.426 |
0.018 |
foreign Car type |
I |
1.25691 |
.2782758 |
4.517 |
0.000 |
_cons |
I |
-.9302744 |
2.011363 |
-0.463 |
0.645 |
On a color monitor, the numbers are in yellow, variable labels are in white, and the rest is in green. Some formatting produces
more readable output. Note that diest can be called after an estimation command as often as desired. It is also still possible
to recall the regress output by issuing the regress command without arguments.
. diest, fb(%9.3f) fse(%9.3f)
rep78 Repair Record 1978 |
I |
Coef. |
Std. Err. |
t |
p>∣t∣ |
— price Price |
I |
0.000 |
0.000 |
0.611 |
— 0.544 |
length Length (in.) |
I |
0.013 |
0.008 |
1.509 |
0.136 |
mpg Mileage (mpg) |
I |
0.067 |
0.028 |
2.426 |
0.018 |
foreign Car type |
I |
1.257 |
0.278 |
4.517 |
0.000 |
_cons |
I |
-0.930 |
2.011 |
-0.463 |
0.645 |
Confidence intervals can be obtained via the ci display mode.
. diest, ci fb(%9.3f) fci(%9.3f)
rep78 Repair Record 1978 |
I |
Coef. |
[t 957. Conf. |
Interval] |
— price Price |
I |
0.000 |
-0.000 |
0.000 |
length Length (in.) |
I |
0.013 |
-0.004 |
0.029 |
mpg Mileage (mpg) |
I |
0.067 |
0.012 |
0.123 |
foreign Car type |
I |
1.257 |
0.701 |
1.813 |
_cons |
I |
-0.930 |
-4.948 |
3.088 |
Note in this example how misleading fixed format output may be. Due to limited precision, it can become impossible to say
something about the effect of the price of a car on its repair record. Thus, display formating should only be used after inspection
of results.
More intriguing information
1. The value-added of primary schools: what is it really measuring?2. Reconsidering the value of pupil attitudes to studying post-16: a caution for Paul Croll
3. Gianluigi Zenti, President, Academia Barilla SpA - The Changing Consumer: Demanding but Predictable
4. Asymmetric transfer of the dynamic motion aftereffect between first- and second-order cues and among different second-order cues
5. A Location Game On Disjoint Circles
6. The demand for urban transport: An application of discrete choice model for Cadiz
7. Quality practices, priorities and performance: an international study
8. LOCAL CONTROL AND IMPROVEMENT OF COMMUNITY SERVICE
9. The name is absent
10. THE CHANGING RELATIONSHIP BETWEEN FEDERAL, STATE AND LOCAL GOVERNMENTS