dpprior_sim: Simulate from a DP Prior

Description Usage Arguments Examples

Description

Simulate from a DP Prior

Usage

1
dpprior_sim(M, F0, sticks, ...)

Arguments

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.

...

Named arguments to pass to to the centering function.

Examples

1
2
beta1 <- dpprior_sim(M = 4, F0 = "rbeta", sticks = 100, shape1 = 4, shape2 = 1)
norm1 <- dpprior_sim(M = 1, F0 = rnorm, sticks = 50, mean = 1, sd = .01)

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