countSTAR1.0.2 package

Flexible Modeling of Count Data

a_j

Inverse rounding function

bam_star

Fit Bayesian Additive STAR Model with MCMC

bart_star

MCMC Algorithm for BART-STAR

bart_star_ispline

MCMC sampler for BART-STAR with a monotone spline model for the transf...

blm_star

STAR Bayesian Linear Regression

blm_star_bnpgibbs

Gibbs sampler for STAR linear regression with BNP transformation

blm_star_exact

Monte Carlo sampler for STAR linear regression with a g-prior

BrentMethod

Brent's method for optimization

computeTimeRemaining

Estimate the remaining time in the MCMC based on previous samples

confint.lmstar

Compute asymptotic confidence intervals for STAR linear regression

credBands

Compute Simultaneous Credible Bands

ergMean

Compute the ergodic (running) mean.

expectation_gRcpp

Estimate the mean for a STAR process

expectation_identity

Estimate the mean for a STAR process

expectation_log

Estimate the mean for a STAR process

expectation_sqrt

Estimate the mean for a STAR process

expectation2_gRcpp

Compute E(Y^2) for a STAR process

g_bc

Box-Cox transformation

g_bnp

Bayesian bootstrap-based transformation

g_cdf

Cumulative distribution function (CDF)-based transformation

g_inv_approx

Approximate inverse transformation

g_inv_bc

Inverse Box-Cox transformation

gbm_star

Fitting STAR Gradient Boosting Machines via EM algorithm

genEM_star

Generalized EM estimation for STAR

genMCMC_star

Generalized MCMC Algorithm for STAR

genMCMC_star_ispline

MCMC sampler for STAR with a monotone spline model for the transformat...

getEffSize

Summarize of effective sample size

init_bam_orthog

Initialize the parameters for an additive model

init_bam_thin

Initialize the parameters for an additive model

init_lm_gprior

Initialize linear regression parameters assuming a g-prior

init_lm_hs

Initialize linear regression parameters assuming a horseshoe prior

init_lm_ridge

Initialize linear regression parameters assuming a ridge prior

init_params_mean

Initialize the parameters for a simple mean-only model

interval_gRcpp

Estimate confidence intervals/bands for a STAR process

invlogit

Compute the inverse log-odds

lm_star

Fitting frequentist STAR linear model via EM algorithm

logit

Compute the log-odds

logLikePointRcpp

Compute the pointwise log-likelihood for STAR

logLikeRcpp

Compute the log-likelihood for STAR

plot_coef

Plot the estimated regression coefficients and credible intervals

plot_fitted

Plot the fitted values and the data

plot_pmf

Plot the empirical and model-based probability mass functions

pmaxRcpp

pmax() in Rcpp

pminRcpp

pmin() in Rcpp

predict.lmstar

Predict method for response in STAR linear model

pvals

Compute coefficient p-values for STAR linear regression using likeliho...

randomForest_star

Fit Random Forest STAR with EM algorithm

round_floor

Rounding function

rtruncnormRcpp

Sample from a truncated normal distribution

sample_bam_orthog

Sample the parameters for an additive model

sample_bam_thin

Sample the parameters for an additive model

sample_lm_gprior

Sample the linear regression parameters assuming a g-prior

sample_lm_hs

Sample linear regression parameters assuming horseshoe prior

sample_lm_ridge

Sample linear regression parameters assuming a ridge prior

sample_params_mean

Sample the parameters for a simple mean-only model

sampleFastGaussian

Sample a Gaussian vector using the fast sampler of BHATTACHARYA et al.

simBaS

Compute Simultaneous Band Scores (SimBaS)

simulate_nb_friedman

Simulate count data from Friedman's nonlinear regression

simulate_nb_lm

Simulate count data from a linear regression

spline_star

Estimation for Bayesian STAR spline regression

spline_star_exact

Monte Carlo predictive sampler for spline regression

splineBasis

Initialize and reparametrize a spline basis matrix

truncnorm_mom

Compute the first and second moment of a truncated normal

uni.slice

Univariate Slice Sampler from Neal (2008)

update_struct

Update parameters for warpDLM model with trend DLM

warpDLM

Posterior Inference for warpDLM model with latent structural DLM

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) <doi:10.1214/20-EJS1707>, Kowal and Wu (2022) <doi:10.1111/biom.13617>, King and Kowal (2022) <arXiv:2110.14790>, and Kowal and Wu (2023) <arXiv:2110.12316>.

  • Maintainer: Brian King
  • License: GPL (>= 2)
  • Last published: 2023-06-30