Learn R Programming

MXM (version 0.9.7)

Many simple zero inflated Poisson regressions: Many simple zero inflated Poisson regressions.

Description

Many simple zero inflated Poisson regressions.

Usage

zip.regs(target, dataset, wei = NULL, logged = FALSE, ncores = 1)

Arguments

target
The target (dependent) variable. It must be a numerical vector with integers.
dataset
The indendent variable(s). It can be a vector, a matrix or a dataframe with continuous only variables, a data frame with mixed or only categorical variables.
wei
A vector of weights to be used for weighted regression. The default value is NULL.
logged
A boolean variable; it will return the logarithm of the pvalue if set to TRUE.
ncores
The number of cores to use. The default value is 1.

Value

A matrix with the test statistic values, their relevant (logged) p-values and the BIC values.

Details

Many simple zero inflated Poisson regressions are fitted.

References

Lambert D. (1992). Zero-inflated Poisson regression, with an application to defects in manufacturing. Technometrics, 34(1):1-14.

See Also

zip.mod, testIndZIP, reg.fit, ridge.reg

Examples

Run this code
y <- rpois(1000, 3)
x <- matrix( rnorm(1000 * 20), ncol = 20)
y[1:100] <- 0
a <- zip.regs(y, x)

Run the code above in your browser using DataLab