I am struggling to get stars to show up when reporting the results of a ttest and hope someone can help/explain.
Consider the following, which is based on the examples of the TABLES manual.
Given that the difference is definitely significant, I'd expect to see stars in the table. Yet, I don't.
Many thanks for any help.
Glenn
Consider the following, which is based on the examples of the TABLES manual.
Code:
sysuse auto, clear
(1978 automobile data)
. collect: ttest mpg, by(foreign )
Two-sample t test with equal variances
------------------------------------------------------------------------------
Group | Obs Mean Std. err. Std. dev. [95% conf. interval]
---------+--------------------------------------------------------------------
Domestic | 52 19.82692 .657777 4.743297 18.50638 21.14747
Foreign | 22 24.77273 1.40951 6.611187 21.84149 27.70396
---------+--------------------------------------------------------------------
Combined | 74 21.2973 .6725511 5.785503 19.9569 22.63769
---------+--------------------------------------------------------------------
diff | -4.945804 1.362162 -7.661225 -2.230384
------------------------------------------------------------------------------
diff = mean(Domestic) - mean(Foreign) t = -3.6308
H0: diff = 0 Degrees of freedom = 72
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(T < t) = 0.0003 Pr(|T| > |t|) = 0.0005 Pr(T > t) = 0.9997
. collect stars _r_p 0.01 "***" 0.05 "** " 0.1 "* " 1 " ", attach(_r_mu_diff)
. collect layout (cmdset) (result[mu_diff stars])
Collection: default
Rows: cmdset
Columns: result[mu_diff stars]
Table 1: 1 x 1
-----------------------
| Difference of means
--+--------------------
1 | -4.945804
-----------------------
Many thanks for any help.
Glenn

Comment