Announcement

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

  • local interpolation

    Dear Statalisters
    I was wondering if anyone has written or knows of a function that obtains the best interpolation based on two series where we know that one is a smooth transformation of the other.
    Say, for example, that y=F(X), we do not know F, but we know its an strictly increasing and Smooth function so that every value of X is paired with a unique value of Y.
    What i need know is that given that i have the data for Y and X, i can obtain the "correct" y for any value X of my choice.
    To be more concrete. see the example below
    Code:
    sysuse auto, clear
    gen lnprice=ln(price)
    sum lnprice
    gen Fprice=normal((lnprice-r(mean))/r(sd))
    * now we know that there is a smooth and unknown function F that transforms price into Fprice.
    * Now, how do I obtain the best interpolation of Fprice for, say, price=5000?
    Suggestions are appreciated.
    Thank you

  • #2
    hi Fernando, could mipolate (SSC package) help? I have no deep investigation into this command but in my opinion, given the function form is unknown, if you wanna predict y at a certain x, the best way is to borrow the nearest observations.
    Best Wishes
    2B or not 2B, that's a question!

    Comment


    • #3
      I think that does something else that i also needed. Thank you Liu!

      Comment

      Working...
      X