*! 1.0.0 10Jun2026

Title

poissark -- Poisson regression with integer-valued autoregressive-corrected standard errors

Syntax

poissark
depvar
[indepvars]
[if] [in]
,
lag(#)
[options]

Model
* lag(#) set maximum lag order of autocorrelation

offset(varname) include varname in model with coefficient constrained to 1

exposure(varname) include ln(varname) in model with coefficient constrained to 1

noconstant suppress constant term

Reporting
irr report incidence-rate ratios

level(#) set confidence level; default is level(95)

coeflegend display legend instead of statistics

nolog suppress iteration log

Convergence
tolerance(#) convergence criterion; default is tolerance(1e-6)

iterate(#) maximum iterations; default is iterate(250)

* lag(#) is required.

You must tsset your data before using poissark; see tsset.

Factor variables are allowed in indepvars; see fvvarlist.

Time-series operators are allowed in depvar and indepvars; see tsvarlist.

Typing poissark without arguments replays the last estimation results.

The following postestimation predict options are available after poissark:

predict newvar [if] [in] [, statistic]

statistic

n predicted number of events; the default; equal to exp(xb) if neither
offset() nor exposure() was specified; exp(xb+offset) if offset() was
specified; or exp(xb)*exposure if exposure() was specified

ir incidence rate exp(xb), ignoring any offset or exposure variable

xb linear prediction xb; equal to xb if neither offset() nor
exposure() was specified; xb+offset if offset() was specified; or
xb+ln(exposure) if exposure() was specified

stdp standard error of the linear prediction

These statistics are available both in and out of sample; type
predict ... if e(sample) ... if wanted only for the estimation sample.

Use the nooffset option to ignore the offset or exposure in predictions for
n and xb.

Description

poissark fits Poisson regression models for count time series with
autoregressive errors of order k. Regression coefficients are estimated by
Poisson maximum likelihood; the AR thinning parameters rho_1,...,rho_k are
estimated by conditional least squares (CLS) applied to the integer-valued
autoregressive (INAR(p)) model of Du and Li (1991),
which extends the INAR(1) model of McKenzie (1985)
and Al-Osh and Alzaid (1987) to arbitrary order
using independent binomial thinning at each lag. Standard errors for the
regression coefficients are corrected via an INAR-corrected sandwich
estimator that accounts for the estimated autocorrelation structure
(Klimko and Nelson 1978).

Only positive autocorrelation is supported (rho_j >= 0), which is a fundamental constraint
of the binomial thinning mechanism.

Options

Model

lag(#) specifies the order of the autoregressive process and must be a positive integer.

offset(varname) specifies a variable to be included in the model
with its coefficient constrained to 1.

exposure(varname) specifies a variable representing exposure time or
population size. The natural log of varname is included as an offset.

noconstant suppresses the constant term.

Reporting

irr reports exponentiated coefficients as incidence-rate ratios.

level(#) specifies the confidence level as a percentage. Default is
level(95).

coeflegend display legend instead of statistics.

nolog suppresses the iteration log showing rho values at each iteration.

Convergence

tolerance(#) specifies the convergence criterion. Iteration stops when max|rho_new - rho_old| < #.
Default is tolerance(1e-6).

iterate(#) specifies the maximum number of iterations. Default is iterate(250).

Examples

Load the example dataset (N=730, single-group ITSA, intervention at t=365):

. use poissark_example, clear

. tsset t

Fit AR(1) model (true rho=0.4):

. poissark y_ar1 t x x_t, lag(1)

Fit AR(2) model (true rho1=0.4, rho2=0.2):

. poissark y_ar2 t x x_t, lag(2)

Fit AR(3) model (true rho1=0.4, rho2=0.3, rho3=0.2):

. poissark y_ar3 t x x_t, lag(3)

Report incidence-rate ratios:

. poissark y_ar1 t x x_t, lag(1) irr

Display coefficient legends:

. poissark y_ar2 t x x_t, lag(2) coefl

Postestimation -- predicted counts and incidence rates:

. poissark y_ar1 t x x_t, lag(1)

. predict n_hat

. predict ir_hat, ir

Stored results

poissark stores the following in e():

Scalars

e(N) number of observations

e(df_m) model degrees of freedom

e(chi2) Wald chi-squared statistic

e(p) p-value for Wald chi-squared

e(ll) Poisson log likelihood at final beta estimates

e(deviance) deviance

e(pearson) Pearson chi-squared

e(iterations) number of iterations to convergence

e(tolerance) convergence tolerance

e(ngaps) number of gaps in sample (includes panel changes)

Macros

e(cmd) poissark

e(cmdline) command as typed

e(title) title in estimation output

e(depvar) name of dependent variable

e(timevar) name of time variable

e(panelvar) name of panel variable (if panel data)

e(vce) vcetype

e(vcetype) INAR-corrected (integer-valued autoregressive-corrected)

e(predict) poissark_p

Matrices

e(b) coefficient vector

e(V) integer-valued autoregressive (INAR)-corrected variance-covariance matrix

e(rho) CLS thinning parameter estimates (1 x p)

e(serho) standard errors of thinning parameter estimates (1 x p)

Functions

e(sample) marks estimation sample

References

Al-Osh, M.A. and A.A. Alzaid. 1987. First-order integer-valued autoregressive
(INAR(1)) process. Journal of Time Series Analysis 8(3): 261-275.

Du, J.G. and Y. Li. 1991. The integer-valued autoregressive (INAR(p)) model.
Journal of Time Series Analysis 12(2): 129-142.

Klimko, L.A. and P.I. Nelson. 1978. On conditional least squares estimation
for stochastic processes. Annals of Statistics 6(3): 629-642.

McKenzie, E. 1985. Some simple models for discrete variate time series.
Journal of the American Water Resources Association 21(4): 645-650.

Author

Ariel Linden

Linden Consulting Group, LLC

alinden@lindenconsulting.org

Citation of poissark

poissark is not an official Stata command. It is a free contribution
to the research community, like a paper. Please cite it as such:

Linden, Ariel. 2026. POISSARK: Stata module for computing Poisson regression with integer-valued autoregressive-corrected standard errors.
Statistical Software Components s000000, Boston College Department of Economics.

Online: poisson, praisk, (if installed), xtpraisk, (if installed)