The bottom of page 117 and top of page 118 illustrates how you can get standard errors for

aandband form confidence intervals foraandb.

First, we use the

davisfile and keep just the women.

use https://stats.idre.ucla.edu/stat/stata/examples/ara/davis if female == 0, clear(From Fox, Applied Regression Analysis. Use 'notes' command for source of data )

We fix the error in subject 12 (see chapter 5 for more about this error).

generate t = measwt if subject==12 replace measwt = measht if subject==12 replace measht = t if subject==12 drop t

Now we run the regression predicting

measwtfromreptwt. The regression table below shows theSe(A)is1.744, and theSe(B)is.0305, as shown at the bottom of page 117. The regression table also gives us the confidence interval for A (-1.68378 to 5.238787) and the Confidence interval for B (.9166458 to 1.037803) as shown at the bottom of page 118.

regress measwt reptwtSource | SS df MS Number of obs = 101 ---------+------------------------------ F( 1, 99) = 1024.54 Model | 4334.88935 1 4334.88935 Prob > F = 0.0000 Residual | 418.873025 99 4.23104066 R-squared = 0.9119 ---------+------------------------------ Adj R-squared = 0.9110 Total | 4753.76238 100 47.5376238 Root MSE = 2.0569 ------------------------------------------------------------------------------ measwt | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- reptwt | .9772242 .0305301 32.009 0.000 .9166458 1.037803 _cons | 1.777503 1.744408 1.019 0.311 -1.68378 5.238787 ------------------------------------------------------------------------------

Page 122 shows how to get confidence intervals in a multiple regression, analyzing the

duncanprestige data file. We first use the data file.

use https://stats.idre.ucla.edu/stat/stata/examples/ara/duncan, clear(From Fox, Applied Regression Analysis. Use 'notes' command for source of data)

If we run the regression predicting

prestigefromeducandincome, we see that Stata gives us the estimate for the coefficients foreducandincome, as well as confidence intervals that correspond to the values shown on page 122.

regress prestige educ incomeSource | SS df MS Number of obs = 45 ---------+------------------------------ F( 2, 42) = 101.22 Model | 36180.9458 2 18090.4729 Prob > F = 0.0000 Residual | 7506.69865 42 178.73092 R-squared = 0.8282 ---------+------------------------------ Adj R-squared = 0.8200 Total | 43687.6444 44 992.90101 Root MSE = 13.369 ------------------------------------------------------------------------------ prestige | Coef. Std. Err. t P>|t| [95% Conf. Interval] ---------+-------------------------------------------------------------------- educ | .5458339 .0982526 5.555 0.000 .3475521 .7441158 income | .5987328 .1196673 5.003 0.000 .3572343 .8402313 _cons | -6.064663 4.271941 -1.420 0.163 -14.68579 2.556463 ------------------------------------------------------------------------------

Page 123, shows a

Test of All Slopesthat tests the hypothesis that all of the slopes (coefficients) are 0. Stata provides this test in the top right portion of the regression table above. In fact, you can see that the Analysis of Variance table from the bottom of page 123 corresponds to the top left and top right portion of the Stata output above.

Page 125 shows how you can test whether a subset of the slopes are equal to 0. Fox shows how to test whether the coefficient for

educis significantly different from 0. You can inspect the regression table above and look at thetvalue andP>|t|value from the table to see that the t value is 5.556 and the p value is 0.000 indicating that the coefficient foreducis significantly different from 0. Had you wanted to test 2 or more coefficients, then you could use thetestcommand as illustrated below. As you see, thetestcommand gives an F test that corresponds to the value shown on page 125.

test educ( 1) educ = 0.0 F( 1, 42) = 30.86 Prob > F = 0.0000