Basic Interactions of Continuous Variables

The basic model considered is

pizza = ві + в2аде + вз income + e (5.14)

It is proposed that as a person grows older, his or her marginal propensity to spend on pizza declines-this implies that the coefficient в3 depends on a person’s age.

вз = в4 + вьаде (5.15)

Substituting this into the model produces

pizza = в1 + в2аде + в3іпсоте + e4(income x аде) + e (5.16)

This introduces a new variable, income x аде, which is an interaction variable. The marginal effect of unit increase in аде in this model depends on тсоте and the marginal effect of an increase in тсоте depends on аде.

The interaction could be created in gretl using the genr or series command. The data for the following example are found in the pizza4■gdt dataset. [24] 2 [25]

Model 1: OLS, using observations 1-40
Dependent variable: pizza

Подпись: Coefficient Std. Error t-ratio p-value const 161.465 120.663 1.3381 0.1892 age -2.97742 3.35210 -0.8882 0.3803 income 6.97991 2.82277 2.4727 0.0183 inmage -0.123239 0.0667187 -1.8471 0.0730 dependent var 191.5500 S.D. dependent var 155 Подпись: 580608.7 0.387319 7.586038 -248.4166 511.5887 Подпись: S.E. of regression Adjusted R2 P-value(F) Akaike criterion Hannan-QuinnПодпись: 126.9961 0.336262 0.000468 504.8332 507.2758 Sum squared resid R2

F(3, 36) Log-likelihood Schwarz criterion

The marginal effect of age on pizza expenditure can be found by taking the partial derivative of the regression function with respect to age

Подпись: (5.17)

Подпись: The result is

dE (pizza)

= p2 + PAincome age

Comparing the marginal effect of another year on average expenditures for two individuals, one with $25,000 in income

= b2 + b4 x 25 = -2.977 + (-0.1232)25 = -6.06. (5.18)

To carry this out in a script with income at $25,000 and $90,000

1 open "@gretldirdatapoepizza4.gdt"

2 series inc_age=income*age

3 ols pizza const age income inc_age

4 scalar me1 = $coeff(age)+$coeff(inc_age)*25

5 scalar me2 = $coeff(age)+$coeff(inc_age)*90

6 printf "nThe marginal effect of age for one

7 with $25,000/year income is %.2f.n",me1

8 printf "nThe marginal effect of age for one

9 with $90,000/year income is %.2f.n",me2

This yields:

The marginal effect of age for one with $25,000/year income is -6.06. The marginal effect of age for one with $90,000/year income is -14.07.

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>