Announcement

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

  • Log GDP value for panel data

    Dear Stata People,


    I am currently making a Panel data research on growth-volatility relationship (20 years, 103 countries) and I need to use Initial income variable in my Regression ( I search for an random effect).
    I calculate the growth rates of GDP per cap using this command:

    sort id year
    by id: gen lgdp1 = log(rgdpl)

    sort id year
    by id: gen lgdp2= lgdp1[_n-1]

    gen growth = lgdp1 - lgdp2

    I calculate volatility using sdev of the growth

    When I run the regression

    xtreg growth vol lgdpl1, re

    I obtain an Initial income (lgdp1) value of - 0.05 . The problem is normaly in that case I should get a value of -0.005. The rest of my results are normal. Does anyone have a sujections about this result or find a mistake in my way of calculation?

    Best Regards,
    Mira

  • #2
    I'm not sure this is your problem, but lgdp1 worries me. The dv is lgdp1-lgdp2 and then your regressing lgdp1 on it. Not only does lgdp1 appear on both sides of the equation, ldgp2 strongly influences lgdgp1. Seems like you can't really assume that lgdp1 is uncorrelated with the error term.

    This doesn't really solve the problem, but you might look at explaining growth in the next year with your ldgp1 variable.

    Comment


    • #3
      As a suggestion, you can mix sort and by as:

      Code:
      bysort id (year) : gen lgdp1 = log(rgdpl)
      Why is it that you should get that value? Maybe you are defining the variables differently? Since you get the same number but a different order of magnitude, it might be an issue with the units of measurement. perhaps when you calculated real GDP?

      Comment


      • #4
        Here's one thought: are there any gaps in year for any of your id's (or for that matter are there ever multiple observations of year in the same id)? If you do not have data for every year exactly once, when you calculate
        Code:
        sort id year
        by id: gen lgdp2 = lgdp1[_n-1]
        lgdp1[_n-1] might not refer to the previous year's level, but just to the level in the preceding year that happens to be included in the data. If the intervals between successive years are not all the same, then these "growth" rates are being measured over different times. A safer way to do this is:
        Code:
        xtset id year
        gen lgdp2 = L1.lgdp1
        The L1 operator will only calculate a lagged value if the preceding observation really corresponds to one year earlier. And if there are multiple observations for a combination of id and year, -xtset- will complain about that and stop you from going forward.

        Here's another thought: what is the confidence interval around your -0.05 estimate? If that confidence interval includes -0.005, then your results are consistent with the value you expected: they're just not very precise. Getting more precise estimates would require getting more data, better quality (i.e., less noisy) data, a different study design, or some combination of these.

        Comment


        • #5
          Phil Bromiley, in thit kind if regressions these are the variables that are used.

          Alan Brito, I should get these results because in the literature on that topic this is the usual value or around it. I had the same thoughts about the units but every other result is close to the expected value.

          Clyde Schechter, I dont have any missing values for my GDP and there arent multiple observations of year. I executed the command gen lgdp2 = L1.lgdp1 and the new values were identical with the old ones.

          The confidence interval excludes the value of -0.005 but it is close -.0075938 !


          Thank you very much for you sugestions and answers!


          Comment

          Working...
          X