Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Poisson model with interaction term


From   Lloyd Dumont <[email protected]>
To   [email protected]
Subject   Re: st: Poisson model with interaction term
Date   Tue, 26 Feb 2008 07:53:47 -0800 (PST)

Thanks, Maarten.  After a lot of thinking about this
and looking over which parts of the code generated
which parts of the graph and trying to recall how
marginal changes are computed with a logit, I think I
get your example.  But, I'm still not sure how to
translate that back to a poisson or negative binomial
context---and if the panel nature of the data make it
even more complex.

--- Maarten buis <[email protected]> wrote:

> Just to make things more complicated, I have a
> problem with the
> approach by Norton and collegues. 
> 
> Say we have two explanatory variables, called x1 and
> x2, than an
> interaction effect is, how much does the effect of
> x1 change when x2
> changes. Norton et al. deal with the case when we
> have non-linear model
> and we are interested in the effect on the
> untransformed dependent
> variable than the computation.
> 
> The problem I have is this:
> In the case of non-linear models you would expect
> the effect of x1 to
> change when x2 changes even if we do not enter the
> interaction term. 
> This is most easily seen in a graph. In case of a
> logistic regression
> the marginal effect of x1 is the slope of the curve
> of the probability
> against x1 (In case of poisson it the the slope of
> the curve of the
> rate against x1) In the graph that is created by the
> code below you can
> see the marginal effects of x1 when x1 == 0 when
> x2==0 and x2 == 1 when
> the logistic regression equation is:
> 
> invlogit(pr) = x1 - 2*x2
> 
> I think (but I am not sure) that the method by
> Norton et al. gives the
> combined change in the effect of x1, i.e. the change
> in effect of x1
> that would have occured anyhow and the change in
> effect due to the
> interaction term together. I think that in many case
> this would be
> reasonable, but I can also imagine situations where
> you just want to
> know the effect of the interaction term net of the
> change in effect
> that would occur anyhow. 
> 
> -- Maarten
> 
> *-------------- begin graph
> ----------------------------
> // Marginal effects at x = 0
> local marg1 = invlogit(-2)*invlogit(2)*2
> local marg2 = invlogit(0)*invlogit(0)*2
> 
> // graph
> twoway function y = invlogit(2*x-2), range(-2 2)   
> ///
>        lpattern(shortdash)                       ||
> ///
>        function y = invlogit(2*x), range(-2 2)   ||
> ///
>        function y = invlogit(-2) + `marg1'*x,      
> ///
>        range(-.5 .5) lpattern(solid)             ||
> ///
>        function y = invlogit(0) + `marg2'*x,       
> ///
>        range(-.5 .5) lpattern(solid) xline(0)      
> ///
>        xtitle(x1) ytitle(probability)              
> ///
>        legend(order( 1 "effect when" "x2==1"       
> ///
>                      2 "effect when" "x2==0"       
> ///
>                      3 "marginal" "effects" ))  
> *--------------- end graph
> -----------------------------
> (To see the graph, run this in Stata as described in
> 
>
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html#work
> )
> 
> --- Maarten buis <[email protected]> wrote:
> 
> > The formulas can be found in section 2.3 here:
> > http://www.unc.edu/%7Eenorton/NortonWangAi.pdf
> > 
> > Where in case of a poisson with a standard link
> function:
> > F(u)=exp(u); f(u)=F'(u)=exp(u);
> f'(u)=F''(u)=exp(u)
> > 
> > Hope this helps,
> > Maarten
> > 
> > --- Lloyd Dumont <[email protected]> wrote:
> > 
> > > Actually, I am running count models on panel
> data
> > > using xtpoisson and xtnbreg, but have the exact
> same
> > > question.  (But mine really does include a count
> as a
> > > dep var.)  How do I make sense of the
> interaction
> > > term?  I am fairly sure I cannot just add the
> > > coefficients of main effects and two-way
> interactions
> > > in this case.  I don't even think I can take the
> > > significance of the coefficient on the
> interaction
> > > term seriously. 
> > > 
> > > Thanks as always.  Lloyd Dumont  
> > > --- [email protected] wrote:
> > > 
> > > > thank you Maarten, hence I can simply apply
> the
> > > > linear case formulas...
> > > > 
> > > > thanks again
> > > > Maria
> > > > Citazione Maarten buis
> <[email protected]>:
> > > > 
> > > > > --- [email protected] wrote:
> > > > > > I�m estimating a Poisson model, which
> includes
> > > > an interaction term 
> > > > > > and I need to compute the impact (marginal
> > > > effect) of x1 on lnY.
> > > > > >
> > > > > > I have found on SJ an article �Computing
> > > > interaction effects and
> > > > > > standard errors in Logit and Probit
> models�, by
> > > > Norton, Wang and Ai
> > > > > > (2004), who warn that for nonlinear models
> 
> > > > > <snip>
> > > > > >  Please notice that my interest is 
> computing
> > > > the effect of x1 on lnY
> > > > > > ,  I�m not interested in the marginal
> effect of
> > > > the interaction term,
> > > > > > nor in the effect of  x1 on E(Y), because
> my
> > > > dependent variable is
> > > > > > not a count.
> > > > > <snip>
> > > > > 
> > > > > If you are only interested in the effect on
> ln(y)
> > > > than it is no longer
> > > > > a non-linear model, so the article by Norton
> et
> > > > al. is no longer
> > > > > relevant. 
> > > > >  
> > > > > -- Maarten
> 
> 
> -----------------------------------------
> Maarten L. Buis
> Department of Social Research Methodology
> Vrije Universiteit Amsterdam
> Boelelaan 1081
> 1081 HV Amsterdam
> The Netherlands
> 
> visiting address:
> Buitenveldertselaan 3 (Metropolitan), room Z434
> 
> +31 20 5986715
> 
> http://home.fsw.vu.nl/m.buis/
> -----------------------------------------
> 
> 
>      
>
__________________________________________________________
> Sent from Yahoo! Mail.
> A Smarter Inbox.
> http://uk.docs.yahoo.com/nowyoucan.html
> *
> *   For searches and help try:
> *  
> http://www.stata.com/support/faqs/res/findit.html
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index