Announcement

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

  • Cubic spline interpolation (csipolate) with side condition

    Hi,

    I was wondering if there is an option in the csipolate command or any other command which allows to perform cubic spline interpolations with a monotonic side condition. I am using cubic interpolations to fill in missing values for average tax rates, of which I only have known values for incomes of (in thousand): 4,6,8,10,12, 15, 20, 30, 40, 50, 60, 80, 100, 200.
    As the average tax rates of 100 and 200 are very close (20.47 and 20.51), Stata generates values between 100 and 200 that are bigger than 20.51 (inverted u-shape), which of course makes sense for a cubic interpolation but is not possible in the real world, as the tax function should increase monotonically.

    Many thanks,
    Linus

  • #2
    No such option in csipolate from SSC.

    Comment


    • #3
      Thank your for your response. I finally found a cubic interpolation command that respects monotonicity with pchipolate

      Comment


      • #4
        pchipolate is mine too (from SSC). If it produces a monotonic result, that is down to the data supporting such a result, and not inherent in, let alone ensured by, the algorithm.

        Comment


        • #5
          Duplicate post. Two Stata users walk into a bar and ...
          Last edited by Nick Cox; 24 Sep 2025, 03:31.

          Comment

          Working...
          X