Estimation of a multi-group count regression models (i.e., Poisson,
negative binomial) with latent covariates. This packages provides two extensions
compared to ordinary count regression models based on a generalized linear model:
First, measurement models for the predictors can be specified allowing to account
for measurement error. Second, the count regression can be simultaneously estimated
in multiple groups with stochastic group weights. The marginal maximum likelihood
estimation is described in Kiefer & Mayer (2020)
lavacreg is an R package for fitting count regression models (i.e., Poisson, negative binomial) with manifest as well as latent covariates and within multiple groups. It can be installed via GitHub.
lavacreg is currently on CRAN. The development version of lavacreg can be installed directly from this GitHub repository using the additional package devtools. Under Windows, please make sure Rtools (http://cran.r-project.org/bin/windows/Rtools) are installed and no older version of lavacreg is currently loaded:
install.packages("devtools")
library(devtools)
install_github("chkiefer/lavacreg")
The main function of the package is countreg(). There is an article available here on GitHub (https://chkiefer.github.io/lavacreg/articles/intro.html) to introduce you to its functionality.