texmex-fit: wrapper for fitting the Poisson lognormal

Description Usage Arguments Details Value Author(s) See Also Examples

Description

A nice wrapper for the poilogMLE function.

Usage

1
  texmex.fit(n, start.mus=c(-2.0, -1.0, 0.0, 1.0, 2.0), start.sigs=rep(1.0, times=5), ...)

Arguments

n

vector of observed counts

start.mus

vector of starting mu values

start.sigs

vector of starting sig values

...

further parameters to go to poilogMLE

Details

It can be a little annoying to direclty use poilogMLE: the optimization can fail to converge if you choose a bad starting mu value. This function makes multiple attempts at fitting the poilog distribution, returning the first one that works.

For the first attempt, the first mu and sig are used as starting values. For the second attempt, the second elements of those vectors, etc.

Value

par

Maximum likelihood estimates of the parameters

p

Approximate fraction of OTUs revealed by the sample

logLval

Log likelihood of the data given the estimated parameters

Author(s)

Scott Olesen swo@mit.edu

See Also

poilogMLE

Examples

1
2
3
4
5
# create some random data
x <- rpoilog(S=1000, mu=-2.0, sig=2.0, keep0=FALSE)

# fit that data
res <- texmex.fit(x)

texmexseq documentation built on May 29, 2017, 11:25 p.m.