1 / 12

Psychology 290 Special Topics Study Course: Advanced Meta-analysis

Psychology 290 Special Topics Study Course: Advanced Meta-analysis. April 2 , 2014. The plan for today. A digression on random number generation. Markov chain methods for sampling from arbitrary distributions. Uniform random numbers.

Télécharger la présentation

Psychology 290 Special Topics Study Course: Advanced Meta-analysis

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Psychology 290Special Topics Study Course: Advanced Meta-analysis April 2, 2014

  2. The plan for today • A digression on random number generation. • Markov chain methods for sampling from arbitrary distributions.

  3. Uniform random numbers • The root of all random number generation is the uniform distribution. • Historically, most uniform RNGs used some variant of the linear congruential algorithm. • Xn+1 = (aXn + c) mod m. • Examples in R.

  4. But we’re interested in non-uniform random numbers • Convert uniforms: • Inverse cdf • Acceptance / rejection • Clever algorithms for specific distributions • Examples in R

  5. Inverse CDF • Generate uniform values • Use the quantile function (i.e., the inverse CDF function) to change uniforms to target.

  6. Clever approaches • Distribution specific. • Examples: • Polar method for normals • Squared normals for chi square

  7. Acceptance / Rejection • You want to generate RVs from f(x). • You can easily generate g(x), for which the maximum value of f(x) / g(x) is not too different from 1. • Algorithm: • Generate g(x) • Accept it if U(0,1) < f(x)/(c g(x))

  8. Problems with acceptance / rejection • Inefficient • Sometimes there isn’t an easy g(x) with reasonable c.

  9. Markov chain methods • Markov chain methods are ways to sample from arbitrary distributions using a random walk approach. • Why is this relevant to Bayesian methods?

  10. The Metropolis-Hastings algorithm • Let h(x) be an unnormalized density • Starting at x, propose a move to y that has conditional probability given x denoted q(x,.) . • Let r(x,y) = h(y)q(y,x)/(h(x)q(x,y)). • Accept the proposed value with probability min(1,r(x,y)) • Illustration in R.

  11. Another example

  12. Next time • Introducing Bayesian methods. • Bayesian analysis

More Related