# Polynomials

One way to allow for nonlinear relationships between independent and dependent variables is to introduce polynomials of the regressors into the model. In this example the marginal effect of an additional dollar of advertising is expected to diminish as more advertising is used. The model becomes:

salesi = ві + e2pricei + faadverti + e4advert[21] [22] + e^ i = 1, 2,…, N (5.6)

To estimate the parameters of this model, one creates the new variable, advert2, adds it to the model, and uses least squares.

OLS, using observations 1-75
Dependent variable: sales

 Coefficient Std. Error t-ratio p-value const 109.719 6.79905 16.1374 0.0000 price -7.64000 1.04594 -7.3044 0.0000 advert 12.1512 3.55616 3.4170 0.0011 a2 2.76796 0.940624 2.9427 0.0044

Mean dependent var 77.37467 S. D. dependent var 6.488537

Sum squared resid 1532.084 S. E. of regression 4.645283

F(3,71) 24.45932 P-value(F) 5.60e-11

Log-likelihood -219.5540 Akaike criterion 447.1080

Schwarz criterion 456.3780 Hannan-Quinn 450.8094

The variable a2, which is created by squaring advert, is a simple example of what is sometimes referred to as an interaction variable. The simplest way to think about an interaction variable is that you believe that its effect on the dependent variable depends on another variable-the two variables interact to determine the average value of the dependent variable. In this example, the effect of advertising on average sales depends on the level of advertising itself.

Another way to square variables is to use the square command