Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

hp.reg

Hurdle-Poisson regression


Description

Hurdle-Poisson regression.

Usage

hp.reg(y, x, full = FALSE, tol = 1e-07, maxiters = 100)

Arguments

y

The dependent variable, a numerical vector with numbers.

x

A numerical matrix with the indendent variables. We add, internally, the first column of ones.

full

If this is FALSE, the coefficients and the log-likelihood will be returned only. If this is TRUE, more information is returned.

tol

The tolerance value to terminate the Newton-Raphson algorithm.

maxiters

The max number of iterations that can take place in each regression.

Details

Two regression models are fitted, a binary logistic regression and a zero truncated Poisson regression model.

Value

Depending on whether "full" is TRUE or not different outputs are returned. In general, the regression coefficients, the iterations required by Newton-Raphson and the deviances are returned. If full is TRUE, a matrix with their standard errors and the Wald test statistics is returned as well.

Author(s)

Michail Tsagris

R implementation and documentation: Michail Tsagris <mtsagris@uoc.gr>

References

Mullahy J (1986). Specification and Testing of Some Modified Count Data Models. Journal of Econometrics, 33(3): 341–365.

See Also

Examples

y <- rpois(100, 4)
x <- iris[1:100, 1]
a <- hp.reg(y, x)

Rfast2

A Collection of Efficient and Extremely Fast R Functions II

v0.0.9
GPL (>= 2.0)
Authors
Manos Papadakis, Michail Tsagris, Stefanos Fafalios and Marios Dimitriadis.
Initial release
2021-03-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.