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

ztp.reg

Zero truncated Poisson regression


Description

Zero truncated Poisson regression.

Usage

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

Arguments

y

The dependent variable, a numerical vector with integer valued numbers.

x

A matrix or a data.frame with the indendent variables.

full

If you want full information (standard errors, Walt test statistics and p-values of the regression coefficients) set this equal to TRUE.

tol

The tolerance value required by the Newton-Raphson to stop.

maxiters

The maximum iterations allowed.

Details

A zero truncated poisson regression model is fitted.

Value

A list including:

be

The regression coefficients if "full" was set to FALSE.

info

This is returned only if "full" was set to TRUE. It is a matrix with the regression coefficients, their standard errors, Walt test statistics and p-values.

loglik

The loglikelihood of the regression model.

iter

The iterations required by the Newton-Raphson.

Author(s)

Michail Tsagris

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

See Also

Examples

y <- rpois(100, 5)
y[y == 0] <- 1
x <- matrix( rnorm(100 * 5), ncol = 5 )
mod <- ztp.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.