nbc_syn function

Negative binomial (NB-C): generic synthetic canonical negative binomial data and model

Negative binomial (NB-C): generic synthetic canonical negative binomial data and model

nbc_syn is a generic function for developing synthetic NB-C data and a model given user defined specifications.

nbc_syn(nobs=50000, alpha=1.15, xv = c(-1.5, -1.25, -.1))

Arguments

  • nobs: number of observations in model, Default is 50000
  • alpha: NB-C heterogeneity or ancillary parameter
  • xv: predictor coefficient values. First argument is intercept. Use as xv = c(intercept , x1_coef, x2_coef, ...)

Details

Create a synthetic canonial negative binomial (NB-C) regression model using the appropriate arguments. Model data with predictors indicated as a group with a period (.). Data can be modeled using the ml.nbc.r function in the COUNT package. See examples.

Returns

  • nbcy: Canonical negative binomial (NB-C) response; number of counts

  • sim.data: synthetic data set

References

Hilbe, J.M. (2011), Negative Binomial Regression, second edition, Cambridge University Press.

Author(s)

Joseph M. Hilbe, Arizona State University, and Jet Propulsion Laboratory, California Institute of Technology Andrew Robinson, Universty of Melbourne, Australia.

See Also

nb2_syn, nb1_syn

Examples

## Not run: sim.data <- nbc_syn(nobs = 50000, alpha = 1.15, xv = c(-1.5, -1.25, -.1)) mynbc <- ml.nbc(nbcy ~ . , data = sim.data) mynbc # default sim.data <- nbc_syn() dnbc <- ml.nbc(nbcy ~ . , data = sim.data) dnbc ## End(Not run)
  • Maintainer: Andrew Robinson
  • License: GPL-2
  • Last published: 2016-10-19

Useful links