Docsity

Nonlinear Regression - Numerical Methods - Lecture Slides, Slides of Mathematical Methods for Numerical Analysis and Optimization

Partial preview of the text

Download Nonlinear Regression - Numerical Methods - Lecture Slides and more Slides Mathematical Methods for Numerical Analysis and Optimization in PDF only on Docsity!

Nonlinear Regression

Nonlinear Regression

( y  aebx)

( y  axb)

 

  

 

 b x

ax y

( y a 0 a 1 x...amxm)

Some popular nonlinear regression models:

  1. Exponential model:
  2. Power model:
  3. Saturation growth model:
  4. Polynomial model:

Regression

Exponential Model

Exponential Model

Given (^ x 1 ,y 1 ),(x 2 ,y 2 ),...,(xn ,yn)best fit y^ ^ aebx to the data.

Figure. Exponential model of nonlinear regression for y vs. x data

y  aebx

( xn ,yn)

( x 1 ,y 1 )

( x 2 ,y 2 )

( xi ,yi) yi aebxi

Finding Constants of Exponential Model

Rewriting the equations, we obtain

0 1

2

1

 (^)      

n

i

bx n

i

bx i y e i^ a e i

0 1

2

1

  ^   

n

i

bx i

n

i

bx i i y x e i^ a x e i

Finding constants of Exponential Model

Substituting a back into the previous equation

0 1

^  

    

n

i

bx n i

i

bx

n bx

i

i bx i

n

i

i

i i

i i (^) x e

e

y e y x e

The constant b can be found through numerical

methods such as bisection method.

 n

i

bx

n

i

bx i

i

i

e

y e

a

1

2

1

Solving the first equation for a yields

Example 1-Exponential Model cont.

Find:

a) The value of the regression constants A and

b) The half-life of Technium-99m c) Radiation intensity after 24 hours

The relative intensity is related to time by the equation

  Ae^ t

Plot of data

Setting up the Equation in MATLAB

  0 1

2

1

2

1 1

^  

  (^)    

 

n

i

t n i

i

t

n

i

t i t i

n

i

i i i

i i (^) t e e

e

f t e^  

 

  

t (hrs) 0 1 3 5 7 9 γ (^) 1.000 0.891 0.708 0.562 0.447 0.

Setting up the Equation in MATLAB

  0

^ 

  (^)  

n
i
t
n i
i
t
n
i
t
i
t
i
n
i
i

i

i

i

i (^) t e

e

e

f t e

 

   0. 1151

t=[0 1 3 5 7 9] gamma=[1 0.891 0.708 0.562 0.447 0.355] syms lamda sum1=sum(gamma.t.exp(lamdat)); sum2=sum(gamma.exp(lamdat)); sum3=sum(exp(2lamdat)); sum4=sum(t.exp(2lamdat)); f=sum1-sum2/sum3*sum4;

Plot of data and regression curve

t e

  1. 1151
  2. 9998

  

Relative Intensity After 24 hrs

The relative intensity of radiation after 24 hours

  1. 1151 ^24 
  2. 9998

   e

2

  1. 3160 10

  

This result implies that only

100 6. 317 %

  1. 9998

  2. 316 10

 

radioactive intensity is left after 24 hours.

Polynomial Model

( x 1 , y 1 ),(x 2 ,y 2 ),...,(xn, yn) m Given best fit y^ ^ a 0 a 1 x...am x

( m n 2 )^ to a given data set.

Figure. Polynomial model for nonlinear regression of y vs. x data

m

y  a 0 a 1 xam x

( xn ,yn)

( x 1 ,y 1 )

( x 2 ,y 2 )

( xi ,yi)

yi  f( xi)

Polynomial Model cont.

The residual at each data point is given by m Ei  yi a 0 a 1 xi .. .amxi

The sum of the square of the residuals then is

^ 

    

n

i

m i i m i

n

i

r i

y a a x a x

S E

1

2 0 1

1

2

...