Announcement

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

  • fixing problem with FE regression using panel data for sub groups

    Hi,

    I am trying to do a FE regression using panel data.

    When I used this at the national level data with all states (with two different groups of states), everything went well as below

    xtreg did popl_ gdp_ hexp_ vaccine_ inf_ edu_ i.year, fe vce (robust)

    Fixed-effects (within) regression Number of obs = 171
    Group variable: stateid Number of groups = 19

    R-squared: Obs per group:
    Within = 0.4510 min = 9
    Between = 0.2972 avg = 9.0
    Overall = 0.2466 max = 9

    F(14,18) = 57.40
    corr(u_i, Xb) = -0.8675 Prob > F = 0.0000

    But when I tried to do this separately for the subgroups, (I used the same command with two different data sets- each one with the data for only one of the groups):
    xtreg did popl_ gdp_ hexp_ vaccine_ inf_ edu_ i.year, fe vce (robust)

    I get this value : Prob > F= .

    output given below

    xtreg did popl_ gdp_ hexp_ vaccine_ inf_ edu_ i.year, fe vce (robust)

    Fixed-effects (within) regression Number of obs = 72
    Group variable: stateid Number of groups = 8

    R-squared: Obs per group:
    Within = 0.5548 min = 9
    Between = 0.2442 avg = 9.0
    Overall = 0.1278 max = 9

    F(7,7) = .
    corr(u_i, Xb) = -0.8825 Prob > F = .


    Can someone guide me on this?

  • #2
    Muhammad:
    welcome to this forum.
    See -help j_robustsingular-.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thanks, Carlo! thank you so much for the support. I see that the command works if I avoid the option `robust'.

      I also ran bootstrap, reps(100) seed(1):xtreg did popl_ gdp_ hexp_ vaccine_ inf_ edu_ i.year, fe vce (robust) which gives F statistics. But I am not sure how to determine the optimal number of replications and seed size. (Sorry, I am too new to this). (When I tried 1000 reps, I get the similar values as 100)

      Comment


      • #4
        Muhammed:
        first, you can leave out the F_statistic form your regression with no worries at all.
        The issue is that with 8 panels only, the clustered-robust standard errors doe snot outperfom its default counterpart (or, worse, may be misleading).
        I'm not clear with waht you want to do via -bootstrap- there.
        If (my gues-work) you want to run the regerssion with -bootstrap- standard errors, 200 replications do the trick (see https://www.routledge.com/An-Introdu...9780412042317: page 47).
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Carlo,
          Thanks again, this is very helpful. I will leave out the F statistics.
          Regards, Shaffi

          Comment

          Working...
          X