ztplnMLE {ztpln} | R Documentation |
MLE for the Zero-truncated Poisson Lognormal distribution
Description
ztplnMLE
fits the Zero-truncated Poisson lognormal distribution to data and
estimates parameters mean mu
and standard deviation sig
in the lognormal
distribution
Usage
ztplnMLE(
n,
lower_mu = 0,
upper_mu = log(max(n)),
lower_sig = 0.001,
upper_sig = 10,
type1 = TRUE
)
Arguments
n |
a integer vector of counts |
lower_mu , upper_mu |
numeric values of lower and upper bounds for mean of the variables's natrual logarithm. |
lower_sig , upper_sig |
numeric values of lower and upper bounds for standard deviatoin of the variables's natrual logarithm |
type1 |
logical; if TRUE, Use type 1 ztpln else use type 2. |
Details
The function searches the maximum likelihood estimates of mean mu
and
standard deviation sig
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 |
loglik |
loglikelihood |
Examples
y <- rztpln(100, 3, 2)
ztplnMLE(y)