ztpreg: Zero-truncated Poisson and Negative Binomial Regression...

Description Usage Arguments Value TODO Author(s) References See Also Examples

View source: R/ztpreg.R

Description

Zero-truncated Poisson and Negative Bionomial regression models are used for estimating the unknown population size using a single registration file in the stuides of Heijden (2003) and Cruffy (2008). Zero-truncated Negative Binomial is an alternative of zero-truncated Poisson model when an overdispersion is suspected.

Usage

1
2
3
  ztpreg(formula, data, dist = c("poisson", "nbinom"),
    method = c("BFGS", "L-BFGS-B"), hessian = TRUE,
    ztrunc = TRUE, ...)

Arguments

formula

a symbolic description of the model to be fit.

data

a data frame containg the variables in the model.

dist

a description of sampling model to be used in the model.

method

the method to be used in fitting model. The default method uses BFGS in the optim function.

hessian

logical, Should a numerically differentiated Hessian matrix about regression parameters be returned?

ztrunc

logical, Is the sampling model used in the model assumed that zeros are truncated?

...

other arguments

Value

An object of class ztpr with components including

formula

formula used to be fitted,

converged

integer code which indicates a successful completion of optimization process,

niters

integer that indicates a number of iterations until convergence to estimates,

cfs

estimated regression coefficients,

vcv

estimated variance-covariance matrix of regression coefficients which is obtained by the inverse of Hessian matrix

llk

value of log-likelihood function at cfs.

TODO

Author(s)

Chel Hee Lee <gnustats@gmail.com>

References

Peter GM van der Heijden, Rami Bustami, Maarten JLF Cruyff, Godfried Engbersen and Hans C van Houwelingen (2003), Point and interval estimation of the population size using the truncated Poisson regression model, Statistical Modelling, 3, pp. 305-322.

Cruyff MJ and van der Heijden (2008) Point and interval estimation of the population size using a zero-truncated negative binomial regression model, Biometrical Journal, 50(6), pp. 1035-1050.

Dankmar Boehning and Peter G. M. van der Heijden (2009), A Covarite adjustment for zero-truncated approaches to estimating the size of hidden and elusive populations, The Annals of Applied Statistics, 3(2), pp. 595-610.

See Also

optim, glm.fit

Examples

1
2
3
4
5
6
7
8
9
#
# dat <- simulateYX(N=1e3, Xreg=FALSE, param=2, ztrunc=TRUE)
# y <- dat$y

# m <- ztpr(formula=y~1, ztrunc=TRUE, dist="poisson")
# fit <- summary(m, HT.est=TRUE, LM.test=TRUE)
# mhat <- exp(fit$cfs)
# print(fit$LM.chisq)
# print(c(fit$N, fit$cil, fit$ciu))

ipeglim documentation built on May 2, 2019, 4:31 p.m.