escount {micsr}R Documentation

Endogenous switching and sample selection models for count data

Description

Heckman's like estimator for count data, using either maximum likelihood or a two-steps estimator

Usage

escount(
  formula,
  data,
  subset,
  weights,
  na.action,
  offset,
  start = NULL,
  R = 16,
  hessian = FALSE,
  method = c("twosteps", "ml"),
  model = c("es", "ss")
)

Arguments

formula

a Formula object which includes two responses (the count and the binomial variables) and two sets of covariates (for the count component and for the selection equation)

data

a data frame,

subset, weights, na.action, offset

see stats::lm

start

an optional vector of starting values,

R

the number of points for the Gauss-Hermite quadrature

hessian

if TRUE, the numerical hessian is computed, otherwise the covariance matrix of the coefficients is computed using the outer product of the gradient

method

one of 'ML' for maximum likelihood estimation (the default) or 'twosteps' for the two-steps NLS method

model

one of 'es' for endogenous switching (the default) or 'ss' for sample selection

Value

an object of class ⁠c("escount,micsr)"⁠, see micsr::micsr for further details.

Author(s)

Yves Croissant

References

Terza JV (1998). “Estimating count data models with endogenous switching: Sample selection and endogenous treatment effects.” Journal of Econometrics, 84(1), 129-154.

Greene WH (2001). “Fiml Estimation of Sample Selection Models for Count Data.” In Negishi T, Ramachandran RV, Mino K (eds.), Economic Theory, Dynamics and Markets: Essays in Honor of Ryuzo Sato, chapter 6, 73–91. Springer US, Boston, MA.

Examples

trips_2s <- escount(trips | car ~ workschl + size + dist + smsa + fulltime + distnod +
realinc + weekend + car | . - car - weekend + adults, data = trips, method = "twosteps")
trips_ml <- update(trips_2s, method = "ml")

[Package micsr version 0.1-1 Index]