ztplnmMLE {ztpln} | R Documentation |
MLE for the Zero-truncated Poisson Lognormal mixture distribtuion
Description
ztplnmMLE
fits the Zero-truncated Poisson lognormal mixture distribution
to data and estimates parameters mean mu
, standard deviation sig
and
mixture weight theta
in the lognormal distribution.
Usage
ztplnmMLE(
n,
K = 2,
lower_mu = rep(0, K),
upper_mu = rep(log(max(n)), K),
lower_sig = rep(0.001, K),
upper_sig = rep(10, K),
lower_theta = rep(0.001, K),
upper_theta = rep(0.999, K),
type1 = TRUE,
message = FALSE
)
Arguments
n |
a vector of counts |
K |
number of components |
lower_mu , upper_mu |
numeric values of lower and upper bounds for mean of the variables's natural logarithm. |
lower_sig , upper_sig |
numeric values of lower and upper bounds for standard deviation of the variables's natural logarithm |
lower_theta , upper_theta |
numeric values of lower and upper bounds for mixture weights. |
type1 |
logical; if TRUE, Use type 1 ztpln else use type 2. |
message |
mean of lognormal distribution in sample 3. |
Details
The function searches the maximum likelihood estimators of mean vector mu
,
standard deviation vector sig
and mixture weight vector theta
using the
optimization procedures in nlminb
.
Value
convergence |
An integer code. 0 indicates successful convergence. |
iterations |
Number of iterations performed. |
message |
A character string giving any additional information returned by the optimizer, or NULL. For details, see PORT documentation. |
evaluation |
Number of objective function and gradient function evaluations |
mu |
Maximum likelihood estimates of mu |
sig |
Maximum likelihood estimates of sig |
theta |
Maximum likelihood estimates of theta |
loglik |
loglikelihood |
Examples
y <- rztplnm(100, c(1, 10), c(2, 1), c(0.2, 0.8))
ztplnmMLE(y)