Announcement

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

  • Test the joint significance of the aggregate time effects

    Hi,
    In my wage equation I included aggregate time effects in order to control for factors that are constant for individuals but change over time. Now, I would like to test the joint significance of the aggregate time effects but I don't know how to do this in panel data. Could someone help me? Many thanks

  • #2
    You don't provide us with much information about your data or your model so it's hard to give a specific answer.

    Assuming you have used some kind of standard Stata regression model that leaves results in e(), the -test- command will give you a Wald test of the joint effects. Just specify whatever variables you used to specify aggregate time effects as the -coeflist- of the -test- command. See -help test- if you are not familiar with it. If the number of such variables is large enough that it is burdensome to enumerate them all and they lend themselves to a short listing with wildcards, then you can use -testparm- instead, which will do what -test- does but takes a -varlist- for its arguments.

    If your regression model is one that is estimated by maximum likelihood, you could also get a likelihood ratio test. You would first run the model including all the aggregate time effects and store those estimates. Then you would re-run the model excluding them, and restricting to e(sample). Then you could use the -lrtest- command. See help for -estimates store- and -lrtest-.

    Comment


    • #3
      Hello
      I have a similar doubt. The dataset I am using is the Baltagi and Khanti-Akon (1990) and the regression has the following shape:

      logwageit = β1femi+β2blki+β3edi+β4 exp+β5 exp2 +β6occit+β7indit+β8southit+
      +β9smsait + β10d77t + . . . + β15d82t + ci + uit (1)
      i = 1, ...,N; t = 1, ..., T

      So,I wish to test my aggregate time effects variables (dummy variables) for joint significance.

      I have done two different commands and they gave me the same results:

      One was:

      test tdum2 tdum3 tdum4 tdum5 tdum6 tdum7

      the other was:

      testparm tdum*

      Although they have given me the same results, I am not sure if they are both OK to use.

      What do you think ?

      Thanks,
      BR

      Comment


      • #4
        test and testparm are totally equivalent.
        https://www.kripfganz.de/stata/

        Comment


        • #5
          They gave you the same results because they are, in effect, the same command. -testparm- is a "wrapper" for test: it just decodes the wildcards in the variable list into the corresponding coefficient names and passes them on to -test-, which does the real work. It is a Wald test. Basically it's like a multi-dimensional z-statistic. The numerator is a quadratic function of the coefficients involved, and the denominator is calculated from the estimated covariance matrix in e(V). In many situations it gives very similar results to likelihood ratio tests and score tests, and, in particular, if you have a large sample you might take comfort in knowing that the three kinds of tests are asymptotically equivalent.

          Likelihood ratio tests are better in certain respects: they are invariant under common transformations, they do not rely on the approximation of the true covariance matrix by the estimated covariance matrix, and they have an exact chi square distribution (the Wald statistic has an approximate chi square distribution.) Wald tests are quicker to calculate (perhaps not such an important difference nowadays) and have the advantage of being intuitively similar to the univariate t- and z-tests for a single variable.

          You can play with these in the auto data set to get a feel for how they compare:

          Code:
          clear*
          sysuse auto
          regress price mpg i.rep78
          estimates store full_model
          // WALD TEST OF REPAIR CATEGORIES
          testparm i(2/5).rep78
          
          // LR TEST OF REPAIR CATEGORIES
          regress price mpg if e(sample)
          lrtest . full_model

          Comment

          Working...
          X