Announcement

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

  • Generate Random Variable for Unknown Distribution

    Dear StatList Readers,

    I'm trying to generate random variables from an unknown distribution, call it f(x) (such distribution comes from the errors from a panel AR model). I've thought of the following:
    1. I can't use the "Accept-Reject" algorithm, as I have no knowledge of another distribution that bounds f(x) everywhere.
    2. I think I can use the "Inverse Transform Sampling" (see Wikipedia page https://en.wikipedia.org/wiki/Invers...sform_sampling), and have some questions:
      1. Can I do this with the kernel density estimate or should I use the histogram?
      2. Is this feasible?
      3. Can someone suggest steps/code?
    3. Is there another way?
    Thank you

Working...
X