Announcement

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

  • Asdoc reporting R2_a with XTREGAR

    Hi all,

    For my thesis I have to report the R2_a with every regression. As I noticed autocorrelation in my panel data set I want to use xtreg with AR(1) model, so I assume that I have to use 'xtregar'.

    However I normally use:

    asdoc xtreg y y(t-1) x1 x2, fe nest cnames(1) replace label stats(r2_a F)

    But:

    asdoc xtregar y y(t-1) x1 x2, fe nest cnames(1) replace label stats(r2_a F)

    Does not give me the r2_a or F in the output table that I want to use in my word document. I can manually add the R2_a or any other post-estimation, but as I have a lot of regressions this will take too much time.

    Is there a way how I can automatically report the R2_a with asdoc and using 'xtregar'?

  • #2
    Jaap:
    -xtregar- gives back -chi2- statistic.
    In addition, -xtregar- is he way to go when you have a T>N panel dataset. Is that your case?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Thanks for you reply Carlo.

      I had 18.071 observations from 19 countries and time period 1982-2021. However after collapsing and trimming the dataset, so that I get the sum per country per year of the variables I wanted, I ended up with 424 observations, from 19 countries and time period from 1995 till 2021.

      Another question though: Using lagged dependent variables is different than using AR(1) model (xtregar) right?

      Comment


      • #4
        Jaap:
        1) assuming that collapsing and triming is the way to go, with N=19 and T=16, you're probably approaching the limit of -xtreg- and -xtregar- may be an option;
        2) if you mean lagging your y and then plug it in the right-hand side of yuour regression equation, you're switching form static (-xtreg-, -xtregar-) to dynamic (-xtabond-) panel data regression eatimators.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Thanks for your enlightenment Carlo.

          To give you some more context about what I want to examine:

          For an assignment, I have to show if there is some significant causal relationship between the interest rate and Private Equity investments or exits.

          So my dependent variable on the left-hand side of the equation is the aggregate Private Equity investments from all investments done by the selected countries of that respective year, on the right-hand side I want to have the lagged dependent variable (if there was a lot of PE investments last year, it probably have an effect on investments this year <-- this is backed by literature), the lagged/or current interest rate, and then all the control variables which are country specific such as GDP, GDP growth, R&D expenditure (% by GDP), Tax expenditure (% by GDP), etc.

          I tried some of the models to show the effects of the interest rate by adding more variables, but also the fixed effects, however, I am still not sure which is the best one to use, currently, I am doing this:
          (1) for only time-fixed effects (same goes for country fixed-effects, by just replacing 'xtset year' by 'xtset country'
          xtset, clear
          xtset year
          xtreg investment investment(t-1) interest rate, fe vce(cluster year)

          (2) for country-fixed and time-fixed effects
          xtset, clear
          xtset country year
          reghdfe investment investment(t-1) interest rate, absorb(country year) vce(cluster country year)

          Comment


          • #6
            Jaap:
            1) as far as assignment-related questions are concerned, please see https://www.statalist.org/forums/help#adviceextras #4;
            2) the way you -xtset- your dataset in (1) is clearly wrong: you cannot get away with mentioning the -panelvar- when -xset-ting;
            2) as per your description, I 'd take a look at -help xtabond-.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X