Docsity

Notes for Nonlinear Regression Models and Nonlinear Optimization | ECON 5350, Study notes of Econometrics and Mathematical Economics

Toggle sidebar
bg1
ECON 5340 Class Notes
Chapter 9. Nonlinear Regression Models and Nonlinear Optimization
1Introduction
In this chapter, we examine regression models that are nonlinear in the parameters and give a brief overview
of methods to estimate such models.
2 Nonlinear Regression Models
The general form of the nonlinear regression model is
yi=h(xi,β,
i),(1)
which is more commonly written in a form with an additive error term
yi=h(xi,β)+i.(2)
Below are two examples
1. h(xi,β,
i)=β0xβ1
1ixβ2
2iexp(i). Thisisanintrinsically linear model because by taking natural loga-
rithms, we get a model that is linear in the parameters, ln(yi)=β0+β1ln(x1i)+β2ln(x2i)+i.This
can be estimated with standard linear procedures such as OLS.
2. h(xi,β)=β0xβ1
1ixβ2
2i. Since the error term in (2) is additive, there is no transformation that will produce
a linear model. This is an intrinsically nonlinear model (i.e., the relevant first-order conditions are
nonlinear in the parameters). Below we consider two methods for estimating such a model — linearizing
the underlying regression model and nonlinear optimization of the objective function.
2.1 Linearized Regression Model and the Gauss-Newton Algorithm
Consider a first-order Taylor series approximation of the regression model around β0
yi=h(xi,β)+i'h(xi,β0)+g(xi,β0)(β−β0)+i
1
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Notes for Nonlinear Regression Models and Nonlinear Optimization | ECON 5350 and more Study notes Econometrics and Mathematical Economics in PDF only on Docsity!

ECON 5340 Class Notes

Chapter 9. Nonlinear Regression Models and Nonlinear Optimization

1 Introduction

In this chapter, we examine regression models that are nonlinear in the parameters and give a brief overview of methods to estimate such models.

2 Nonlinear Regression Models

The general form of the nonlinear regression model is

yi = h(xi, β, i), (1)

which is more commonly written in a form with an additive error term

yi = h(xi, β) + i. (2)

Below are two examples

  1. h(xi, β, i) = β 0 xβ 11 i xβ 22 i exp(i). This is an intrinsically linear model because by taking natural loga- rithms, we get a model that is linear in the parameters, ln(yi) = β 0 + β 1 ln(x 1 i) + β 2 ln(x 2 i) + i. This can be estimated with standard linear procedures such as OLS.
  2. h(xi, β) = β 0 xβ 11 i xβ 2 i^2. Since the error term in (2) is additive, there is no transformation that will produce a linear model. This is an intrinsically nonlinear model (i.e., the relevant first-order conditions are nonlinear in the parameters). Below we consider two methods for estimating such a model — linearizing the underlying regression model and nonlinear optimization of the objective function.

2.1 Linearized Regression Model and the Gauss-Newton Algorithm

Consider a first-order Taylor series approximation of the regression model around β 0

yi = h(xi, β) + i ' h(xi, β 0 ) + g(xi, β 0 )(β − β 0 ) + i

where g(xi, β 0 ) = (∂h/∂β 1 |β=β 0 , ..., ∂h/∂βk|β=β 0 ).

Collecting terms and rearranging gives Y 0 = X^0 β + ^0

where

Y 0 ≡ Y − h(X, β 0 ) + g(X, β 0 )β 0 X^0 ≡ g(X, β 0 ).

The matrix X^0 is called the pseudoregressor matrix. Note also that ^0 will include higher-order approxima- tion errors.

2.1.1 Gauss-Newton Algorithm

Given an initial value for β 0 , we can estimate β with the following iterative LS procedure

bt+1 = [X^0 (bt)^0 X^0 (bt)]−^1 [X^0 (bt)^0 Y 0 (bt)] = [X^0 (bt)^0 X^0 (bt)]−^1 [X^0 (bt)^0 (X^0 (bt)bt + e^0 t )] = bt + [X^0 (bt)^0 X^0 (bt)]−^1 X^0 (bt)^0 e^0 t = bt + Wtλtgt

where Wt = [2X^0 (bt)^0 X^0 (bt)]−^1 , λt = 1 and gt = 2X^0 (bt)^0 e^0 t. The iterations continue until the difference between bt+1 and bt is sufficiently small. This is called the Gauss-Newton algorithm. Interpretations for Wt, λt and gt will be given below. A consistent estimator of σ^2 is

s^2 = (^) n −^1 k Xn i=1(yi^ −^ h(xi, b))

where Vˆ = ˆσ^2 (X^00 X^0 )−^1 , C = ∂R(b)/∂b and ˆσ^2 = S(b)/n.

2.2.3 Likelihood Ratio Test.

Assume  ∼ N(0, σ^2 I). The likelihood ratio statistic is

LR = −2[ln(L∗) − ln(L)] asy ∼ χ^2 (J)

where ln(L) and ln(L∗) are the unrestricted and restricted (log) likelihood values respectively.

2.2.4 Lagrange Multiplier Test.

The LM statistic is based solely on the restricted model. Occasionally, by imposing the restriction R(β) = q, it may change an intrinsically nonlinear model into an intrinsically linear one. The LM statistic is

LM = e

(^0) ∗X ∗ (^0) [X (^0) ∗ (^0) X ∗ (^0) ]− (^1) X ∗ (^0 0) e∗ S(b∗)/n = e (^0) ∗X ∗ (^0) ˜b S(b∗)/n =^ n^

ESS]

T SS^ ] =^ n^ Re

2 asy ∼ χ (^2) (J)

where e∗ = Y − h(X, b∗), X ∗^0 = g(X, b∗), ˜b is the estimated coefficient of e∗ on X ∗^0 and Re^2 is the coefficient of determination of e∗ on X ∗^0.

3 Brief Overview of Nonlinear Optimization Techniques

An alternative method for estimating the parameters of equation (2) is to apply nonlinear optimization techniques directly to the first-order conditions. Consider the NLS problem of minimizing

S(b) = Xn i=1 e (^2) i = Xn i=1(yi^ −^ h(xi, b))

The first-order conditions produce

∂S(b) ∂b =^ −^2

Xn i=1(yi^ −^ h(xi, b))^

∂h(xi, b) ∂b = 0,^ (3)

which is generally nonlinear in the parameters and does not have a nice closed-form, analytical solution. The methods outlined below can be used to solve the set of equations (3).

3.1 Introduction

Consider the function f (θ) = a + bθ + cθ^2. The first-order condition for minimization is

df (θ) dθ =^ b^ + 2cθ^ = 0 =⇒^ θ

∗ (^) = −b/ 2 c.

This is considered a linear optimization problem even though the objective function is nonlinear in the parameters. Alternatively, consider the objective fuction f (θ) = a + bθ^2 + c ln(θ). The first-order condition for minimization is df (θ) dθ = 2bθ^ +^

c θ = 0.

This is considered a nonlinear optimization problem. Here is a general outline of how to solve the nonlinear optimization problem. Let θ be the parameter vector, ∆ the directional vector and λ the step length. Procedure.

  1. Specify θ 0 and ∆ 0.
  2. Determine λ.
  3. Compute θt+1 = θt + λt∆t.
  4. Convergence criterion satisfied?
    • Yes −→ Exit.
    • No −→ Update t = t + 1, compute ∆t and return to #2. There are two general types of nonlinear optimization algorithms — those that do not involve derivatives and those that do.

3.2 Derivative-Free Methods

Derivative-free algorithms are used when the number of parameters are small, analytical derivatives are difficult to calculate or seed values are needed for other algorithms.

  1. Grid search. This is a trial-and-error method that is typically not feasible for more than two parame- ters. It can be a useful means to find starting values for other algorithms.
  • Newton’s method can be motivated by taking a Taylor series approximation (around θ 0 ) of the gradient and setting equal to zero. This gives g(θt) ' g(θ 0 ) + H(θ 0 )[θt − θ 0 ]. Rearranging, produces θt = θ 0 − H−^1 (θ 0 )g(θ 0 ).
  • Therefore, Wt = −H−^1 and λt = 1.
  • Very popular and works well in many settings.
  • Hessian can be difficult to calculate or positive definite if far from optimum.
  • Newton’s method will reach the optimum in one step if G(θt) is quadratic.
  1. Quadratic Hill Climbing.
  • Wt = −(H(θt) − αI)−^1 , where α > 0 is chosen to ensure that Wt is positive definite.
  1. Davidson-Fletcher-Powell (DFP).
  • Wt+1 = Wt + Et, where Et is a positive definite matrix.
  • Et = (^) (λ(λt ∆t∆t)(t)(gtλ−t∆gtt−)^01 ) + W (tg(tg−t−gtg−t− 1 )^10 )(Wgtt(−gtg −t−gt^1 −)^01 W) t.
  • Notice that no second derivatives (i.e., H(θt)) are required.
  • Choose W 0 = I.
  1. Method of Scoring.
  • Wt = −

E( ∂ ∂θ∂θ^2 ln(L 0 ))

  1. BHHH or Outer Product of the Gradients.
    • Wt = (g(θt)g(θt)^0 )−^1 is an estimate of −H−^1 (θt) = −( ∂ ∂θ∂θ^2 ln(L 0 ))−^1.
    • Wt is always positive definite.
    • Only requires first derviatives. Notes.
  2. Nonlinear optimization with constraints. There are several options such as forming a Lagrangian function, substituting the constraint directly into the objective and imposing arbitrary penalties into the objective function.
  1. Assessing convergence.
    • The ususal choice of convergence criterion is G or θ.
    • Sometimes these methods can be sensitive to the scaling of the function.
    • Belsley suggests using g^0 H−^1 g as the criterion, which removes the units of measurement.
  2. The biggest problem in nonlinear optimization is making sure the solution is a global, as opposed to local, optimum. The above methods work well for globally concave (convex) functions.

3.4 Examples of Newton’s Method

Here are two numerical examples of Newton’s method.

  1. Example #1. A sample of data (n = 20) was generated from the intrinsically nonlinear regression model yt = θ 1 + θ 2 x 2 t + θ^22 x 3 t + t, where θ 1 = θ 2 = 1. The objective is to minimize the function

G(θ 1 , θ 2 ) = (y − h(θ 1 , θ 2 ))^0 (y − h(θ 1 , θ 2 ))

where h(θ 1 , θ 2 ) = θ 1 + θ 2 x 2 t + θ^22 x 3 t. See Figure B.2 and Table B.3 (attached) to see how Newton’s method performs for three different initial values.

  1. Example #2. The objective is to minimize

G(θ) = θ^3 − 3 θ^2 + 5.

The gradient and Hessian are given by

g(θ) = 3 θ^2 − 6 θ = 3θ(θ − 2) H(θ) = 6 θ − 6 = 6(θ − 1).