5.9.1 Poisson
The command used to run a Poisson analysis is `poisson'.
The first variable in the list is the dependent variable (counting variable that counts occurrences of a given event). Other variables (explanatory variables) can be specified in the same way as with OLS (cf. the `regress' command).
Available options:
-
noconstant
: Suppresses the constant term -
level()
: Change from default 95% confidence interval -
robust
: Robust standard errors -
cluster()
: Use cluster variable (cannot be used together with robust) -
control()
: Do not show coefficient estimates for selected variables -
irr
: Reports incidence rate ratio values instead of coefficient values (the values are transformed through the natural exponential function). The value 1 means no effect. Values above 1 mean a positive effect, while values below 1 mean a negative effect. -
exposure()
: Includes exposure variable (categorical variable). This represents the "amount" of exposure to the process generating counts. The variable entered inside the parentheses must be categorical and must not contain 0 values. For example, if you model the number of car accidents in different cities, attachment to city can be an exposure variable. The exposure variable is automatically log-transformed (natural logarithm) and included as an offset in the model, meaning it will adjust the count response for the amount of exposure. The other estimates are then corrected based on this variable, so that they become more correct. Note that the `exposure' variable should not be entered as an explanatory variable in the model.
Factor variables, and cluster and robust estimation can also be used. The procedure is the same as for ordinary linear regression. See respectively chapter 5.4.1 and 5.4.3 for more information on this. For a full overview of possibilities, use the help poisson
command.
Example of Poisson regression:
Note that the implementation of the Poisson count regression in microdata.no is not compatible with statistical models where at least one of the explanatory variables has too high a value (this will typically apply to income variables). It is recommended to transform the values of the relevant variables so that they fall below a limit value of approx. 400 (this can be done by dividing by a factor or using e.g. a logarithm transformation). If this is not done, you risk getting a result that only shows empty values. However, as long as estimates are reported for all the explanatory variables, you do not need to perform any transformation.
Source:
The algorithms for the poisson
command are based on the function Poisson found in Statsmodels module in Python.