For Bayesian and classical inference and prediction with count-valued data,
Simultaneous Transformation and Rounding (STAR) Models provide a flexible, interpretable,
and easy-to-use approach. STAR models the observed count data using a rounded
continuous data model and incorporates a transformation for greater flexibility.
Implicitly, STAR formalizes the commonly-applied yet incoherent procedure of
(i) transforming count-valued data and subsequently
(ii) modeling the transformed data using Gaussian models.
STAR is well-defined for count-valued data, which is reflected in predictive accuracy,
and is designed to account for zero-inflation, bounded or censored data, and over- or underdispersion.
Importantly, STAR is easy to combine with existing MCMC or point estimation
methods for continuous data, which allows seamless adaptation of continuous data
models (such as linear regressions, additive models, BART, random forests,
and gradient boosting machines) for count-valued data. The package also includes several
methods for modeling count time series data, namely via warped Dynamic Linear Models.
For more details and background on these methodologies, see the works of
Kowal and Canale (2020)
Count-valued data are common in many fields. Frequently, count data are observed jointly with predictors, over time intervals, or across spatial locations. Furthermore, they often exhibit a variety of complex distributional features, including zero-inflation, skewness, over- and underdispersion, and in some cases may be bounded or censored. Flexible and interpretable models for count-valued processes are therefore highly useful in practice.
countSTAR implements a variety of methods for modeling such processes,
based on the idea of Simultaneous Transformation and Rounding (STAR).
Estimation, inference, and prediction for STAR are available for both
Bayesian and frequentist models. The bulk of methods serve for
static regression problems, but the package also supports time series
analysis via the warped Dynamic Linear Model (DLM) framework.
Broadly, STAR defines an count-valued probability model by (1) specifying a (conditionally) Gaussian model for continuous latent data and (2) connecting the latent data to the observed data via a transformation and rounding operation.
Importantly, STAR models are highly flexible count-valued processes, and provide the capability to model (i) discrete data, (ii) zero-inflation, (iii) over- or under-dispersion, (iv) heaping, and (v) bounded or censored data. The modularity of the STAR framework allows for the ability to utilize a wide variety of different latent data models, which can range from simple forms like linear regression to more advanced machine learning methods such as random forests or gradient boosting machines.
countSTAR can be installed and loaded as follows:
#CRAN version
install.packages("countSTAR")
#Development version
remotes::install_github("bking124/countSTAR")
library("countSTAR")
Detailed information on the different options for STAR models and how
they are implemented in countSTAR can be found in the vignette,
accessible on the
website
or by running the command vignette("countSTAR"). A basic breakdown of
the available modeling functions is shown below:
| Analysis Type | Method (function) |
Dependent Package |
|---|---|---|
| Static Classical Regression | Linear regression (lm_star()) |
- |
| - | Generalized boosted modeling (gbm_star()) |
gbm |
| - | Random Forests (randomForest_star()) |
randomForest |
| Static Bayesian Regression | Linear regression (blm_star()) |
- |
| - | Additive modeling (bam_star()) |
spikeSlabGAM |
| - | Spline regression (spline_star()) |
spikeSlabGAM |
| - | Bayesian additive regression trees (bart_star()) |
dbarts |
| Time Series Modeling | Warped Dynamic Linear Models (warpDLM()) |
KFAS |
In addition to these ready to use functions, users can also implement
STAR methods with custom latent regression models using the
genEM_star() and genMCMC_star() functions.
Please submit any issues or feature requests to https://github.com/bking124/countSTAR/issues.