Announcement

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

  • regarding command asreg for rolling regressions

    I am working on quarterly panel data with N=51 and T=40. I am interested in running rolling regression with window of 15 quarters, so that the first regression is calculated for first 15 quarters, second from 16 to 31 and so on for each country . I am running the following code:
    bys i : asreg interestrate gfc cpiinflation ex_ln outputgap, wind(time 15)
    where i refers to countryid and time represents quarter.
    However, after running the code, I get the following output:

    _Nobs
    .
    .
    .
    .
    .
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    15
    where 15 keeps on repeating and first 5 values are not being estimated. Can anyone help please?

  • #2
    You can't estimate 5 parameters (usefully) with 5 or fewer data points. Observations 6 through 14 supply at most that many data points. Otherwise you seem to have got what you asked for, rolling regressions for 15 data points.

    There is no obvious problem here beyond your being puzzled by the output. Just ignore results for incomplete windows.

    That said, a regression with 4 predictors and only 15 data points seems a real stretch to me.

    Comment


    • #3
      Thanks! What if I run a simple panel regression with T= 40 and N= 51 using only control variables, then collect residuals. In the second step, I regress my main independent variable on dependent variable using rolling regression with window say 20 quarters? That ways I am estimating only a single parameter using 20 observations?

      Comment

      Working...
      X