Truncated Poisson regression
tpoisson depvar [varlist] [if exp] [in range] , trunc(varname) TLEft() TRIght() [ offset(varname) exposure(varname) cluster(varname) level(#) from(asis) irr robust nolog maximize_options survey_options]
Note: the option trunc must be included in the command. A trunc variable must use the following numbers to indicate the type of truncation: 0 = left truncated, 1 = not truncated, -1 = right truncated.
Note: Type value of left truncated site in tleft().
Type value of right truncated site in tright().
aweights, fweights, iweights, and pweights are allowed; see help weights.
tpoisson provides access to all maximize options; see help maximize.
tpoisson provides access to all survey options; see help svy.
Description
tpoisson fits a truncated Poisson maximum-likelihood regression of depvar on indepvars, where depvar is a non-negative count variable. The trunc option is required. If no observations are truncated, a trunc variable with all 1's must be specified. Interpret parameter estimates as one would poisson.
Values on either side of the site of truncation are revalued to the value of the trunc value.
tpoisson accepts all of the help maximize options, the constraint() option, and all survey options and capabilities documented in [SVY]; including multi-level surveys; poststratification; and BRR, jackknife, and linearization VCE estimators.
This program uses ml lf method.
Options
+-------+ ----+ Model +------------------------------------------------------------
trunc(truncvar) is required. Values of 1 indicate a non-truncated, 0 a left truncated, and -1 a right truncated observation. truncvar may be numeric or a variable.
tleft(#) for left truncation site; tright(#) for right truncation site
trunc(1) and no tleft or tright values declared is a standard Poisson model
offset(varname) specifies a varname in model with coefficient constrained to 1.
exposure(varname) specifies a ln(varname) in model with coefficient constrained to 1.
constraints(constraints) apply specified linear constraints.
+-----------+ ----+ SE/Robust +--------------------------------------------------------
cluster(varname)
robust specifies that the Huber/White/sandwich estimator of variance is to be used in place of the traditional calculation. robust combined with cluster() allows observations which are not independent within cluster (although they must be independent between clusters). If you specify pweights, robust is implied.
vce(options) allowed. vce() supports robust, opg, and native. vce does not support options bootstrap or jacknife, However, tpoisson does support the bootstrap and jacknife commands, so these modeling capabilities are allowed.
+-----------+ ----+ Reporting +-------------------------------------------------------- level(#) specifies the confidence level, in percent, for confidence intervals of the coefficients; see help level.
nolog suppresses the iteration log.
+-------------+ ----+ max options +------------------------------------------------------
maximize_options: technique(algorithm_spec), [no]log, trace, hessian, gradient, showstep, shownrtolerance, difficult, iterate(#), tolerance(#), ltolerance(#), gtolerance(#), nrtolerance(#), nonrtolerance, from(init_specs); see maximize.
+-------------+ ----+ svy options +------------------------------------------------------
survey_options are all available. See help svy
Author and support
Joseph Hilbe, Arizona State University: hilbe@asu.edu
Remarks
tpoisson is a user authored program. Support is by author. See Hilbe, Negative Binomial Regression, Cambridge University Press, for discussion. Related information can also be obtained at [R] poisson. Or see cpoisson or cpoissone
Examples Before example 1 . gen byte truncvar = 1 . replace truncvar = 0 if time<=3
. tpoisson time hmo age, trunc(truncvar) tle(3) nolog irr
Before example 2 . replace truncvar = 1 . replace truncvar = 0 if time<=2 . replace truncvar = -1 if time >=30
. tpoisson time hmo age, trunc(truncvar) tleft(2) tright(30) nolog cluster(provnum)
. bootstrap: tpoisson deaths smokes a2-a5, trunc(truncvar) tright(10) exposure(pyears) irr nolog
. svyset psuid [pweight=finalwgt], strata(stratid)
. svy: tpoisson zinc age age2 weight female black orace rural, trunc(cv) tright(20) nolog irr
Also see
Manual: [R] Poisson regression; [SVY] Svy: poisson
Online: help cpoisson cpoissone poisson