11.07.2015 Views

[U] User's Guide

[U] User's Guide

[U] User's Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

278 [ U ] 20 Estimation and postestimation commands20.11 Performing hypothesis tests on the coefficients20.11.1 Linear testsAfter estimation, test is used to perform tests of linear hypotheses on the basis of the variance–covariance matrix of the estimators (Wald tests).Example 12(test has many syntaxes and features, so do not use this example as an excuse for not reading[R] test.) Using the automobile data, we perform the following regression:. use http://www.stata-press.com/data/r11/auto, clear(1978 Automobile Data). generate weightsq=weight^2. regress mpg weight weightsq foreignSource SS df MS Number of obs = 74F( 3, 70) = 52.25Model 1689.15372 3 563.05124 Prob > F = 0.0000Residual 754.30574 70 10.7757963 R-squared = 0.6913Adj R-squared = 0.6781Total 2443.45946 73 33.4720474 Root MSE = 3.2827mpg Coef. Std. Err. t P>|t| [95% Conf. Interval]weight -.0165729 .0039692 -4.18 0.000 -.0244892 -.0086567weightsq 1.59e-06 6.25e-07 2.55 0.013 3.45e-07 2.84e-06foreign -2.2035 1.059246 -2.08 0.041 -4.3161 -.0909002_cons 56.53884 6.197383 9.12 0.000 44.17855 68.89913We can use the test command to calculate the joint significance of weight and weightsq:. test weight weightsq( 1) weight = 0( 2) weightsq = 0F( 2, 70) = 60.83Prob > F = 0.0000We are not limited to testing whether the coefficients are zero. We can test whether the coefficienton foreign is −2 by typing. test foreign = -2( 1) foreign = -2F( 1, 70) = 0.04Prob > F = 0.8482We can even test more complicated hypotheses because test can perform basic algebra. Here isan absurd hypothesis:. test 2*(weight+weightsq)=-3*(foreign-(weight-weightsq))( 1) - weight + 5.0 weightsq + 3.0 foreign = 0F( 1, 70) = 4.31Prob > F = 0.0416

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!