Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Quadratic term in ZIP model

From   Maarten buis <>
Subject   Re: st: Quadratic term in ZIP model
Date   Mon, 18 Oct 2010 09:20:09 +0100 (BST)

--- On Sat, 16/10/10, Asaduzzaman Khan wrote:
> I've fitted a zero-inflated Poisson (ZIP) model where I had
> to include a significant quadratic term (e.g. age, age^2) to
> have a better fit. Can anyone help me with the
> interpretation of the overall effect of age on the counts?

The very fact that you included a quadratic term means that 
there no longer is one effect of age but that the effect of
age differs depending on how old one is. As a consequence it
is hard to imagine how to define an "overall effect". I would
just graph the effect of age. Alternatively, I would represent 
age as linear splines, see -help mkspline- if age is only of 
secondary importance so I would not want to spent an entire 
graph on it. That way you can interpret directly interpet
the parameters. 

In the example below I show one way of graphing a model with
a quadratic term. Below that I show the alternative with linear
splines. The latter would be interpreted as follows: below
mathnce score of 50 you would expect a 10 point increase in
mathnce to result in a decrease of the expected count by a
factor of 0.95 (i.e. (1 - 0.95)*100% = -5%), while above a 
mathnce score of 50 you would expect a 10 point increase in
mathnce to result in in increase in the expected count by a
factor of 1.07 (i.e. 7%).

*--------------------- begin example ----------------------------
use, clear

zip daysabs i.gender i.biling mathnce langnce, inflate(
est store lin
zip daysabs i.gender i.biling c.mathnce##c.mathnce langnce, inflate(
est store quad

// fix the other variables at meaningful values
replace gender = 2
replace biling = 0
sum langnce if e(sample), meanonly
replace langnce = r(mean)
replace school = 1

// keep only one observation per unique value of mathnce
// this will make the resulting graph smaller in terms of memory
bys mathnce : keep if _n == 1

// predict the expected counts
est restore lin
predict n_lin

est restore quad
predict n_quad

// graph the expected counts
twoway line n_lin n_quad mathnce, sort ///
       legend(order( 1 "linear"        ///
                     2 "quadratic"))

// alternatively use linear splines

// make the unit a bit bigger for ease of interpretation
replace mathnce = mathnce / 10
mkspline math1 5 math2 = mathnce
zip daysabs i.gender i.biling math1 math2 langnce, inflate( irr
*----------------------- end example -----------------------------------
(For more on examples I sent to the Statalist see: )

Hope this helps,

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen


*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index