hcnm | R Documentation |
Function hcnm
can be used to compute the MLE
of a finite discrete mixing distribution, given the component
density values of each observation. It implements the
hierarchical CNM algorithm of Wang and Taylor (2013).
hcnm(
D,
p0 = NULL,
w = 1,
maxit = 1000,
tol = 1e-06,
blockpar = NULL,
recurs.maxit = 2,
compact = TRUE,
depth = 1,
verbose = 0
)
D |
A numeric matrix, each row of which stores the component density values of an observation. |
p0 |
Initial mixture component proportions. |
w |
Duplicity of each row in matrix |
maxit |
Maximum number of iterations. |
tol |
A tolerance value to terminate the
algorithm. Specifically, the algorithm is terminated, if the
increase of the log-likelihood value after an iteration is less
than |
blockpar |
Block partitioning parameter. If > 1, the number
of blocks is roughly |
recurs.maxit |
Maximum number of iterations in recursions. |
compact |
Whether iteratively select and use a compact subset (which guarantees convergence), or not (if already done so before calling the function). |
depth |
Depth of recursion/hierarchy. |
verbose |
Verbosity level for printing intermediate results. |
p |
Computed probability vector. |
convergence |
convergence code. |
ll |
log-likelihood value at convergence |
maxgrad |
Maximum gradient value. |
numiter |
number of iterations required by the algorithm |
Yong Wang <yongwang@auckland.ac.nz>
Wang, Y. (2007). On fast computation of the non-parametric maximum likelihood estimate of a mixing distribution. Journal of the Royal Statistical Society, Ser. B, 69, 185-198.
Wang, Y. and Taylor, S. M. (2013). Efficient computation of nonparametric survival functions via a hierarchical mixture formulation. Statistics and Computing, 23, 713-725.
cnm
, nppois
, disc
.
x = rnppois(1000, disc(0:50)) # Poisson mixture
D = outer(x$v, 0:1000/10, dpois)
(r = hcnm(D, w=x$w))
disc(0:1000/10, r$p, collapse=TRUE)
cnm(x, init=list(mix=disc(0:1000/10)), model="p")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.