Description Usage Arguments Examples

Simulate from a DP Posterior

1 | ```
dppost_sim(M, F0, sticks, dat, ...)
``` |

`M` |
An integer. The precision parameter in a Dirichlet Process Prior. |

`F0` |
Either a function or a non-empty character string naming the function to be called. |

`sticks` |
An integer. The number of sticks to break when simulating from DP(M, F0) using the stick breaking construction. |

`dat` |
A vector. Observed data. |

`...` |
Named arguments to pass to to the centering function. |

1 2 3 4 | ```
dat <- runif(25, 0, 1)
beta2 <- dppost_sim(dat, M = 4, F0 = "rbeta", sticks = 100, shape1 = 4, shape2 = 1)
dat <- runif(25, .75, 1.25)
norm2 <- dppost_sim(dat, M = 1, F0 = "rnorm", sticks = 100, mean = 1, sd = .01)
``` |

sctyner/dprocsim documentation built on June 30, 2019, 11:51 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.