Announcement

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

  • xttest0 (Breusch and Pagan Lagrangian multiplier test for random effects)

    Im using panel data to analyse Growth rates in Health expenditures for some OECD countries.

    I want to decide on whether to use a pooled regression model, a random effect model or a fixed effect model.

    I want to start with comparing pooled OLS with random effect model.

    To do this I want to do a Breusch and Pagan LM test for random effects.

    This is what I type in Stata and what I get:

    xtset land year
    panel variable: land (unbalanced)
    time variable: year, 1970 to 2015
    delta: 1 unit



    xtreg d.lnhcen d.lngdpn d.lngdpn_1 d.lngdpn_2 d.lngdpn_3 d.lno80, re


    estimates store random_effects



    . xttest0

    Breusch and Pagan Lagrangian multiplier test for random effects

    D.lnhcen[land,t] = Xb + u[land] + e[land,t]

    Estimated results:
    | Var sd = sqrt(Var)
    ---------+-----------------------------
    not sorted
    r(5)




    So what does it mean that its not sortet? and how can I test whether to use pooled OLS or random effect?


  • #2
    Bernt:
    try:
    Code:
    xtreg d.lnhcen d.lngdpn d.lngdpn_1 d.lngdpn_2 d.lngdpn_3 d.lno80, re
    xttest0
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      I still get the same error:


      . xtreg d.lnhcen d.lngdpn d.lngdpn_1 d.lngdpn_2 d.lngdpn_3 d.lno80, re

      Random-effects GLS regression Number of obs = 1,177
      Group variable: land Number of groups = 35

      R-sq: Obs per group:
      within = 0.6910 min = 15
      between = 0.9517 avg = 33.6
      overall = 0.7438 max = 45

      Wald chi2(5) = 3382.40
      corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

      ------------------------------------------------------------------------------
      D.lnhcen | Coef. Std. Err. z P>|z| [95% Conf. Interval]
      -------------+----------------------------------------------------------------
      lngdpn |
      D1. | .9389723 .0164489 57.08 0.000 .9067331 .9712115
      |
      lngdpn_1 |
      D1. | -.0056805 .0035395 -1.60 0.109 -.0126178 .0012568
      |
      lngdpn_2 |
      D1. | -.0002499 .0034807 -0.07 0.943 -.007072 .0065722
      |
      lngdpn_3 |
      D1. | .0052037 .0033888 1.54 0.125 -.0014382 .0118455
      |
      lno80 |
      D1. | .1231973 .0574011 2.15 0.032 .0106933 .2357014
      |
      _cons | .0163569 .0025639 6.38 0.000 .0113317 .0213822
      -------------+----------------------------------------------------------------
      sigma_u | .0014243
      sigma_e | .05933403
      rho | .0005759 (fraction of variance due to u_i)
      ------------------------------------------------------------------------------

      .
      . xttest0

      Breusch and Pagan Lagrangian multiplier test for random effects

      D.lnhcen[land,t] = Xb + u[land] + e[land,t]

      Estimated results:
      | Var sd = sqrt(Var)
      ---------+-----------------------------
      not sorted
      r(5);


      Comment


      • #4
        Bernt:
        is your copy of Stata updated?
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          It Works when its not on the form d.x.

          So I guess I must generate new variables; dlnhcen= d.lnhcen

          Comment


          • #6
            Bernt:
            why differencing yourself when you decided to go -xtreg, re-?
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment


            • #7
              You mean I could just put xtreg D(lnhcen lngdpn.....), re?

              Only reason is that I just found out about this other way.

              Comment


              • #8
                Bernt:
                no, I meant why using -D.- instead of:
                Code:
                xtreg lnhcen lngdpn lngdpn_1 lngdpn_2 lngdpn_3 lno80, re
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment


                • #9
                  Because I want to look at the growth rates.

                  Also because hcen (Health care expenditure) and gdpn (gdp per capita) are not stationary. (or it is very debated). But they are stationary when I look at first difference.

                  Comment


                  • #10
                    Bernt:
                    thanks a lot for your clarifications (your research subject is far from my knowledge. However, it's always interesting to know what people do in other research fields).
                    Kind regards,
                    Carlo
                    (Stata 19.0)

                    Comment

                    Working...
                    X