Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Testing regression coefficient against a hypothesized value

    Dear Statalist community,
    I would like to test whether my regression coefficient is significantly different from the number 2 in order to test one of my hypotheses. Could you tell me what is better here, using the command ttest or test (the latter is rather an F-test, right)?

    I would appreciate any help!

  • #2
    test is the command you want. ttest does not use the regression results to compute its test, it just compares means.
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Thank you very much! Could you also tell me whether this is indeed a t-test then or an F-test just with one linear combination?

      Comment


      • #4
        looking at the results will give you the answer; here is a simple, reproducible example:
        Code:
        . sysuse auto
        (1978 automobile data)
        r; t=0.01 7:23:52
        
        . regress price i.for c.weight##c.weight turn
        
              Source |       SS           df       MS      Number of obs   =        74
        -------------+----------------------------------   F(4, 69)        =     24.94
               Model |   375388473         4  93847118.3   Prob > F        =    0.0000
            Residual |   259676923        69  3763433.66   R-squared       =    0.5911
        -------------+----------------------------------   Adj R-squared   =    0.5674
               Total |   635065396        73  8699525.97   Root MSE        =      1940
        
        ------------------------------------------------------------------------------
               price | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
        -------------+----------------------------------------------------------------
             foreign |
           Domestic  |          0  (base)
            Foreign  |   2731.523    658.636     4.15   0.000      1417.58    4045.466
                     |
              weight |  -3.214261   2.354074    -1.37   0.177    -7.910511    1.481989
                     |
            c.weight#|
            c.weight |   .0012201   .0003714     3.29   0.002     .0004792    .0019609
                     |
                turn |  -265.8238   105.6056    -2.52   0.014    -476.5013   -55.14633
               _cons |   13747.59   4907.183     2.80   0.007     3958.029    23537.15
        ------------------------------------------------------------------------------
        r; t=0.24 7:24:10
        
        . test _b[turn]=-150
        
         ( 1)  turn = -150
        
               F(  1,    69) =    1.20
                    Prob > F =    0.2766
        So, we see it is an F test; however, note that an F-test with 1 df in the numerator is the square of the t-test;

        Comment

        Working...
        X