. by foreign: reg mpg weight
--------------------------------------------------------------------------------
-> foreign = Domestic
Source | SS df MS Number of obs = 52
-------------+------------------------------ F( 1, 50) = 164.85
Model | 880.404425 1 880.404425 Prob > F = 0.0000
Residual | 267.037883 50 5.34075765 R-squared = 0.7673
-------------+------------------------------ Adj R-squared = 0.7626
Total | 1147.44231 51 22.4988688 Root MSE = 2.311
------------------------------------------------------------------------------
mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight | -.0059751 .0004654 -12.84 0.000 -.0069098 -.0050403
_cons | 39.64696 1.576622 25.15 0.000 36.48023 42.8137
------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-> foreign = Foreign
Source | SS df MS Number of obs = 22
-------------+------------------------------ F( 1, 20) = 17.47
Model | 427.990298 1 427.990298 Prob > F = 0.0005
Residual | 489.873338 20 24.4936669 R-squared = 0.4663
-------------+------------------------------ Adj R-squared = 0.4396
Total | 917.863636 21 43.7077922 Root MSE = 4.9491
------------------------------------------------------------------------------
mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight | -.010426 .0024942 -4.18 0.000 -.0156287 -.0052232
_cons | 48.9183 5.871851 8.33 0.000 36.66983 61.16676
------------------------------------------------------------------------------