Announcement

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

  • constrained interpolation

    Hello everyone,

    I am trying to interpolate education enrollment variable in panel data using the following code:

    ipolate edu time, gen (edul ) epolate by(country)

    However, I got negative values, while this variable can not take negative values economically. So, how can I add constrain to the range of the interpolated values.


    thanks in advance !

  • #2
    From the help file:

    epolate specifies that values be both interpolated and extrapolated. Interpolation only is the default.

    So, maybe
    Code:
    ipolate edu time, generate(edul) /* epolate */ by(country)

    Comment


    • #3
      Extending Joseph Coveney's suggestions, choices include

      1. Don't do that, then.

      2. Replace negative values with zeros.

      3. Extrapolate on a scale that reflects growth patterns: interpolate on logarithms or logits, invert the transformation.

      Comment


      • #4
        Many thanks Mr. Coveney and Mr. Cox !!

        Comment

        Working...
        X