Learn R Programming

COUNT (version 1.3.2)

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

Description

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

Usage

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, ...)

Value

  • nbcyCanonical negative binomial (NB-C) response; number of counts
  • sim.datasynthetic data set

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.

References

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

See Also

nb2_syn, nb1_syn

Examples

Run this code
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

Run the code above in your browser using DataLab