# 2poilogMLE: Maximum Likelihood Estimation for Poisson Lognormal... In poilog: Poisson lognormal and bivariate Poisson lognormal distribution

## Description

poilogMLE fits the Poisson lognormal distribution to data and estimates parameters mean mu and standard deviation sig in the lognormal distribution

## Usage

 1 2 3 poilogMLE(n, startVals = c(mu=1, sig=2), nboot = 0, zTrunc = TRUE, method = "BFGS", control = list(maxit=1000)) 

## Arguments

 n A vector of counts startVals Starting values of parameters, see details nboot Number of parametric bootstraps, defaults to zero zTrunc Zero-truncated distribution, defaults to TRUE method Method to use during optimization, see details control A list of control parameters for the optimization routine, see details

## Details

The function estimates parameters mean mu and standard deviation sig. In cases of incomplete sampling the estimate of mu will be confounded with the sampling intensity (see rpoilog). Assuming sampling intensity ν, the estimates of the mean is \code{mu}+\ln(ν). Parameter sig can be estimated without any knowledge of sampling intensity.
The parameters must be given starting values for the optimization procedure (default starting values are used if starting values are not specified in the function call).

The function uses the optimization procedures in optim to obtain the maximum likelihood estimate. The method and control arguments are passed to optim, see the help page for this function for additional methods and control parameters.

A zero-truncated distribution (see dpoilog) is assumed by default (zTrunc = TRUE). In cases where the number of zeros is known the zTrunc argument should be set to FALSE.

The approximate fraction of species revealed by the sample is 1-q(0;\code{mu},\code{sig}).

Parametric bootstrapping is done by simulating new sets of observations using the estimated parameters (see rbipoilog).

## Value

 par  Maximum likelihood estimates of the parameters p  Approximate fraction of species revealed by the sample logLval  Log likelihood of the data given the estimated parameters gof  Godness of fit measure obtained by checking the rank of logLval against logLval's obtained during the bootstrap procedure, (gof<0.05) or (gof>0.95) indicates lack of fit boot  A data frame containing the bootstrap replicates of parameters and logLval

## Author(s)

Vidar Grøtan vidar.grotan@bio.ntnu.no, Steinar Engen

## References

Bulmer, M. G. 1974. On fitting the Poisson lognormal distribution to species abundance data. Biometrics 30, 651-660.
Engen, S., R. Lande, T. Walla and P. J. DeVries. 2002. Analyzing spatial structure of communities using the two-dimensional Poisson lognormal species abundance model. American Naturalist 160, 60-73.

optim, dpoilog, rpoilog
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 ### simulate observations n <- rpoilog(S=80,mu=1,sig=2) ### obtain estimates of parameters est <- poilogMLE(n) ### similar, but now with bootstrapping ### ## Not run: est <- poilogMLE(n,nboot=10) ### change start values and request tracing information ### from optimization procedure est <- poilogMLE(n,startVals=c(2,3), control=list(maxit=1000,trace=1, REPORT=1))