Announcement

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

  • Overlapping intervals with gaps in rangestat

    Is there any way to specify windows with blackout dates in the rangestat program from SSC? I'd like statistics on an interval from -130 to +130 but excluding the interval -9 to +9. In principle this seems similar to the excludeself option, just with a wider range of days around "self" that should be excluded.

    The help file (in "Controlling the sample") suggests setting observations to missing to achieve this, since an if clause will not work (I need to calculate statistics for dates that should be excluded from the window). However, some of my windows overlap, so I need to ignore a given observation only some of the time, not always, during the rangestat call.
    Last edited by Michael Harris differentiated; 19 Aug 2022, 11:41.

  • #2
    I guess you may need custom code using rangerun (also SSC) rather than rangestat.

    For some problems you might be able to run rangestat twice, once for the inner window and once for the complete window and then combine results.

    Comment


    • #3
      Combining results occurred to me and would be straightforward enough with some statistics like the mean; however, I'm interested in (bivariate) regression parameters, so I was trying to figure out covariance and variance formulas for my desired window given covariance and variance for the complete and inner windows... it seems very messy. I will take a look at rangerun, which may be what I need.

      Comment

      Working...
      X