Marginal effects after poisson and negbin regression This package serves to calculate marginal effects and associated statistics (standard errors, z-values and p-values) for poisson and negbin regression. The package offers a graphical interface which is designed to appear under the Analysis menu in gretl's model window; this is hard-wired to produce marginal effects at the sample means of all the regressors. Two public functions are available. 1) poisson_mfx calculates marginal effects at the sample means, along with standard errors via the delta method, and they return a bundle containing all the results. function bundle poisson_mfx (series y "dependent variable", list XL "list of regressors", matrix theta "parameter estimates", matrix V "estimated variance matrix", bool poiss[1]) This function is intended to use alongside with poisson_mfx_print (bundle *b) function for nice printing of the results (see the sample script). Note that the output bundle contains the covariance matrix of the marginal effects. Hence, a user could easy calculate marginal effects of functions of the regressors. 2) function bundle poisson_mfx1 (series y "dependent variable", list XL "list of regressors", matrix at[null] "vector of x-values", matrix theta "parameter estimates", matrix V "estimated variance matrix", bool poiss[1]) The same as poisson_mfx but at given x-values. 3) poisson_dp_dx function accept a k-vector, x, containing the values of the regressors at which the marginal effects should be found, and they return the k-vector of effects pertaining to a specific selected outcome. function matrix poisson_dp_dx (matrix b "parameter estimates", list XL "list of regressors", matrix x "vector of x-values") Dummy variables (0/1) are detected and the marginal effect is calculated as the effect of a discrete change from 0 to 1. References ---------- Gretl User's Guide Gretl lp-mfx package Greene William H. (2003). Econometric Analysis, Upper Saddle River, NJ: Prentice-Hall, fifth edn. Maddala, G. (1983). Limited Dependent and Qualitative Variables in Econometrics. New York: Cambridge University Press. Partial changelog ----------------- v0.3 (by the gretl team): some cleanup of internal syntax