Description Usage Arguments Value
Do plain monte carlo with target density
1 | do.plain.mc(plainmc.N, mixture.param, fname = "f", rpname = "rp")
|
plainmc.N |
number of samples |
mixture.param |
mixture.param = list(p, J, ...), where p is the dimension of the sample, and J is the number of mixture components, including the defensive one. mixture.param should be compatible with user defined functions f(n, j, mixture.param), rp(n, mixture.param), rq(n, j, mixture.param), dp(xmat, mixture.param), dq(xmat, j, mixture.param) |
fname |
name of user defined function fname(xmat, j, mixture.param). xmat is an n \times p matrix of n samples with p dimensions. fname returns a vector of function values for each row in xmat. fname is defined for j = 1, \cdots, J. j = 1, \cdots, J - 1 corresponds to different proposal mixture components, and j = J corresponds to the defensive mixture component. |
rpname |
name of user definded function rpname(n, mixture.param). It generates n random samples from target distribution pname. Parameters can be specified in mixture.param. rpname returns an n \times p matrix. |
a list of
number of samples for the plain monte carlo
estimated E_p f from plain monte carlos samples
estimated sd for mu.hat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.