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:
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:
- I can't use the "Accept-Reject" algorithm, as I have no knowledge of another distribution that bounds f(x) everywhere.
- I think I can use the "Inverse Transform Sampling" (see Wikipedia page https://en.wikipedia.org/wiki/Invers...sform_sampling), and have some questions:
- Can I do this with the kernel density estimate or should I use the histogram?
- Is this feasible?
- Can someone suggest steps/code?
- Is there another way?