"By interactions we mean an interplay among predictors that produces an effect on the outcome Y that is different from the sum of the effects of the individual ...
Modeling Interactions in Count Data Regression Principles and Implementation in Stata Heinz Leitgöb Johannes Kepler University of Linz, Austria
German Stata Uers Group Meeting
H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
1 / 17
Table of contents
1
Theoretical & analytical principles
2
Interaction effects in nonlinear models
3
Introduction to count data models
4
Interaction effects in count data models
5
Example with artificial data
6
Next steps
H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
2 / 17
Definition of interactions
"By interactions we mean an interplay among predictors that produces an effect on the outcome Y that is different from the sum of the effects of the individual predictors." (Cohen et al. 2003, 255) "Two explanatory variables are said to interact in determining a response variable when the partial effect of one depends on the value of the other." (Fox 2008, 131)
→ From an analytical point of view, an interaction effect can be defined as the marginal effect of a marginal effect
H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
3 / 17
Identification of interaction effects in the linear model
Linear model with interaction term x1 x2 : E (y |x) = β 0 + β 1 x1 + β 2 x2 + β M x1 x2 + ∑j =3 β j xj k
(1)
Interaction effects (if xj is dichotomous, then xj = dj ): ∂∆E (y |x) ∆2 E (y |x) ∂2 E (y |x) = = = βM ∂x1 ∂x2 ∂x1 ∆d2 ∆d1 ∆d2
(2)
→ In the linear model, the interaction effect is in any case equal to the product term coefficient β M Significance testing: Wald-test for β M
H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
4 / 17
Interaction effects in nonlinear models
Current state of research ... in Logit & Probit models (Ai & Norton 2003; Berry et al. 2010; Bowen 2012; Greene 2010; Karaca-Mandic et al. 2012; Norton et al. 2004; Seymour 2011) ... within the GLM framework (Tsai & Gill 2013) To date, no explicit contributions covering the identification of interaction effects in count data models are available
H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
5 / 17
Characteristics of Interaction effects in nonlinear models In contrast to the linear model (see Eq. (2)), the interaction effect does not equal β M A significant interaction effect is possible even when β M = 0 (model inherent interaction effect) → Statistical significance cannot be tested by applying a Wald-test for βM The interaction effect is dependent on covariates and thus subject to variation across individuals The interaction effect may have different signs for different individuals → The sign of β M does not necessarily indicate the direction of the interaction effect The total interaction effect is composed additively of a model inherent interaction effect and a product term induced interaction effect
H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
6 / 17
Introduction to count data models Inverted link function: E (y |x) = exp (x β ) = µ
(3)
Poisson model (stochastic component) f (y |µ) = Pr (Y = y ) =
exp(−µ)µy ; y = 0, 1, 2, ...; µ > 0 y!
(4)
Negative binomial model (stochastic component) α −1 Γ (y + α −1 ) α− 1 f (y |µ, α) = Pr (Y = y ) = Γ (y + 1 ) Γ ( α −1 ) α −1 + µ y µ ; y = 0, 1, 2, ...; µ > 0; α ≥ 0 α −1 + µ H. Leitgöb
Interactions in Count Data Models
Hamburg, June 2014
(5)
7 / 17
Interaction effects in count data models Count data model with interaction term x1 x2 : k E (y |x) = exp β 0 + β 1 x1 + β 2 x2 + β M x1 x2 + ∑j =3 β j xj
(6)
Total interaction effect ( ιt ) ιt =
∂2 E (y |x) = [( β 1 + β M x2 ) ( β 2 + β M x1 ) + β M ] E (y |x) ∂x1 ∂x2
(7)
Rearranging terms uncovers the model inherent ( ιm ) and the product term induced ( ιp ) interaction effect ιt = β 1 β 2 E (y |x) + β M ( β 1 x1 + β 2 x2 + β M x1 x2 + 1) E (y |x) | {z } | {z } ιm
H. Leitgöb
(8)
ιp
Interactions in Count Data Models
Hamburg, June 2014
8 / 17
Delta method standard errors According to Ai & Norton (2003), standard errors for the interaction effects can be obtained by applying the Delta method for variance estimation total interaction effect σˆ ι2t
=
∂ιt β ∂β
^ V
∂ιt β ∂β
0 (9)
model inherent interaction effect 0 ∂ιm ^ ∂ιm 2 σˆ ιm = V β β ∂β ∂β
(10)
product term induced interaction effect σˆ ι2p H. Leitgöb
=
∂ιp β ∂β
^ V
∂ιp β ∂β
Interactions in Count Data Models
0 (11)
Hamburg, June 2014
9 / 17
Example with artificial data ( β 1 < 0; β 2 > 0; β M > 0 ) Simulation of a Poisson model with η = −6 − 2x1 + 2x2 + .5x1 x2 x1 , x2 ∼ N (0; 1); n = 10.000 Estimation results (poisson command) variable constant x1 x2 x1 x2
coef. -6.148 -2.038 1.990 .493
se .172 .073 .086 .042
p