Announcement

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

  • Likelihood ratio test (LR) for identify the individual firm effect

    Hello,

    I want to test the joint significance of the individual effects in my fixed effect model and for this I run the following command :

    xtreg y x1 x2 x3 x4, fe
    estimates store m1

    xtreg y x1 x2 x3 x4 i*, fe
    estimates store m2

    lrtest m1 m2

    I get the error: df(unrestricted) = df(restricted)

    How shloud I do this. Please help

    Thank you
    Priya

  • #2
    Originally posted by priya sawaliya View Post
    How shloud I do this. Please help
    You'll get better help by following the FAQ.

    .ÿ
    .ÿversionÿ15.1

    .ÿ
    .ÿclearÿ*

    .ÿ
    .ÿquietlyÿsysuseÿauto

    .ÿ
    .ÿquietlyÿxtsetÿrep78

    .ÿ
    .ÿquietlyÿxtregÿgear_ratioÿc.lengthÿi.foreign,ÿfe

    .ÿestimatesÿstoreÿFull

    .ÿ
    .ÿquietlyÿxtregÿgear_ratioÿc.length,ÿfe

    .ÿlrtestÿFull

    Likelihood-ratioÿtestÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(1)ÿÿ=ÿÿÿÿÿ18.59
    (Assumption:ÿ.ÿnestedÿinÿFull)ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.0000

    .ÿ
    .ÿexit

    endÿofÿdo-file


    .


    I'm guessing that some collinear predictors got booted, and the degrees-of-freedom ended up the same, but you're hiding everything, so it's hard to say for sure.

    Another recommendation for Stata 16: get rid of xtset if only to force people to show at least some of what they are doing when they post on Statalist.

    Comment


    • #3
      After reading the title, I'm now guessing that your i* is one or more variables that identify the same entities as whatever it was you used for xtset. So, you could either
      Code:
      xtset firm_id
      xtreg y x1 x2 x3 x4, fe
      and glance down below the regression table to the F statistic shown there.

      Or, if you've got some kind of problem with that, then you could do something like the following (taken after the example above).

      .ÿ
      .ÿversionÿ15.1

      .ÿ
      .ÿclearÿ*

      .ÿ
      .ÿquietlyÿsysuseÿauto

      .ÿ
      .ÿsysuseÿauto
      (1978ÿAutomobileÿData)

      .ÿquietlyÿregressÿgear_ratioÿc.lengthÿi.rep78

      .ÿestimatesÿstoreÿFull

      .ÿ
      .ÿquietlyÿregressÿgear_ratioÿc.lengthÿifÿe(sample)

      .ÿlrtestÿFull

      Likelihood-ratioÿtestÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿLRÿchi2(4)ÿÿ=ÿÿÿÿÿÿ6.24
      (Assumption:ÿ.ÿnestedÿinÿFull)ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿProbÿ>ÿchi2ÿ=ÿÿÿÿ0.1817

      .ÿ
      .ÿexit

      endÿofÿdo-file


      .

      Comment


      • #4
        Thank you Joseph sir for your reply.
        There are 63 companies in my panel data and I have created dummy for each company. So this i* is representing dummy for companies.

        Comment


        • #5
          With
          Code:
          xtset firm_id
          tabulate firm_id, generate(i)
          y x1 x2 x3 x4 i*, fe
          will drop all of your indicator variables and so the degrees of freedom will be the same as without, that is, will have the same degrees of freedom as
          Code:
          xtreg y x1 x2 x3 x4, fe
          That's why you got the error message.

          As I mentioned, the command automatically tests the hypothesis that you wish to, although it is done in the form of an F statistic.

          Comment

          Working...
          X