rpp {oneinfl}R Documentation

Generate Random Counts from a Zero-Truncated Poisson Process

Description

Simulates count data from a zero-truncated Poisson process using specified parameters for the rate component.

Usage

rpp(b, X)

Arguments

b

A numeric vector of coefficients for the rate component.

X

A matrix or data frame of predictor variables for the rate component.

Details

This function generates count data from a zero-truncated Poisson process, which models count data without zeros. The process involves:

This function is useful for generating synthetic data for testing or simulation studies involving zero-truncated Poisson models.

Value

A numeric vector of simulated count data.

See Also

truncreg for fitting zero-truncated models.

Examples

# Example usage
set.seed(123)
X <- matrix(rnorm(100), ncol = 2)
b <- c(0.5, -0.2)
simulated_data <- rpp(b, X)
print(simulated_data)


[Package oneinfl version 1.0.2 Index]