Announcement

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

  • predict value for f(x)

    Hello, I have a non linear function, f(x), that I estimated with plreg. I'd like to know the value of the function for an especific value not included in the sample, x=5. I tried with mipolate, but still don't know how to estimate the value. Any suggestions?
    Thank you

  • #2
    You'll get a more helpful answer if you follow the FAQ on asking questions - provide Stata code in code delimiters, Stata output, and sample data using dataex.

    plreg is user written and not often discussed on this list serve.

    Il plreg works with margins, then that is the easiest approach. If plreg works with predict but not margins, you may be able to trick it. Run plreg, then change the values of an observation (replace x=3 in 1/1 would replace the value of x in observation 1). and then do the prediction.

    If all else fails, you probably can access the values of the parameters and do the calculation using macros. Normally, running plreg,coefl after running plreg will tell you how to access the parameters. Alternatively, try the different returns - ereturn list, return list, sreturn list.

    Comment

    Working...
    X